xref: /linux/arch/x86/include/asm/kvm-x86-pmu-ops.h (revision fbf5df34a4dbcd09d433dd4f0916bf9b2ddb16de)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #if !defined(KVM_X86_PMU_OP) || \
3     !defined(KVM_X86_PMU_OP_OPTIONAL)
4 #error Missing one or more KVM_X86_PMU_OP #defines
5 #else
6 
7 /*
8  * KVM_X86_PMU_OP() and KVM_X86_PMU_OP_OPTIONAL() are used to help generate
9  * both DECLARE/DEFINE_STATIC_CALL() invocations and
10  * "static_call_update()" calls.
11  *
12  * KVM_X86_PMU_OP_OPTIONAL() can be used for those functions that can have
13  * a NULL definition.
14  */
15 KVM_X86_PMU_OP(rdpmc_ecx_to_pmc)
16 KVM_X86_PMU_OP(msr_idx_to_pmc)
17 KVM_X86_PMU_OP_OPTIONAL(check_rdpmc_early)
18 KVM_X86_PMU_OP(is_valid_msr)
19 KVM_X86_PMU_OP(get_msr)
20 KVM_X86_PMU_OP(set_msr)
21 KVM_X86_PMU_OP(refresh)
22 KVM_X86_PMU_OP(init)
23 KVM_X86_PMU_OP_OPTIONAL(reset)
24 KVM_X86_PMU_OP_OPTIONAL(deliver_pmi)
25 KVM_X86_PMU_OP_OPTIONAL(cleanup)
26 
27 KVM_X86_PMU_OP_OPTIONAL(write_global_ctrl)
28 KVM_X86_PMU_OP(mediated_load)
29 KVM_X86_PMU_OP(mediated_put)
30 #endif
31 
32 #undef KVM_X86_PMU_OP
33 #undef KVM_X86_PMU_OP_OPTIONAL
34