Commit 1eaafe91a0df ("kvm: x86: IA32_ARCH_CAPABILITIES is always supported") unconditionally allowed host userspace to expose ARCH_CAPABILITIES to the guest "Since the IA32_ARCH_CAPABILITIES MSR is emulated in kvm". Unfortunately, that assertion is only partially true. KVM only emulates the SKIP_VMENTRY_L1DFLUSH capability, everything else enumerated in MSR_IA32_ARCH_CAPABILITIES relies on hardware support. And on AMD, the MSR is not emulated at all. Fix the bugs to avoid inducing faults and bad behavior in the guest due to advertising support that doesn't exist. Sean Christopherson (2): KVM: x86: enforce MSR_IA32_ARCH_CAPABILITIES value set by userspace KVM: x86: Emulate MSR_IA32_ARCH_CAPABILITIES on AMD hosts arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/vmx/vmx.c | 13 ------------- arch/x86/kvm/vmx/vmx.h | 1 - arch/x86/kvm/x86.c | 13 +++++++++++++ 4 files changed, 14 insertions(+), 14 deletions(-) -- 2.21.0