linux_dsm_epyc7002/arch/x86/kvm/vmx
Jim Mattson e1fba49cc1 kvm: vmx: Limit guest PMCs to those supported on the host
KVM can only virtualize as many PMCs as the host supports.

Limit the number of generic counters and fixed counters to the number
of corresponding counters supported on the host, rather than to
INTEL_PMC_MAX_GENERIC and INTEL_PMC_MAX_FIXED, respectively.

Note that INTEL_PMC_MAX_GENERIC is currently 32, which exceeds the 18
contiguous MSR indices reserved by Intel for event selectors. Since
the existing code relies on a contiguous range of MSR indices for
event selectors, it can't possibly work for more than 18 general
purpose counters.

Fixes: f5132b0138 ("KVM: Expose a version 2 architectural PMU to a guests")
Signed-off-by: Jim Mattson <jmattson@google.com>
Reviewed-by: Marc Orr <marcorr@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-10-01 15:15:06 +02:00
..
capabilities.h KVM: x86: Add support for user wait instructions 2019-09-24 14:34:20 +02:00
evmcs.c x86/kvm/nVMX: fix VMCLEAR when Enlightened VMCS is in use 2019-07-02 18:56:00 +02:00
evmcs.h KVM/Hyper-V/VMX: Add direct tlb flush support 2019-09-24 13:37:14 +02:00
nested.c KVM: nVMX: cleanup and fix host 64-bit mode checks 2019-09-25 19:22:33 +02:00
nested.h KVM: nVMX: Use descriptive names for VMCS sync functions and flags 2019-06-18 11:46:06 +02:00
ops.h KVM: VMX: Add error handling to VMREAD helper 2019-09-25 15:30:09 +02:00
pmu_intel.c kvm: vmx: Limit guest PMCs to those supported on the host 2019-10-01 15:15:06 +02:00
vmcs12.c KVM: nVMX: Move vmcs12 code to dedicated files 2018-12-14 12:34:30 +01:00
vmcs12.h KVM/arm updates for 5.3 2019-07-11 15:14:16 +02:00
vmcs_shadow_fields.h KVM: nVMX: shadow pin based execution controls 2019-06-18 17:10:50 +02:00
vmcs.h KVM: VMX: Leave preemption timer running when it's disabled 2019-06-18 17:10:46 +02:00
vmenter.S KVM: VMX: Fix and tweak the comments for VM-Enter 2019-08-22 10:09:27 +02:00
vmx.c KVM: VMX: Set VMENTER_L1D_FLUSH_NOT_REQUIRED if !X86_BUG_L1TF 2019-09-27 18:04:18 +02:00
vmx.h KVM: vmx: Emulate MSR IA32_UMWAIT_CONTROL 2019-09-24 14:34:36 +02:00