From: "Jan Beulich" Subject: Re: [PATCH] Fix >4G i386 PAE grant table interface Date: Fri, 03 Nov 2006 09:56:31 +0000 Message-ID: <454B205F.76E4.0078.0@novell.com> References: <454A2271.90000@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <454A2271.90000@redhat.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Steven Rostedt List-Id: xen-devel@lists.xenproject.org >>> Steven Rostedt 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 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 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 #include #include +#include #include #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 #include #include -#include #ifdef CONFIG_HIGHMEM #include #include 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 #include #include -#include #include #include #include