Allow 32bit PAE guests to change their L3 entries
PATCH 1/1 Allow 32bit PAE guests to change their L3 entries
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 <[email protected]> for xen-3.1-testing, ported to xen-unstable by me.
Keir: Please apply this patch also to xen-3.2-testing and xen-3.1-testing.
Signature · 12 lines
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
xen/arch/x86/mm.c +2 -2
@@ -1567,14 +1567,14 @@ static int mod_l3_entry(l3_pgentry_t *plreturn 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)) )
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 7 lines · Christoph Egger
adjust_guest_l3e()adds (_PAGE_USER|_PAGE_RW) to the entry, and thenget_page_from_l3e()checks that_PAGE_USERor_PAGE_RWare 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.
It breaks the fast update path, and also all mod_lN_entry() functions should probably be reorganised for consistency. I'll make these changes and apply it.
-- Keir
Quoted 6 lines · On Monday 18 February 2008 14:44:32 Keir Fraser wrote:
Quoted 5 lines · Christoph Egger
adjust_guest_l3e()adds (_PAGE_USER|_PAGE_RW) to the entry, and thenget_page_from_l3e()checks that_PAGE_USERor_PAGE_RWare not present for PAE guests.get_page_from_l3e()will always fail at this point for PAE guests.
Quoted 6 lines
Quoted 2 lines
Attached patch fixes this. This bug has been uncovered with NetBSD 32bit PAE guests.
It breaks the fast update path, and also all
mod_lN_entry()functions should probably be reorganised for consistency. I'll make these changes and apply it.
Thank you very much. But shouldn't have c/s 17061 gone into xen-staging first and then into xen-stable ?
Christoph
Signature · 12 lines
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
Quoted 6 lines · Christoph Egger
Quoted 3 lines
It breaks the fast update path, and also all
mod_lN_entry()functions should probably be reorganised for consistency. I'll make these changes and apply it.Thank you very much. But shouldn't have c/s 17061 gone into xen-staging first and then into xen-stable ?
It's in both. Also now in 3.2 and 3.1 staging trees.
-- Keir
Quoted 9 lines · On Monday 18 February 2008 15:35:28 Keir Fraser wrote:
Quoted 6 lines · Christoph Egger
Quoted 3 lines
It breaks the fast update path, and also all
mod_lN_entry()functions should probably be reorganised for consistency. I'll make these changes and apply it.Thank you very much. But shouldn't have c/s 17061 gone into xen-staging first and then into xen-unstable ?
It's in both. Also now in 3.2 and 3.1 staging trees.
Thanks. I just was surprised seeing the patch in xen-unstable before in xen-staging. Maybe your automated regression system had a kind of a "race" window :)
Christoph
Signature · 12 lines
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
Quoted 8 lines · Christoph Egger
Quoted 4 lines
Quoted 2 lines
Thank you very much. But shouldn't have c/s 17061 gone into xen-staging first and then into xen-unstable ?
It's in both. Also now in 3.2 and 3.1 staging trees.
Thanks. I just was surprised seeing the patch in xen-unstable before in xen-staging. Maybe your automated regression system had a kind of a "race" window :)
I pushed it through manually as the test harness has failed (apparently) spuriously a couple of times in a row.
-- Keir