All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] KVM: arm64: Prevent spurious PMU accesses when no
@ 2021-01-26 15:15 ` Marc Zyngier
  0 siblings, 0 replies; 12+ messages in thread
From: Marc Zyngier @ 2021-01-26 15:15 UTC (permalink / raw)
  To: linux-arm-kernel, kvmarm; +Cc: Andre Przywara, kernel-team

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!

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(-)

-- 
2.29.2

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-01-28 18:44 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-26 15:15 [PATCH 0/2] KVM: arm64: Prevent spurious PMU accesses when no Marc Zyngier
2021-01-26 15:15 ` Marc Zyngier
2021-01-26 15:15 ` [PATCH 1/2] KVM: arm64: Turn kvm_arm_support_pmu_v3() into a static key Marc Zyngier
2021-01-26 15:15   ` Marc Zyngier
2021-01-28 15:16   ` Andre Przywara
2021-01-28 15:16     ` Andre Przywara
2021-01-28 16:56     ` Marc Zyngier
2021-01-28 16:56       ` Marc Zyngier
2021-01-28 18:42       ` Andre Przywara
2021-01-28 18:42         ` Andre Przywara
2021-01-26 15:15 ` [PATCH 2/2] KVM: arm64: Don't access PMSELR_EL0/PMUSERENR_EL0 when no PMU is available Marc Zyngier
2021-01-26 15:15   ` Marc Zyngier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.