linux_dsm_epyc7002/arch/x86/kvm/vmx
Paolo Bonzini 49830b2d1b KVM: x86: reinstate vendor-agnostic check on SPEC_CTRL cpuid bits
commit 39485ed95d6b83b62fa75c06c2c4d33992e0d971 upstream.

Until commit e7c587da12 ("x86/speculation: Use synthetic bits for
IBRS/IBPB/STIBP"), KVM was testing both Intel and AMD CPUID bits before
allowing the guest to write MSR_IA32_SPEC_CTRL and MSR_IA32_PRED_CMD.
Testing only Intel bits on VMX processors, or only AMD bits on SVM
processors, fails if the guests are created with the "opposite" vendor
as the host.

While at it, also tweak the host CPU check to use the vendor-agnostic
feature bit X86_FEATURE_IBPB, since we only care about the availability
of the MSR on the host here and not about specific CPUID bits.

Fixes: e7c587da12 ("x86/speculation: Use synthetic bits for IBRS/IBPB/STIBP")
Cc: stable@vger.kernel.org
Reported-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-30 11:54:14 +01:00
..
capabilities.h KVM: VMX: Rename RDTSCP secondary exec control name to insert "ENABLE" 2020-09-28 07:57:30 -04:00
evmcs.c KVM: VMX: eVMCS: make evmcs_sanitize_exec_ctrls() work again 2020-10-31 10:27:58 -04:00
evmcs.h KVM: VMX: eVMCS: make evmcs_sanitize_exec_ctrls() work again 2020-10-31 10:27:58 -04:00
nested.c ARM: 2020-10-23 11:17:56 -07:00
nested.h KVM: nVMX: check for required but missing VMCS12 in KVM_SET_NESTED_STATE 2020-07-27 09:04:49 -04:00
pmu_intel.c KVM: x86: move MSR_IA32_PERF_CAPABILITIES emulation to common x86 code 2020-07-10 12:52:56 -04:00
posted_intr.c KVM: vmx: rename pi_init to avoid conflict with paride 2020-10-24 04:09:54 -04:00
posted_intr.h KVM: vmx: rename pi_init to avoid conflict with paride 2020-10-24 04:09:54 -04:00
vmcs12.c KVM: nVMX: Remove non-functional "support" for CR3 target values 2020-04-21 09:13:09 -04:00
vmcs12.h KVM: nVMX: Remove non-functional "support" for CR3 target values 2020-04-21 09:13:09 -04:00
vmcs_shadow_fields.h KVM: Fix some out-dated function names in comment 2020-01-21 13:57:27 +01:00
vmcs.h KVM: VMX: Add a helper to test for a valid error code given an intr info 2020-09-28 07:57:50 -04:00
vmenter.S KVM: VMX: Move IRQ invocation to assembly subroutine 2020-09-28 07:57:20 -04:00
vmx_ops.h KVM: VMX: Rename ops.h to vmx_ops.h 2020-09-28 07:57:38 -04:00
vmx.c KVM: x86: reinstate vendor-agnostic check on SPEC_CTRL cpuid bits 2020-12-30 11:54:14 +01:00
vmx.h Merge branch 'kvm-fixes' into 'next' 2020-10-21 18:05:58 -04:00