Skip to content
Commit 6d88d0ee authored by Sean Christopherson's avatar Sean Christopherson
Browse files

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: default avatarSean Christopherson <seanjc@google.com>
parent bc965899
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment