WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] Fix >4G i386 PAE grant table interface

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Fix >4G i386 PAE grant table interface
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Fri, 03 Nov 2006 09:56:31 +0000
Cc: Steven Rostedt <srostedt@xxxxxxxxxx>
Delivery-date: Fri, 03 Nov 2006 02:00:22 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <454A2271.90000@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <454A2271.90000@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> Steven Rostedt <srostedt@xxxxxxxxxx> 02.11.06 17:53 >>>
>It has been discovered that i386 boxes with more than 4G of RAM would 
>randomly crash.  It was traced to the interface of blktap using 
>gnttab_set_map_op.
>
>It would pass in the 64 bit pte entry, but the gnttab_set_map_op would 
>only take a 32 bit (on i386) unsigned long as a parameter. So we lose 
>the top 32bits.
>
>Luckily!  The kernel/HV ABI used a uint64_t as the variable to pass the 
>address.  So this does *NOT* break the current kernel/HV ABI.
>
>But after the HV grabs the 64 bit address from the guest, it too calls a 
>function that uses a unsigned long (32bits on i386) to pass that address 
>with.  So the HV side also chops off the top 64 bits of the variable.
>
>
>This patch updates both the linux-2.6-sparse tree and the xen HV to use 
>uint64_t instead of unsigned long for those particular functions.  This 
>patch has been tested on RHEL5 Beta on a box with 12G i386.
>
>Signed-off-by: Steven Rostedt <srostedt@xxxxxxxxxx>

After integrating the kernel part of this patch in my tree, I found that
almost the whole kernel got rebuilt.
include/asm-{i386,x86_64}/mach-xen/asm/fixmap.h were needlessly
including include/xen/gnttab.h. Removing this made necessary explicit
inclusion of that header in tpm_xen.c, the build of which should not
have succeeded on non-x86 architectures before.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Index: head-2006-10-30/drivers/char/tpm/tpm_xen.c
===================================================================
--- head-2006-10-30.orig/drivers/char/tpm/tpm_xen.c     2006-10-30 
13:36:39.000000000 +0100
+++ head-2006-10-30/drivers/char/tpm/tpm_xen.c  2006-11-03 10:41:32.000000000 
+0100
@@ -41,6 +41,7 @@
 #include <xen/evtchn.h>
 #include <xen/interface/grant_table.h>
 #include <xen/interface/io/tpmif.h>
+#include <xen/gnttab.h>
 #include <xen/xenbus.h>
 #include "tpm.h"
 #include "tpm_vtpm.h"
Index: head-2006-10-30/include/asm-i386/mach-xen/asm/fixmap.h
===================================================================
--- head-2006-10-30.orig/include/asm-i386/mach-xen/asm/fixmap.h 2006-08-28 
10:57:30.000000000 +0200
+++ head-2006-10-30/include/asm-i386/mach-xen/asm/fixmap.h      2006-11-03 
10:30:39.000000000 +0100
@@ -27,7 +27,6 @@ extern unsigned long __FIXADDR_TOP;
 #include <asm/acpi.h>
 #include <asm/apicdef.h>
 #include <asm/page.h>
-#include <xen/gnttab.h>
 #ifdef CONFIG_HIGHMEM
 #include <linux/threads.h>
 #include <asm/kmap_types.h>
Index: head-2006-10-30/include/asm-x86_64/mach-xen/asm/fixmap.h
===================================================================
--- head-2006-10-30.orig/include/asm-x86_64/mach-xen/asm/fixmap.h       
2006-08-28 10:57:30.000000000 +0200
+++ head-2006-10-30/include/asm-x86_64/mach-xen/asm/fixmap.h    2006-11-03 
10:30:50.000000000 +0100
@@ -14,7 +14,6 @@
 #include <linux/config.h>
 #include <linux/kernel.h>
 #include <asm/apicdef.h>
-#include <xen/gnttab.h>
 #include <asm/page.h>
 #include <asm/vsyscall.h>
 #include <asm/vsyscall32.h>


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel