Skip to contentSkip to conversation

fix segmentation faults when booting FC3 in vmx domain

PATCH New Ling, Xiaofeng 1 participant 1 message Nov 30, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix segmentation faults when booting FC3 in vmx domain

# HG changeset patch
# User Xiaofeng Ling <[email protected]>
# Node ID 722429e8b618adc9f39340ff39fc0d7f4a6b1bec
# Parent ccf76e51e7e6661df56c35c244fca0a52aa8f481
We need to do sync when mov_to_cr3 to a value already shadowed. The L2 page and already shadowed L1 page may be out of sync. This patch fix the problems of segmentation faults and strange prints when booting Redhat FC3 and make kernel in FC3 in VMX domain.

xen/arch/x86/shadow.c +2 -1
diff -r ccf76e51e7e6 -r 722429e8b618 xen/arch/x86/shadow.c
@@ -2154,7 +2154,8 @@
 #elif CONFIG_PAGING_LEVELS == 4
         smfn = shadow_l4_table(d, gpfn, gmfn);
 #endif
-    }
+    }else
+        shadow_sync_all(d);
     if ( !get_shadow_ref(smfn) )
         BUG();
     old_smfn = pagetable_get_pfn(v->arch.shadow_table);
xen/arch/x86/shadow32.c +0 -0
diff -r ccf76e51e7e6 -r 722429e8b618 xen/arch/x86/shadow32.c
@@ -2911,6 +2911,8 @@
      */
     if ( unlikely(!(smfn = __shadow_status(d, gpfn, 

PGT_base_page_table))) )

         smfn = shadow_l2_table(d, gpfn, gmfn);
+    else
+        shadow_sync_all(d);
     if ( !get_shadow_ref(smfn) )
         BUG();
     old_smfn = pagetable_get_pfn(v->arch.shadow_table);

# HG changeset patch
# User Xiaofeng Ling <[email protected]>
# Node ID 722429e8b618adc9f39340ff39fc0d7f4a6b1bec
# Parent ccf76e51e7e6661df56c35c244fca0a52aa8f481
We need to do sync when mov_to_cr3 to a value already shadowed. The L2 page and already shadowed L1 page may out of sync. This patch fix the problems of segmentation faults and strange prints when booting Redhat FC3 and make kernel in FC3 in VMX domain.

xen/arch/x86/shadow.c +2 -1
diff -r ccf76e51e7e6 -r 722429e8b618 xen/arch/x86/shadow.c
@@ -2154,7 +2154,8 @@
 #elif CONFIG_PAGING_LEVELS == 4
         smfn = shadow_l4_table(d, gpfn, gmfn);
 #endif
-    }
+    }else
+        shadow_sync_all(d);
     if ( !get_shadow_ref(smfn) )
         BUG();
     old_smfn = pagetable_get_pfn(v->arch.shadow_table);
xen/arch/x86/shadow32.c +2 -0
diff -r ccf76e51e7e6 -r 722429e8b618 xen/arch/x86/shadow32.c
@@ -2911,6 +2911,8 @@
      */
     if ( unlikely(!(smfn = __shadow_status(d, gpfn, PGT_base_page_table))) )
         smfn = shadow_l2_table(d, gpfn, gmfn);
+    else
+        shadow_sync_all(d);
     if ( !get_shadow_ref(smfn) )
         BUG();
     old_smfn = pagetable_get_pfn(v->arch.shadow_table);

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel