Kernel KVM virtualization development
 help / color / mirror / Atom feed
* [PATCH 0/2] perf/x86: Fix races when loading guest mediated PMU context
@ 2026-12-01 17:14 Yosry Ahmed
  2026-12-01 17:14 ` [PATCH 1/2] perf/x86: Prevent races between NMIs and switching LVTPC Yosry Ahmed
  2026-12-01 17:14 ` [PATCH 2/2] KVM: x86/pmu: Clear PERF_GLOBAL_CTRL after switching to guest LVTPC Yosry Ahmed
  0 siblings, 2 replies; 3+ messages in thread
From: Yosry Ahmed @ 2026-12-01 17:14 UTC (permalink / raw)
  To: Peter Zijlstra, Sean Christopherson
  Cc: Ingo Molnar, Arnaldo Carvalho de Melo, Namhyung Kim, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Ian Rogers, Adrian Hunter,
	James Clark, Paolo Bonzini, x86, Dapeng Mi, Mingwei Zhang,
	linux-perf-users, kvm, linux-kernel, Yosry Ahmed

Fix a couple of race conditions that can happen while loading the guest
mediated PMU context, resulting in either clobbered PMI handling or
leaking host events into guest counters.

The series is based on tip/perf/urgent.

An LLM was used to reproduce both issues (using kprobe + BPF to force
races), and verify the fixes.

Yosry Ahmed (2):
  perf/x86: Prevent races between NMIs and switching LVTPC
  KVM: x86/pmu: Clear PERF_GLOBAL_CTRL after switching to guest LVTPC

 arch/x86/events/core.c | 13 ++++++++++++-
 arch/x86/kvm/pmu.c     |  8 ++++++--
 2 files changed, 18 insertions(+), 3 deletions(-)


base-commit: 67b34211a9eb103aba474bc179fab3dd2912f07e
-- 
2.56.1.839.g22a8290db9-goog


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

end of thread, other threads:[~2026-12-01 17:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 17:14 [PATCH 0/2] perf/x86: Fix races when loading guest mediated PMU context Yosry Ahmed
2026-12-01 17:14 ` [PATCH 1/2] perf/x86: Prevent races between NMIs and switching LVTPC Yosry Ahmed
2026-12-01 17:14 ` [PATCH 2/2] KVM: x86/pmu: Clear PERF_GLOBAL_CTRL after switching to guest LVTPC Yosry Ahmed

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox