[PATCH 0/2] perf/x86: Fix races when loading guest mediated PMU context
From: Yosry Ahmed
Date: Tue Dec 01 2026 - 12:14:51 EST
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