diff options
author | Paolo Bonzini | 2019-10-01 15:18:26 +0200 |
---|---|---|
committer | Paolo Bonzini | 2019-10-03 12:07:59 +0200 |
commit | 24c29b7ac0da3e2eb589553f7a98bade6d0a0e60 (patch) | |
tree | 2c5caab599aefbcd498265f273429974bd46f954 /virt/kvm | |
parent | 6e06983dde969c15eb4fdab77f0eda8b18ea28e6 (diff) |
KVM: x86: omit absent pmu MSRs from MSR list
INTEL_PMC_MAX_GENERIC is currently 32, which exceeds the 18 contiguous
MSR indices reserved by Intel for event selectors. Since some machines
actually have MSRs past the reserved range, these may survive the
filtering of msrs_to_save array and would be rejected by KVM_GET/SET_MSR.
To avoid this, cut the list to whatever CPUID reports for the host's
architectural PMU.
Reported-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Suggested-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: Jim Mattson <jmattson@google.com>
Fixes: e2ada66ec418 ("kvm: x86: Add Intel PMU MSRs to msrs_to_save[]", 2019-08-21)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'virt/kvm')
0 files changed, 0 insertions, 0 deletions