All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Allow 32bit PAE guests to change their L3 entries
@ 2008-02-18 12:32 Christoph Egger
  2008-02-18 13:44 ` Keir Fraser
  0 siblings, 1 reply; 6+ messages in thread
From: Christoph Egger @ 2008-02-18 12:32 UTC (permalink / raw)
  To: xen-devel

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


Hi!

adjust_guest_l3e() adds (_PAGE_USER|_PAGE_RW) to the entry, and then
get_page_from_l3e() checks that _PAGE_USER or _PAGE_RW are not present
for PAE guests.  get_page_from_l3e() will always fail at this point
for PAE guests.

Attached patch fixes this. This bug has been uncovered with NetBSD 32bit PAE 
guests.

Patch from Manuel Bouyer <bouyer@netbsd.org> for xen-3.1-testing,
ported to xen-unstable by me.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>


Keir: Please apply this patch also to xen-3.2-testing and xen-3.1-testing.



-- 
AMD Saxony, Dresden, Germany
Operating System Research Center

Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
   Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
   AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
   Dr. Hans-R. Deppe, Thomas McCoy

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

diff -r 819399d0bdb1 xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c	Fri Feb 15 14:16:42 2008 +0000
+++ b/xen/arch/x86/mm.c	Mon Feb 18 10:55:18 2008 +0100
@@ -1567,14 +1567,14 @@ static int mod_l3_entry(l3_pgentry_t *pl
             return 0;
         }
 
-        adjust_guest_l3e(nl3e, d);
-
         /* Fast path for identical mapping and presence. */
         if (!l3e_has_changed(ol3e, nl3e, _PAGE_PRESENT))
             return UPDATE_ENTRY(l3, pl3e, ol3e, nl3e, pfn, curr, preserve_ad);
 
         if ( unlikely(!get_page_from_l3e(nl3e, pfn, d)) )
             return 0;
+
+        adjust_guest_l3e(nl3e, d);
 
         if ( unlikely(!UPDATE_ENTRY(l3, pl3e, ol3e, nl3e, pfn, curr,
                                     preserve_ad)) )

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

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-02-18 15:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-18 12:32 [PATCH] Allow 32bit PAE guests to change their L3 entries Christoph Egger
2008-02-18 13:44 ` Keir Fraser
2008-02-18 13:57   ` Christoph Egger
2008-02-18 14:35     ` Keir Fraser
2008-02-18 14:41       ` Christoph Egger
2008-02-18 15:03         ` Keir Fraser

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.