pmu.h 632 B

12345678910111213141516171819202122
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __XEN_PMU_H
  3. #define __XEN_PMU_H
  4. #include <xen/interface/xenpmu.h>
  5. irqreturn_t xen_pmu_irq_handler(int irq, void *dev_id);
  6. #ifdef CONFIG_XEN_HAVE_VPMU
  7. void xen_pmu_init(int cpu);
  8. void xen_pmu_finish(int cpu);
  9. #else
  10. static inline void xen_pmu_init(int cpu) {}
  11. static inline void xen_pmu_finish(int cpu) {}
  12. #endif
  13. bool is_xen_pmu(int cpu);
  14. bool pmu_msr_read(unsigned int msr, uint64_t *val, int *err);
  15. bool pmu_msr_write(unsigned int msr, uint32_t low, uint32_t high, int *err);
  16. int pmu_apic_update(uint32_t reg);
  17. unsigned long long xen_read_pmc(int counter);
  18. #endif /* __XEN_PMU_H */