Skip to contentSkip to conversation

x86/pvh: Fix pvh dom0 boot after dab11417d

PATCH In review Andrew Cooper 2 participants 2 messages Jul 14, 2014 – Jul 15, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/pvh: Fix pvh dom0 boot after dab11417d

Changeset dab11417d
"x86/HVM: consolidate and sanitize CR4 guest reserved bit determination"

did not take into account the fact that dom0 does not have a cpuid policy. As a result, PVH dom0s would be given unexpected #GP faults on boot.

In addition to the restore case (where the toolstack has not had time to load a cpuid policy), unconditionally exempt the hardware domain from needing a policy.

---
 xen/arch/x86/hvm/hvm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/hvm/hvm.c +1 -1
index ef2411c..db54814 100644
@@ -1738,7 +1738,7 @@ static unsigned long hvm_cr4_guest_reserved_bits(const struct vcpu *v,
     unsigned int leaf1_ecx = 0, leaf1_edx = 0;
     unsigned int leaf7_0_ebx = 0, leaf7_0_ecx = 0;
 
-    if ( likely(!restore) )
+    if ( !restore && !is_hardware_domain(v->domain) )
     {
         unsigned int level;
 
Signature · 7 lines
1.7.10.4


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Tested-by on v1 1/1
#1 lore raw
Quoted 6 lines · Andrew Cooper

Changeset dab11417d
"x86/HVM: consolidate and sanitize CR4 guest reserved bit determination"

did not take into account the fact that dom0 does not have a cpuid policy. As a result, PVH dom0s would be given unexpected #GP faults on boot.

Quoted 7 lines

In addition to the restore case (where the toolstack has not had time to load a cpuid policy), unconditionally exempt the hardware domain from needing a policy.

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