aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing
diff options
context:
space:
mode:
authorJim Mattson <jmattson@google.com>2019-09-30 16:38:54 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2019-10-01 15:15:06 +0200
commite1fba49cc1e965a3dacd897367ba1e7b340cf0f4 (patch)
treeebcdba25065b7eae3fd591016a9d40aa673ac963 /tools/testing
parentkvm: x86, powerpc: do not allow clearing largepages debugfs entry (diff)
downloadlinux-dev-e1fba49cc1e965a3dacd897367ba1e7b340cf0f4.tar.xz
linux-dev-e1fba49cc1e965a3dacd897367ba1e7b340cf0f4.zip
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: f5132b01386b5a ("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>
Diffstat (limited to 'tools/testing')
0 files changed, 0 insertions, 0 deletions