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] Latest bk can NOT compile on x86_64

Uh, this patch is completely wrong, please ignore, k thanks.

sRp

On Tue, May 31, 2005 at 04:52:09PM +0000, Scott Parish wrote:

> The attached patch gets me past early boot.
> 
> sRp
> 
> On Tue, May 31, 2005 at 06:16:10PM +0100, Keir Fraser wrote:
> 
> > 
> > On 31 May 2005, at 18:01, David F Barrera wrote:
> > 
> > >OK. This is the first time that I've been able to build Xen on SLES 9
> > >x86_64. When attempting to boot, Dom0 crashes. Although there is 
> > >already
> > >a defect open (Bugzilla #26) for a failure to boot Dom0 on x86_64 on
> > >FC4, I am opening a new defect (Bugzilla #65) since the failures appear
> > >different.
> > 
> > I wouldn't be surprised if the 32-bit PAE patch has broken guest 
> > pagetable management for x86/64. I fixed a bug that caused a crash 
> > during Xen bootstrap, but I didn't check domain0 booting. Lots of 
> > things have changed in the dom0 builder and in arch/x86/mm.c though.
> > 
> >  -- Keir
> > 
> > 
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@xxxxxxxxxxxxxxxxxxx
> > http://lists.xensource.com/xen-devel
> > 
> 
> -- 
> Scott Parish
> Signed-off-by: srparish@xxxxxxxxxx

> diff -rN -u -p old-xen-64-4/xen/arch/x86/mm.c new-xen-64-4/xen/arch/x86/mm.c
> --- old-xen-64-4/xen/arch/x86/mm.c    2005-05-31 16:15:06.000000000 +0000
> +++ new-xen-64-4/xen/arch/x86/mm.c    2005-05-31 16:47:32.000000000 +0000
> @@ -103,6 +103,7 @@
>  #include <asm/ldt.h>
>  #include <asm/x86_emulate.h>
>  
> +#define VERBOSE 1
>  #ifdef VERBOSE
>  #define MEM_LOG(_f, _a...)                           \
>    printk("DOM%u: (file=mm.c, line=%d) " _f "\n", \
> @@ -446,7 +447,7 @@ get_page_from_l1e(
>  
>      if ( unlikely(l1e_get_flags(l1e) & L1_DISALLOW_MASK) )
>      {
> -        MEM_LOG("Bad L1 flags %x\n", l1e_get_flags(l1e) & L1_DISALLOW_MASK);
> +        MEM_LOG("Bad L1 flags %lx\n", l1e_get_flags(l1e) & L1_DISALLOW_MASK);
>          return 0;
>      }
>  
> @@ -492,7 +493,7 @@ get_page_from_l2e(
>  
>      if ( unlikely((l2e_get_flags(l2e) & L2_DISALLOW_MASK)) )
>      {
> -        MEM_LOG("Bad L2 flags %x\n", l2e_get_flags(l2e) & L2_DISALLOW_MASK);
> +        MEM_LOG("Bad L2 flags %lx\n", l2e_get_flags(l2e) & L2_DISALLOW_MASK);
>          return 0;
>      }
>  
> @@ -525,7 +526,7 @@ get_page_from_l3e(
>  
>      if ( unlikely((l3e_get_flags(l3e) & L3_DISALLOW_MASK)) )
>      {
> -        MEM_LOG("Bad L3 flags %x\n", l3e_get_flags(l3e) & L3_DISALLOW_MASK);
> +        MEM_LOG("Bad L3 flags %lx\n", l3e_get_flags(l3e) & L3_DISALLOW_MASK);
>          return 0;
>      }
>  
> @@ -558,7 +559,7 @@ get_page_from_l4e(
>  
>      if ( unlikely((l4e_get_flags(l4e) & L4_DISALLOW_MASK)) )
>      {
> -        MEM_LOG("Bad L4 flags %x\n", l4e_get_flags(l4e) & L4_DISALLOW_MASK);
> +        MEM_LOG("Bad L4 flags %lx\n", l4e_get_flags(l4e) & L4_DISALLOW_MASK);
>          return 0;
>      }
>  
> diff -rN -u -p old-xen-64-4/xen/include/asm-x86/x86_64/page.h 
> new-xen-64-4/xen/include/asm-x86/x86_64/page.h
> --- old-xen-64-4/xen/include/asm-x86/x86_64/page.h    2005-05-31 
> 16:15:06.000000000 +0000
> +++ new-xen-64-4/xen/include/asm-x86/x86_64/page.h    2005-05-31 
> 16:50:24.000000000 +0000
> @@ -61,12 +61,12 @@ typedef l4_pgentry_t root_pgentry_t;
>  #define get_pte_flags(x) ((int)((x) >> 40) | ((int)(x) & 0xFFF))
>  #define put_pte_flags(x) ((((intpte_t)((x) & ~0xFFF)) << 40) | ((x) & 0xFFF))
>  
> -#define _PAGE_NX                (cpu_has_nx ? (1U<<23) : 0U)
> +#define _PAGE_NX                (cpu_has_nx ? (1UL<<63) : 0UL)
>  
> -#define L1_DISALLOW_MASK (0xFFFFF180U & ~_PAGE_NX) /* PAT/GLOBAL */
> -#define L2_DISALLOW_MASK (0xFFFFF180U & ~_PAGE_NX) /* PSE/GLOBAL */
> -#define L3_DISALLOW_MASK (0xFFFFF180U & ~_PAGE_NX) /* must-be-zero */
> -#define L4_DISALLOW_MASK (0xFFFFF180U & ~_PAGE_NX) /* must-be-zero */
> +#define L1_DISALLOW_MASK _PAGE_NX
> +#define L2_DISALLOW_MASK _PAGE_NX
> +#define L3_DISALLOW_MASK _PAGE_NX
> +#define L4_DISALLOW_MASK _PAGE_NX
>  
>  #endif /* __X86_64_PAGE_H__ */
>  
> 

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


-- 
Scott Parish
Signed-off-by: srparish@xxxxxxxxxx

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