Skip to contentSkip to conversation

x86: Don't test 64-bit-only MSRs in 32-bit build

PATCH New Sean Christopherson 1 participant 1 message Aug 22, 2019 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: Don't test 64-bit-only MSRs in 32-bit build

Skip the 64-bit-only MSRs on 32-bit to avoid triple faults due to #GPs on the MSR access.

---
 x86/msr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
x86/msr.c +1 -1
index ffc24b1..beb321f 100644
@@ -48,7 +48,6 @@ struct msr_info msr_info[] =
     { .index = 0xc0000080, .name = "MSR_EFER",
       .val_pairs = {{ .valid = 1, .value = 0xD00, .expected = 0xD00}}
     },
-#endif
     { .index = 0xc0000082, .name = "MSR_LSTAR",
       .val_pairs = {{ .valid = 1, .value = addr_64, .expected = addr_64}}
     },
@@ -58,6 +57,7 @@ struct msr_info msr_info[] =
     { .index = 0xc0000084, .name = "MSR_SYSCALL_MASK",
       .val_pairs = {{ .valid = 1, .value = 0xffffffff, .expected = 0xffffffff}}
     },
+#endif
 
 //    MSR_IA32_DEBUGCTLMSR needs svm feature LBRV
 //    MSR_VM_HSAVE_PA only AMD host
Signature · 1 line
2.22.0