diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2019-09-25 17:37:21 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-09-26 07:20:55 -0400 |
commit | 504ce1954fba888936c9d13ccc1e3db9b8f613d5 (patch) | |
tree | db518fe49d637b5730ba70f41bb1e28af3e415bc | |
parent | 40bc47b08b6efc8b64fef77cb46974f634215425 (diff) |
KVM: x86: Expose XSAVEERPTR to the guest
I was surprised to see that the guest reported `fxsave_leak' while the
host did not. After digging deeper I noticed that the bits are simply
masked out during enumeration.
The XSAVEERPTR feature is actually a bug fix on AMD which means the
kernel can disable a workaround.
Pass XSAVEERPTR to the guest if available on the host.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | arch/x86/kvm/cpuid.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 34d9f9f481a3..9c5029cf6f3f 100644 --- a/arch/x86/kvm/cpuid.c +++ b/arch/x86/kvm/cpuid.c | |||
@@ -485,9 +485,9 @@ static inline int __do_cpuid_func(struct kvm_cpuid_entry2 *entry, u32 function, | |||
485 | 485 | ||
486 | /* cpuid 0x80000008.ebx */ | 486 | /* cpuid 0x80000008.ebx */ |
487 | const u32 kvm_cpuid_8000_0008_ebx_x86_features = | 487 | const u32 kvm_cpuid_8000_0008_ebx_x86_features = |
488 | F(CLZERO) | F(WBNOINVD) | F(AMD_IBPB) | F(AMD_IBRS) | | 488 | F(CLZERO) | F(XSAVEERPTR) | |
489 | F(AMD_STIBP) | F(AMD_STIBP_ALWAYS_ON) | F(AMD_SSBD) | | 489 | F(WBNOINVD) | F(AMD_IBPB) | F(AMD_IBRS) | F(AMD_SSBD) | F(VIRT_SSBD) | |
490 | F(VIRT_SSBD) | F(AMD_SSB_NO); | 490 | F(AMD_SSB_NO) | F(AMD_STIBP) | F(AMD_STIBP_ALWAYS_ON); |
491 | 491 | ||
492 | /* cpuid 0xC0000001.edx */ | 492 | /* cpuid 0xC0000001.edx */ |
493 | const u32 kvm_cpuid_C000_0001_edx_x86_features = | 493 | const u32 kvm_cpuid_C000_0001_edx_x86_features = |