diff options
| author | 2026-09-30 21:18:33 +0000 | |
|---|---|---|
| committer | 2026-10-03 13:11:42 +0100 | |
| commit | aa41a7c3beb59f9dac4e60c9cf1d146f6c9025c4 (patch) | |
| tree | 2d602d6182bc24250867f658d4d1a270e083972f /scripts/Makefile.thinlto | |
| parent | KVM: arm64: Remove PAGE_SIZE alignment for hyp event ELF sections (diff) | |
KVM: arm64: Handle ID_AA64DFR0_EL1.PMUVer == NI in __kvm_pmu_event_mask()
When userspace initializes a vCPU with KVM_ARM_VCPU_PMU_V3 but sets
ID_AA64DFR0_EL1.PMUVer to NI (0) or IMP_DEF (0xf, which is sanitized to
NI), resetting the vCPU invokes reset_pmevtyper() and calls
kvm_pmu_evtyper_mask(). Because __kvm_pmu_event_mask() does not handle
ID_AA64DFR0_EL1_PMUVer_NI, it triggers a WARN_ONCE("Unknown PMU version
0").
Explicitly handle ID_AA64DFR0_EL1_PMUVer_NI in __kvm_pmu_event_mask() by
returning an event mask of 0, and drop the redundant kvm_vcpu_has_pmu()
check in reset_pmevtyper().
Fixes: bc512d6a9b92 ("KVM: arm64: Make PMEVTYPER<n>_EL0.NSH RES0 if EL2 isn't advertised")
Suggested-by: Oliver Upton <oupton@kernel.org>
Assisted-by: LLM
Signed-off-by: Colton Lewis <coltonlewis@google.com>
Link: https://patch.msgid.link/20260930211834.2773546-2-coltonlewis@google.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
