Skip to content

KVM: arm64: Prevent spurious PMU accesses when no

Marc Zyngier kvmarm linux-arm-kernel 2 versions – Applied

Status from this message: Applied to kvmarm-master/fixes, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 3 repliesApplied
  2. v12 patches 3 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/2KVM: arm64: Turn kvm_arm_support_pmu_v3() into a static keyarch/arm64/kvm/perf.c arch/arm64/kvm/pmu-emul.c include/kvm/arm_pmu.h+17 -121 reply
2/2KVM: arm64: Don't access PMSELR_EL0/PMUSERENR_EL0 when no PMU is availablearch/arm64/kernel/image-vars.h arch/arm64/kvm/hyp/include/hyp/switch.h+9 -31 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchAlexandru Elisei
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] KVM: arm64: Prevent spurious PMU accesses when no

Yet another PMU bug that is only likely to hit under Nested Virt: we unconditionally access PMU registers without checking whether it actually is present.

Given that we already have a predicate for this, promote it to a static key, and use that in the world switch.

Thanks to Andre for the heads up!

* From v1:
- Fix compilation when CONFIG_ARM_PMU isn't selected

Marc Zyngier (2):
KVM: arm64: Turn kvm_arm_support_pmu_v3() into a static key
KVM: arm64: Don't access PMSELR_EL0/PMUSERENR_EL0 when no PMU is
available

 arch/arm64/kernel/image-vars.h          |  3 +++
 arch/arm64/kvm/hyp/include/hyp/switch.h |  9 ++++++---
 arch/arm64/kvm/perf.c                   | 10 ++++++++++
 arch/arm64/kvm/pmu-emul.c               | 10 ----------
 include/kvm/arm_pmu.h                   |  9 +++++++--
 5 files changed, 26 insertions(+), 15 deletions(-)
Signature · 6 lines
2.29.2

_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm