[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <176597508848.510.8870965127520651682.tip-bot2@tip-bot2>
Date: Wed, 17 Dec 2025 12:38:08 -0000
From: "tip-bot2 for Mingwei Zhang" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Mingwei Zhang <mizhang@...gle.com>,
Sean Christopherson <seanjc@...gle.com>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
Xudong Hao <xudong.hao@...el.com>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: perf/core] perf/x86/core: Plumb mediated PMU capability from
x86_pmu to x86_pmu_cap
The following commit has been merged into the perf/core branch of tip:
Commit-ID: c8824a95d9673763a0a9d642f8c79b2162296923
Gitweb: https://git.kernel.org/tip/c8824a95d9673763a0a9d642f8c79b2162296923
Author: Mingwei Zhang <mizhang@...gle.com>
AuthorDate: Fri, 05 Dec 2025 16:16:47 -08:00
Committer: Peter Zijlstra <peterz@...radead.org>
CommitterDate: Wed, 17 Dec 2025 13:31:06 +01: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@...gle.com>
Signed-off-by: Sean Christopherson <seanjc@...gle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Tested-by: Xudong Hao <xudong.hao@...el.com>
Link: https://patch.msgid.link/20251206001720.468579-12-seanjc@google.com
---
arch/x86/events/core.c | 1 +
arch/x86/include/asm/perf_event.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c
index 3f78388..df7a32b 100644
--- a/arch/x86/events/core.c
+++ b/arch/x86/events/core.c
@@ -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);
diff --git a/arch/x86/include/asm/perf_event.h b/arch/x86/include/asm/perf_event.h
index fb7b261..0d9af41 100644
--- a/arch/x86/include/asm/perf_event.h
+++ b/arch/x86/include/asm/perf_event.h
@@ -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;
};
/*
Powered by blists - more mailing lists