1*1921f3aaSLike Xu /* SPDX-License-Identifier: GPL-2.0 */ 2*1921f3aaSLike Xu #if !defined(KVM_X86_PMU_OP) || !defined(KVM_X86_PMU_OP_OPTIONAL) 3*1921f3aaSLike Xu BUILD_BUG_ON(1) 4*1921f3aaSLike Xu #endif 5*1921f3aaSLike Xu 6*1921f3aaSLike Xu /* 7*1921f3aaSLike Xu * KVM_X86_PMU_OP() and KVM_X86_PMU_OP_OPTIONAL() are used to help generate 8*1921f3aaSLike Xu * both DECLARE/DEFINE_STATIC_CALL() invocations and 9*1921f3aaSLike Xu * "static_call_update()" calls. 10*1921f3aaSLike Xu * 11*1921f3aaSLike Xu * KVM_X86_PMU_OP_OPTIONAL() can be used for those functions that can have 12*1921f3aaSLike Xu * a NULL definition, for example if "static_call_cond()" will be used 13*1921f3aaSLike Xu * at the call sites. 14*1921f3aaSLike Xu */ 15*1921f3aaSLike Xu KVM_X86_PMU_OP(pmc_perf_hw_id) 16*1921f3aaSLike Xu KVM_X86_PMU_OP(pmc_is_enabled) 17*1921f3aaSLike Xu KVM_X86_PMU_OP(pmc_idx_to_pmc) 18*1921f3aaSLike Xu KVM_X86_PMU_OP(rdpmc_ecx_to_pmc) 19*1921f3aaSLike Xu KVM_X86_PMU_OP(msr_idx_to_pmc) 20*1921f3aaSLike Xu KVM_X86_PMU_OP(is_valid_rdpmc_ecx) 21*1921f3aaSLike Xu KVM_X86_PMU_OP(is_valid_msr) 22*1921f3aaSLike Xu KVM_X86_PMU_OP(get_msr) 23*1921f3aaSLike Xu KVM_X86_PMU_OP(set_msr) 24*1921f3aaSLike Xu KVM_X86_PMU_OP(refresh) 25*1921f3aaSLike Xu KVM_X86_PMU_OP(init) 26*1921f3aaSLike Xu KVM_X86_PMU_OP(reset) 27*1921f3aaSLike Xu KVM_X86_PMU_OP_OPTIONAL(deliver_pmi) 28*1921f3aaSLike Xu KVM_X86_PMU_OP_OPTIONAL(cleanup) 29*1921f3aaSLike Xu 30*1921f3aaSLike Xu #undef KVM_X86_PMU_OP 31*1921f3aaSLike Xu #undef KVM_X86_PMU_OP_OPTIONAL 32