ChangeSet 1.1430, 2005/05/17 14:20:17+01:00, maf46@xxxxxxxxxxxxxxxxx
Bug fix for shadow external mode (i.e. VMX) operation,
fixing an overly aggressive new ASSERT added with the light weight
shadow code.
domain.c | 3 ++-
shadow.c | 10 ++++++----
2 files changed, 8 insertions(+), 5 deletions(-)
diff -Nru a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c 2005-05-17 10:04:57 -04:00
+++ b/xen/arch/x86/domain.c 2005-05-17 10:04:57 -04:00
@@ -364,7 +364,8 @@
/* Put the domain in shadow mode even though we're going to be using
* the shared 1:1 page table initially. It shouldn't hurt */
shadow_mode_enable(ed->domain,
-
SHM_enable|SHM_refcounts|SHM_translate|SHM_external);
+ SHM_enable|SHM_write_all|SHM_refcounts|
+ SHM_translate|SHM_external);
}
return 0;
diff -Nru a/xen/arch/x86/shadow.c b/xen/arch/x86/shadow.c
--- a/xen/arch/x86/shadow.c 2005-05-17 10:04:57 -04:00
+++ b/xen/arch/x86/shadow.c 2005-05-17 10:04:57 -04:00
@@ -2307,9 +2307,10 @@
// guest page.
// This only applies when we have writable page tables.
//
- if ( (stype == PGT_l1_shadow) && !VM_ASSIST(d,
VMASST_TYPE_writable_pagetables) )
- continue;
- if ( (stype != PGT_l1_shadow) && !shadow_mode_write_all(d) )
+ if ( !shadow_mode_write_all(d) &&
+ !((stype == PGT_l1_shadow) &&
+ VM_ASSIST(d, VMASST_TYPE_writable_pagetables)) )
+ // Page is not writable -- no resync necessary
continue;
}
@@ -2336,7 +2337,8 @@
l1_pgentry_t *shadow1 = shadow;
l1_pgentry_t *snapshot1 = snapshot;
- ASSERT(VM_ASSIST(d, VMASST_TYPE_writable_pagetables));
+ ASSERT(VM_ASSIST(d, VMASST_TYPE_writable_pagetables) ||
+ shadow_mode_write_all(d));
if ( !shadow_mode_refcounts(d) )
revalidate_l1(d, guest1, snapshot1);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|