Re: [PATCH v2 0/2] KVM: arm64: Handle hidden FEAT_PMUv3 in ID_AA64DFR0_EL1
From: Marc Zyngier
Date: Sat Oct 03 2026 - 08:14:27 EST
On Wed, 30 Sep 2026 21:18:32 +0000, Colton Lewis wrote:
> When userspace initializes a vCPU with KVM_ARM_VCPU_PMU_V3 and hides
> FEAT_PMUv3 via ID_AA64DFR0_EL1.PMUVer, KVM hits a WARN_ONCE("Unknown PMU
> version 0") during reset_pmevtyper() and continues to expose PMU system
> registers instead of emulating guest accesses as UNDEF.
>
> Patch 1 handles ID_AA64DFR0_EL1_PMUVer_NI in __kvm_pmu_event_mask() and
> removes the redundant kvm_vcpu_has_pmu() check in reset_pmevtyper().
> Patch 2 updates pmu_visibility() to check ID_AA64DFR0_EL1.PMUVer via
> kvm_has_feat() so PMU registers are marked REG_HIDDEN when FEAT_PMUv3 is
> not advertised.
>
> [...]
Applied to next, thanks!
[1/2] KVM: arm64: Handle ID_AA64DFR0_EL1.PMUVer == NI in __kvm_pmu_event_mask()
commit: aa41a7c3beb59f9dac4e60c9cf1d146f6c9025c4
[2/2] KVM: arm64: Check ID_AA64DFR0_EL1.PMUVer in pmu_visibility()
commit: 517cdec3d4b28ccf5dae2dd03dee2a0a1eef1981
Cheers,
M.
--
Without deviation from the norm, progress is not possible.