mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 00:53:34 +02:00
perf/x86/core: Plumb mediated PMU capability from x86_pmu to x86_pmu_cap
Plumb mediated PMU capability to x86_pmu_cap in order to let any kernel entity such as KVM know that host PMU support mediated PMU mode and has the implementation. 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-12-seanjc@google.com
This commit is contained in:
parent
b456a6ba57
commit
c8824a95d9
|
|
@ -3110,6 +3110,7 @@ void perf_get_x86_pmu_capability(struct x86_pmu_capability *cap)
|
|||
cap->events_mask = (unsigned int)x86_pmu.events_maskl;
|
||||
cap->events_mask_len = x86_pmu.events_mask_len;
|
||||
cap->pebs_ept = x86_pmu.pebs_ept;
|
||||
cap->mediated = !!(pmu.capabilities & PERF_PMU_CAP_MEDIATED_VPMU);
|
||||
}
|
||||
EXPORT_SYMBOL_FOR_KVM(perf_get_x86_pmu_capability);
|
||||
|
||||
|
|
|
|||
|
|
@ -301,6 +301,7 @@ struct x86_pmu_capability {
|
|||
unsigned int events_mask;
|
||||
int events_mask_len;
|
||||
unsigned int pebs_ept :1;
|
||||
unsigned int mediated :1;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user