diff options
author | Oliver Upton <oliver.upton@linux.dev> | 2023-06-09 21:00:47 +0200 |
---|---|---|
committer | Oliver Upton <oliver.upton@linux.dev> | 2023-06-13 01:08:33 +0200 |
commit | f90f9360c3d7fbb731732fbb9a1228f55d178e10 (patch) | |
tree | ac03304049c6359316a9e1549a9e20ebdc8a9373 /include/kvm | |
parent | KVM: arm64: Make vCPU feature flags consistent VM-wide (diff) | |
download | linux-f90f9360c3d7fbb731732fbb9a1228f55d178e10.tar.xz linux-f90f9360c3d7fbb731732fbb9a1228f55d178e10.zip |
KVM: arm64: Rewrite IMPDEF PMU version as NI
KVM allows userspace to write an IMPDEF PMU version to the corresponding
32bit and 64bit ID register fields for the sake of backwards
compatibility with kernels that lacked commit 3d0dba5764b9 ("KVM: arm64:
PMU: Move the ID_AA64DFR0_EL1.PMUver limit to VM creation"). Plumbing
that IMPDEF PMU version through to the gues is getting in the way of
progress, and really doesn't any sense in the first place.
Bite the bullet and reinterpret the IMPDEF PMU version as NI (0) for
userspace writes. Additionally, spill the dirty details into a comment.
Link: https://lore.kernel.org/r/20230609190054.1542113-5-oliver.upton@linux.dev
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Diffstat (limited to 'include/kvm')
-rw-r--r-- | include/kvm/arm_pmu.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/kvm/arm_pmu.h b/include/kvm/arm_pmu.h index 1a6a695ca67a..0be60d5eebd7 100644 --- a/include/kvm/arm_pmu.h +++ b/include/kvm/arm_pmu.h @@ -93,7 +93,7 @@ void kvm_vcpu_pmu_restore_host(struct kvm_vcpu *vcpu); * Evaluates as true when emulating PMUv3p5, and false otherwise. */ #define kvm_pmu_is_3p5(vcpu) \ - (vcpu->kvm->arch.dfr0_pmuver.imp >= ID_AA64DFR0_EL1_PMUVer_V3P5) + (vcpu->kvm->arch.dfr0_pmuver >= ID_AA64DFR0_EL1_PMUVer_V3P5) u8 kvm_arm_pmu_get_pmuver_limit(void); |