KVM: arm64: PMU: Move the ID_AA64DFR0_EL1.PMUver limit to VM creation
authorMarc Zyngier <maz@kernel.org>
Sun, 13 Nov 2022 16:38:26 +0000 (16:38 +0000)
committerMarc Zyngier <maz@kernel.org>
Sat, 19 Nov 2022 12:56:39 +0000 (12:56 +0000)
commit3d0dba5764b94308b8c4257ad64e383f11ce0c92
treee8222c5ada162482953e8094ff9408008b9e60e7
parent26d2d0594d7016dbcbce4038aa202c2858d5a944
KVM: arm64: PMU: Move the ID_AA64DFR0_EL1.PMUver limit to VM creation

As further patches will enable the selection of a PMU revision
from userspace, sample the supported PMU revision at VM creation
time, rather than building each time the ID_AA64DFR0_EL1 register
is accessed.

This shouldn't result in any change in behaviour.

Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221113163832.3154370-11-maz@kernel.org
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/arm.c
arch/arm64/kvm/pmu-emul.c
arch/arm64/kvm/sys_regs.c
include/kvm/arm_pmu.h