]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
perf: Use EXPORT_SYMBOL_FOR_KVM() for the mediated APIs
authorPeter Zijlstra <peterz@infradead.org>
Wed, 17 Dec 2025 12:23:59 +0000 (13:23 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 19 Dec 2025 07:54:59 +0000 (08:54 +0100)
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20251208115156.GE3707891@noisy.programming.kicks-ass.net
arch/x86/events/core.c
include/asm-generic/Kbuild
kernel/events/core.c

index df7a32be9914be59031de85f5b276b6323f83de7..0ecac9495d74c82831d35cf1831e1846a5d448b4 100644 (file)
@@ -30,6 +30,7 @@
 #include <linux/device.h>
 #include <linux/nospec.h>
 #include <linux/static_call.h>
+#include <linux/kvm_types.h>
 
 #include <asm/apic.h>
 #include <asm/stacktrace.h>
@@ -1771,14 +1772,14 @@ void perf_load_guest_lvtpc(u32 guest_lvtpc)
                   APIC_DM_FIXED | PERF_GUEST_MEDIATED_PMI_VECTOR | masked);
        this_cpu_write(guest_lvtpc_loaded, true);
 }
-EXPORT_SYMBOL_FOR_MODULES(perf_load_guest_lvtpc, "kvm");
+EXPORT_SYMBOL_FOR_KVM(perf_load_guest_lvtpc);
 
 void perf_put_guest_lvtpc(void)
 {
        this_cpu_write(guest_lvtpc_loaded, false);
        apic_write(APIC_LVTPC, APIC_DM_NMI);
 }
-EXPORT_SYMBOL_FOR_MODULES(perf_put_guest_lvtpc, "kvm");
+EXPORT_SYMBOL_FOR_KVM(perf_put_guest_lvtpc);
 #endif /* CONFIG_PERF_GUEST_MEDIATED_PMU */
 
 static int
index 295c94a3ccc1c23c71a705cdea96445a5ad2ba5f..9aff61e7b8f27ce8993d83e7a11a045c6f9b13b1 100644 (file)
@@ -32,6 +32,7 @@ mandatory-y += irq_work.h
 mandatory-y += kdebug.h
 mandatory-y += kmap_size.h
 mandatory-y += kprobes.h
+mandatory-y += kvm_types.h
 mandatory-y += linkage.h
 mandatory-y += local.h
 mandatory-y += local64.h
index e6a4b1e34f848a2ae4b4010d9b4257d6d9792926..376fb07d869b8b50f811325f58c6555bb7dd71c7 100644 (file)
@@ -57,6 +57,7 @@
 #include <linux/task_work.h>
 #include <linux/percpu-rwsem.h>
 #include <linux/unwind_deferred.h>
+#include <linux/kvm_types.h>
 
 #include "internal.h"
 
@@ -6388,7 +6389,7 @@ int perf_create_mediated_pmu(void)
        atomic_inc(&nr_mediated_pmu_vms);
        return 0;
 }
-EXPORT_SYMBOL_GPL(perf_create_mediated_pmu);
+EXPORT_SYMBOL_FOR_KVM(perf_create_mediated_pmu);
 
 void perf_release_mediated_pmu(void)
 {
@@ -6397,7 +6398,7 @@ void perf_release_mediated_pmu(void)
 
        atomic_dec(&nr_mediated_pmu_vms);
 }
-EXPORT_SYMBOL_GPL(perf_release_mediated_pmu);
+EXPORT_SYMBOL_FOR_KVM(perf_release_mediated_pmu);
 
 /* When loading a guest's mediated PMU, schedule out all exclude_guest events. */
 void perf_load_guest_context(void)