linux/arch/x86/kvm
Jim Mattson 0204750bd4 KVM: x86: Mask off unsupported and unknown bits of IA32_ARCH_CAPABILITIES
KVM should not claim to virtualize unknown IA32_ARCH_CAPABILITIES
bits. When kvm_get_arch_capabilities() was originally written, there
were only a few bits defined in this MSR, and KVM could virtualize all
of them. However, over the years, several bits have been defined that
KVM cannot just blindly pass through to the guest without additional
work (such as virtualizing an MSR promised by the
IA32_ARCH_CAPABILITES feature bit).

Define a mask of supported IA32_ARCH_CAPABILITIES bits, and mask off
any other bits that are set in the hardware MSR.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Fixes: 5b76a3cff0 ("KVM: VMX: Tell the nested hypervisor to skip L1D flush on vmentry")
Signed-off-by: Jim Mattson <jmattson@google.com>
Reviewed-by: Vipin Sharma <vipinsh@google.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Message-Id: <20220830174947.2182144-1-jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-09-01 19:20:58 -04:00
..
mmu kvm: x86: mmu: Always flush TLBs when enabling dirty logging 2022-08-19 07:38:03 -04:00
svm KVM: SVM: Disable SEV-ES support if MMIO caching is disable 2022-08-10 15:08:25 -04:00
vmx KVM: VMX: Heed the 'msr' argument in msr_write_intercepted() 2022-08-19 07:38:04 -04:00
cpuid.c KVM: x86: Add dedicated helper to get CPUID entry with significant index 2022-07-14 11:38:32 -04:00
cpuid.h KVM: x86: Add dedicated helper to get CPUID entry with significant index 2022-07-14 11:38:32 -04:00
debugfs.c KVM: x86: Introduce "struct kvm_caps" to track misc caps/settings 2022-06-08 05:21:16 -04:00
emulate.c x86/kvm: Fix "missing ENDBR" BUG for fastop functions 2022-08-19 04:05:42 -04:00
fpu.h
hyperv.c KVM: x86: Add dedicated helper to get CPUID entry with significant index 2022-07-14 11:38:32 -04:00
hyperv.h KVM: x86: hyper-v: Avoid writing to TSC page without an active vCPU 2022-04-11 13:29:51 -04:00
i8254.c KVM: x86: PIT: Preserve state of speaker port data bit 2022-06-08 13:06:20 -04:00
i8254.h KVM: x86: PIT: Preserve state of speaker port data bit 2022-06-08 13:06:20 -04:00
i8259.c KVM: x86/i8259: Remove a dead store of irq in a conditional block 2022-04-02 05:41:19 -04:00
ioapic.c KVM: x86/ioapic: Remove unused "addr" and "length" of ioapic_read_indirect() 2022-02-10 13:47:13 -05:00
ioapic.h x86/kvm: remove unused ack_notifier callbacks 2021-11-18 07:05:57 -05:00
irq_comm.c KVM: x86/xen: Make kvm_xen_set_evtchn() reusable from other places 2022-04-02 05:41:14 -04:00
irq.c KVM: x86/xen: handle PV timers oneshot mode 2022-04-02 05:41:16 -04:00
irq.h x86/kvm: remove unused ack_notifier callbacks 2021-11-18 07:05:57 -05:00
Kconfig KVM: x86/mmu: Remove MMU auditing 2022-02-18 13:46:23 -05:00
kvm_cache_regs.h KVM: X86: Remove kvm_register_clear_available() 2021-12-08 04:25:03 -05:00
kvm_emulate.h KVM: x86: Bug the VM if the emulator accesses a non-existent GPR 2022-06-10 10:01:33 -04:00
kvm_onhyperv.c KVM: x86: Uninline and export hv_track_root_tdp() 2022-02-10 13:47:19 -05:00
kvm_onhyperv.h KVM: x86: Uninline and export hv_track_root_tdp() 2022-02-10 13:47:19 -05:00
lapic.c KVM: x86: Bug the VM if an accelerated x2APIC trap occurs on a "bad" reg 2022-08-10 15:08:23 -04:00
lapic.h KVM: x86: Fix handling of APIC LVT updates when userspace changes MCG_CAP 2022-07-08 15:58:16 -07:00
Makefile KVM: Add Makefile.kvm for common files, use it for x86 2021-12-09 12:56:02 -05:00
mmu.h KVM: SVM: Disable SEV-ES support if MMIO caching is disable 2022-08-10 15:08:25 -04:00
mtrr.c
pmu.c Revert "KVM: x86: always allow host-initiated writes to PMU MSRs" 2022-06-20 11:49:46 -04:00
pmu.h Revert "KVM: x86: always allow host-initiated writes to PMU MSRs" 2022-06-20 11:49:46 -04:00
reverse_cpuid.h
trace.h KVM: x86: move all vcpu->arch.pio* setup in emulator_pio_in_out() 2022-06-24 12:53:50 -04:00
tss.h
x86.c KVM: x86: Mask off unsupported and unknown bits of IA32_ARCH_CAPABILITIES 2022-09-01 19:20:58 -04:00
x86.h KVM: x86: Split kvm_is_valid_cr4() and export only the non-vendor bits 2022-07-28 13:22:25 -04:00
xen.c KVM: x86/xen: Stop Xen timer before changing IRQ 2022-08-10 15:08:25 -04:00
xen.h KVM: x86: do not set st->preempted when going back to user space 2022-06-08 04:21:06 -04:00