All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Scott Parish" <srparish@us.ibm.com>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: David F Barrera <dfbp@us.ibm.com>,
	xen-devel@lists.xensource.com, "Nakajima,
	Jun" <jun.nakajima@intel.com>
Subject: Re: Latest bk can NOT compile on x86_64
Date: Tue, 31 May 2005 16:52:09 +0000	[thread overview]
Message-ID: <20050531165208.GC9951@us.ibm.com> (raw)
In-Reply-To: <f0e62a39be2089b374a88e864302a858@cl.cam.ac.uk>

[-- Attachment #1: Type: text/plain, Size: 986 bytes --]

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@lists.xensource.com
> http://lists.xensource.com/xen-devel
> 

-- 
Scott Parish
Signed-off-by: srparish@us.ibm.com

[-- Attachment #2: nx.diff --]
[-- Type: text/plain, Size: 2686 bytes --]

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__ */
 


[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

  reply	other threads:[~2005-05-31 16:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-31  6:37 Latest bk can NOT compile on x86_64 Nakajima, Jun
2005-05-31 15:16 ` David F Barrera
2005-05-31 15:49   ` Keir Fraser
2005-05-31 17:01     ` David F Barrera
2005-05-31 17:16       ` Keir Fraser
2005-05-31 16:52         ` Scott Parish [this message]
2005-05-31 16:59           ` Scott Parish
  -- strict thread matches above, loose matches on Subject: below --
2005-05-31 21:35 Nakajima, Jun
2005-05-31 19:32 Nakajima, Jun
2005-05-31 20:33 ` David F Barrera
2005-05-31  6:15 Nakajima, Jun
2005-05-31  8:28 ` Keir Fraser
2005-05-31  4:52 Nakajima, Jun
2005-05-30 23:13 Li, Xin B

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050531165208.GC9951@us.ibm.com \
    --to=srparish@us.ibm.com \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=dfbp@us.ibm.com \
    --cc=jun.nakajima@intel.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.