]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
perf: Add generic exclude_guest support
authorKan Liang <kan.liang@linux.intel.com>
Sat, 6 Dec 2025 00:16:38 +0000 (16:16 -0800)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 17 Dec 2025 12:31:03 +0000 (13:31 +0100)
commitb9e52b11d2e5e403afaf69a7f8d6b29f8380ed38
tree002bbd2db8a051c3f4c40034aa64e188fa7ed7fb
parentb825444b6179eb071e66ca3da5ac12d4dbd808d5
perf: Add generic exclude_guest support

Only KVM knows the exact time when a guest is entering/exiting. Expose
two interfaces to KVM to switch the ownership of the PMU resources.

All the pinned events must be scheduled in first. Extend the
perf_event_sched_in() helper to support extra flag, e.g., EVENT_GUEST.

Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Mingwei Zhang <mizhang@google.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Xudong Hao <xudong.hao@intel.com>
Link: https://patch.msgid.link/20251206001720.468579-3-seanjc@google.com
kernel/events/core.c