kvm-x86-pmu-ops.h 933 B

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