diff options
author | Sean Christopherson <seanjc@google.com> | 2023-06-06 18:02:05 -0700 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2023-08-02 16:44:36 -0700 |
commit | 6d88d0ee5de142921598e5c0041792bbd860913d (patch) | |
tree | 3007935e0c04149761293bab3900647955fb3ce0 /arch/x86/kvm/pmu.c | |
parent | bc9658999b3e44cbad964fe9fbab5a25bd4f5ed3 (diff) |
KVM: x86/pmu: Require nr fixed_pmc_events to match nr max fixed counters
Assert that the number of known fixed_pmc_events matches the max number of
fixed counters supported by KVM, and clean up related code.
Opportunistically extend setup_fixed_pmc_eventsel()'s use of
array_index_nospec() to cover fixed_counters, as nr_arch_fixed_counters is
set based on userspace input (but capped using KVM-controlled values).
Link: https://lore.kernel.org/r/20230607010206.1425277-4-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'arch/x86/kvm/pmu.c')
0 files changed, 0 insertions, 0 deletions