Skip to contentSkip to conversation

fix system crash when vmx guest startx or restore

PATCH New Zhai, Edwin 1 participant 1 message Jul 14, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix system crash when vmx guest startx or restore

[PATCH] fix system crash when vmx guest startx or restore Add this safety check like alloc_l4_table

xen/arch/x86/mm.c +4 -0
diff -r f692a0a476c5 xen/arch/x86/mm.c
@@ -1008,6 +1008,10 @@ static int alloc_l3_table(struct page_in
     l3_pgentry_t  *pl3e;
     int            i;
 
+    /* See the code in shadow_promote() to understand why this is here. */
+    if ( (PGT_base_page_table == PGT_l3_page_table) &&
+         shadow_mode_refcounts(d) )
+        return 1;
     ASSERT(!shadow_mode_refcounts(d));
 
 #ifdef CONFIG_X86_PAE