summaryrefslogtreecommitdiff
path: root/tools/perf
diff options
context:
space:
mode:
authorKan Liang <kan.liang@linux.intel.com>2025-12-05 16:16:43 -0800
committerPeter Zijlstra <peterz@infradead.org>2025-12-17 13:31:05 +0100
commit42457a7fb6cacca83be4deaf202ac3e45830daf2 (patch)
tree3216c0a657d386407280f60e84662f9e6a203c05 /tools/perf
parent4593b4b6e218a0f21afbacc8124cf469d2d04094 (diff)
perf: Add APIs to load/put guest mediated PMU context
Add exported APIs to load/put a guest mediated PMU context. KVM will load the guest PMU shortly before VM-Enter, and put the guest PMU shortly after VM-Exit. On the perf side of things, schedule out all exclude_guest events when the guest context is loaded, and schedule them back in when the guest context is put. I.e. yield the hardware PMU resources to the guest, by way of KVM. Note, perf is only responsible for managing host context. KVM is responsible for loading/storing guest state to/from hardware. [sean: shuffle patches around, write changelog] Suggested-by: Sean Christopherson <seanjc@google.com> 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-8-seanjc@google.com
Diffstat (limited to 'tools/perf')
0 files changed, 0 insertions, 0 deletions