[PATCH 1/1] kvm: x86: Move IA32_ARCH_CAPABILITIES to emulated_msrs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The msrs_to_save array is filtered to remove any MSRs not supported by
the hardware. Since IA32_ARCH_CAPABILITIES must, in some cases, be
emulated by kvm, it should be in the emulated_msr array
instead. Otherwise, it won't appear in KVM_GET_MSR_INDEX_LIST on hosts
where it isn't supported.

Fixes: 1eaafe91a0df ("kvm: x86: IA32_ARCH_CAPABILITIES is always supported")
Signed-off-by: Jim Mattson <jmattson@xxxxxxxxxx>
---
 arch/x86/kvm/x86.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 66cf73e29518..14a026b18cf7 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1041,7 +1041,7 @@ static u32 msrs_to_save[] = {
 #endif
 	MSR_IA32_TSC, MSR_IA32_CR_PAT, MSR_VM_HSAVE_PA,
 	MSR_IA32_FEATURE_CONTROL, MSR_IA32_BNDCFGS, MSR_TSC_AUX,
-	MSR_IA32_SPEC_CTRL, MSR_IA32_ARCH_CAPABILITIES
+	MSR_IA32_SPEC_CTRL
 };
 
 static unsigned num_msrs_to_save;
@@ -1076,6 +1076,7 @@ static u32 emulated_msrs[] = {
 	MSR_PLATFORM_INFO,
 	MSR_MISC_FEATURES_ENABLES,
 	MSR_AMD64_VIRT_SPEC_CTRL,
+	MSR_IA32_ARCH_CAPABILITIES,
 };
 
 static unsigned num_emulated_msrs;
-- 
2.18.0.rc2.346.g013aa6912e-goog




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux