Skip to content

Commit 504ce19

Browse files
Sebastian Andrzej Siewiorbonzini
Sebastian Andrzej Siewior
authored andcommitted
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 <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 40bc47b commit 504ce19

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/x86/kvm/cpuid.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -485,9 +485,9 @@ static inline int __do_cpuid_func(struct kvm_cpuid_entry2 *entry, u32 function,
485485

486486
/* cpuid 0x80000008.ebx */
487487
const u32 kvm_cpuid_8000_0008_ebx_x86_features =
488-
F(CLZERO) | F(WBNOINVD) | F(AMD_IBPB) | F(AMD_IBRS) |
489-
F(AMD_STIBP) | F(AMD_STIBP_ALWAYS_ON) | F(AMD_SSBD) |
490-
F(VIRT_SSBD) | F(AMD_SSB_NO);
488+
F(CLZERO) | F(XSAVEERPTR) |
489+
F(WBNOINVD) | F(AMD_IBPB) | F(AMD_IBRS) | F(AMD_SSBD) | F(VIRT_SSBD) |
490+
F(AMD_SSB_NO) | F(AMD_STIBP) | F(AMD_STIBP_ALWAYS_ON);
491491

492492
/* cpuid 0xC0000001.edx */
493493
const u32 kvm_cpuid_C000_0001_edx_x86_features =

0 commit comments

Comments
 (0)