Skip to contentSkip to conversation

xen: explicitly zero CR[1] in getvcpucontext for guests with no User PT

PATCH New Ian Campbell 1 participant 1 message Apr 6, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: explicitly zero CR[1] in getvcpucontext for guests with no User PT

Some recent guests (SLES11 & PVOPS) set this to NULL when running idle/kernel threads and the uninitialised value can confuse suspend/resume.

xen/arch/x86/domctl.c +2 -0
diff -r e54eeff2de54 -r fbc48e7d7ede xen/arch/x86/domctl.c
@@ -1151,6 +1151,8 @@
             if ( !pagetable_is_null(v->arch.guest_table_user) )
                 c.nat->ctrlreg[1] = xen_pfn_to_cr3(
                     pagetable_get_pfn(v->arch.guest_table_user));
+            else
+                c.nat->ctrlreg[1] = 0UL;
 #endif
 
             /* Merge shadow DR7 bits into real DR7. */