/kernel/linux/linux-5.10/arch/x86/kvm/ |
H A D | pmu.h | 27 unsigned int (*pmc_perf_hw_id)(struct kvm_pmc *pmc); 29 bool (*pmc_is_enabled)(struct kvm_pmc *pmc); 30 struct kvm_pmc *(*pmc_idx_to_pmc)(struct kvm_pmu *pmu, int pmc_idx); 31 struct kvm_pmc *(*rdpmc_ecx_to_pmc)(struct kvm_vcpu *vcpu, 33 struct kvm_pmc *(*msr_idx_to_pmc)(struct kvm_vcpu *vcpu, u32 msr); 43 static inline u64 pmc_bitmask(struct kvm_pmc *pmc) in pmc_bitmask() 50 static inline u64 pmc_read_counter(struct kvm_pmc *pmc) in pmc_read_counter() 62 static inline void pmc_release_perf_event(struct kvm_pmc *pmc) in pmc_release_perf_event() 72 static inline void pmc_stop_counter(struct kvm_pmc *pmc) in pmc_stop_counter() 80 static inline bool pmc_is_gp(struct kvm_pmc *pm [all...] |
H A D | pmu.c | 28 * - Each perf counter is defined as "struct kvm_pmc"; 44 * code. Each pmc, stored in kvm_pmc.idx field, is unique across 64 struct kvm_pmc *pmc = perf_event->overflow_handler_context; in kvm_perf_overflow() 77 struct kvm_pmc *pmc = perf_event->overflow_handler_context; in kvm_perf_overflow_intr() 99 static void pmc_reprogram_counter(struct kvm_pmc *pmc, u32 type, in pmc_reprogram_counter() 144 static void pmc_pause_counter(struct kvm_pmc *pmc) in pmc_pause_counter() 156 static bool pmc_resume_counter(struct kvm_pmc *pmc) in pmc_resume_counter() 181 void reprogram_gp_counter(struct kvm_pmc *pmc, u64 eventsel) in reprogram_gp_counter() 241 void reprogram_fixed_counter(struct kvm_pmc *pmc, u8 ctrl, int idx) in reprogram_fixed_counter() 279 struct kvm_pmc *pm in reprogram_counter() [all...] |
/kernel/linux/linux-6.6/arch/x86/kvm/ |
H A D | pmu.h | 22 bool (*hw_event_available)(struct kvm_pmc *pmc); 23 struct kvm_pmc *(*pmc_idx_to_pmc)(struct kvm_pmu *pmu, int pmc_idx); 24 struct kvm_pmc *(*rdpmc_ecx_to_pmc)(struct kvm_vcpu *vcpu, 26 struct kvm_pmc *(*msr_idx_to_pmc)(struct kvm_vcpu *vcpu, u32 msr); 58 static inline u64 pmc_bitmask(struct kvm_pmc *pmc) in pmc_bitmask() 65 static inline u64 pmc_read_counter(struct kvm_pmc *pmc) in pmc_read_counter() 77 static inline void pmc_write_counter(struct kvm_pmc *pmc, u64 val) in pmc_write_counter() 83 static inline bool pmc_is_gp(struct kvm_pmc *pmc) in pmc_is_gp() 88 static inline bool pmc_is_fixed(struct kvm_pmc *pmc) in pmc_is_fixed() 103 static inline struct kvm_pmc *get_gp_pm [all...] |
H A D | pmu.c | 48 * - Each perf counter is defined as "struct kvm_pmc"; 66 * code. Each pmc, stored in kvm_pmc.idx field, is unique across 96 static inline void __kvm_perf_overflow(struct kvm_pmc *pmc, bool in_pmi) in __kvm_perf_overflow() 127 struct kvm_pmc *pmc = perf_event->overflow_handler_context; in kvm_perf_overflow() 142 static u64 pmc_get_pebs_precise_level(struct kvm_pmc *pmc) in pmc_get_pebs_precise_level() 164 static int pmc_reprogram_counter(struct kvm_pmc *pmc, u32 type, u64 config, in pmc_reprogram_counter() 218 static void pmc_pause_counter(struct kvm_pmc *pmc) in pmc_pause_counter() 231 static bool pmc_resume_counter(struct kvm_pmc *pmc) in pmc_resume_counter() 253 static void pmc_release_perf_event(struct kvm_pmc *pmc) in pmc_release_perf_event() 263 static void pmc_stop_counter(struct kvm_pmc *pm [all...] |
/kernel/linux/linux-5.10/arch/x86/kvm/svm/ |
H A D | pmu.c | 114 static inline struct kvm_pmc *get_gp_pmc_amd(struct kvm_pmu *pmu, u32 msr, in get_gp_pmc_amd() 145 static unsigned int amd_pmc_perf_hw_id(struct kvm_pmc *pmc) in amd_pmc_perf_hw_id() 177 static bool amd_pmc_is_enabled(struct kvm_pmc *pmc) in amd_pmc_is_enabled() 182 static struct kvm_pmc *amd_pmc_idx_to_pmc(struct kvm_pmu *pmu, int pmc_idx) in amd_pmc_idx_to_pmc() 209 static struct kvm_pmc *amd_rdpmc_ecx_to_pmc(struct kvm_vcpu *vcpu, in amd_rdpmc_ecx_to_pmc() 213 struct kvm_pmc *counters; in amd_rdpmc_ecx_to_pmc() 229 static struct kvm_pmc *amd_msr_idx_to_pmc(struct kvm_vcpu *vcpu, u32 msr) in amd_msr_idx_to_pmc() 232 struct kvm_pmc *pmc; in amd_msr_idx_to_pmc() 243 struct kvm_pmc *pmc; in amd_pmu_get_msr() 265 struct kvm_pmc *pm in amd_pmu_set_msr() [all...] |
/kernel/linux/linux-6.6/arch/x86/kvm/svm/ |
H A D | pmu.c | 28 static struct kvm_pmc *amd_pmc_idx_to_pmc(struct kvm_pmu *pmu, int pmc_idx) in amd_pmc_idx_to_pmc() 38 static inline struct kvm_pmc *get_gp_pmc_amd(struct kvm_pmu *pmu, u32 msr, in get_gp_pmc_amd() 76 static bool amd_hw_event_available(struct kvm_pmc *pmc) in amd_hw_event_available() 91 static struct kvm_pmc *amd_rdpmc_ecx_to_pmc(struct kvm_vcpu *vcpu, in amd_rdpmc_ecx_to_pmc() 97 static struct kvm_pmc *amd_msr_idx_to_pmc(struct kvm_vcpu *vcpu, u32 msr) in amd_msr_idx_to_pmc() 100 struct kvm_pmc *pmc; in amd_msr_idx_to_pmc() 134 struct kvm_pmc *pmc; in amd_pmu_get_msr() 156 struct kvm_pmc *pmc; in amd_pmu_set_msr()
|
/kernel/linux/linux-5.10/arch/x86/kvm/vmx/ |
H A D | pmu_intel.c | 45 struct kvm_pmc *pmc; in reprogram_fixed_counters() 71 static unsigned int intel_pmc_perf_hw_id(struct kvm_pmc *pmc) in intel_pmc_perf_hw_id() 103 static bool intel_pmc_is_enabled(struct kvm_pmc *pmc) in intel_pmc_is_enabled() 113 static struct kvm_pmc *intel_pmc_idx_to_pmc(struct kvm_pmu *pmu, int pmc_idx) in intel_pmc_idx_to_pmc() 137 static struct kvm_pmc *intel_rdpmc_ecx_to_pmc(struct kvm_vcpu *vcpu, in intel_rdpmc_ecx_to_pmc() 142 struct kvm_pmc *counters; in intel_rdpmc_ecx_to_pmc() 172 static inline struct kvm_pmc *get_fw_gp_pmc(struct kvm_pmu *pmu, u32 msr) in get_fw_gp_pmc() 202 static struct kvm_pmc *intel_msr_idx_to_pmc(struct kvm_vcpu *vcpu, u32 msr) in intel_msr_idx_to_pmc() 205 struct kvm_pmc *pmc; in intel_msr_idx_to_pmc() 217 struct kvm_pmc *pm in intel_pmu_get_msr() [all...] |
/kernel/linux/linux-6.6/arch/arm64/kvm/ |
H A D | pmu-emul.c | 26 static void kvm_pmu_create_perf_event(struct kvm_pmc *pmc); 27 static void kvm_pmu_release_perf_event(struct kvm_pmc *pmc); 29 static struct kvm_vcpu *kvm_pmc_to_vcpu(const struct kvm_pmc *pmc) in kvm_pmc_to_vcpu() 34 static struct kvm_pmc *kvm_vcpu_idx_to_pmc(struct kvm_vcpu *vcpu, int cnt_idx) in kvm_vcpu_idx_to_pmc() 67 static bool kvm_pmc_is_64bit(struct kvm_pmc *pmc) in kvm_pmc_is_64bit() 73 static bool kvm_pmc_has_64bit_overflow(struct kvm_pmc *pmc) in kvm_pmc_has_64bit_overflow() 81 static bool kvm_pmu_counter_can_chain(struct kvm_pmc *pmc) in kvm_pmu_counter_can_chain() 97 static u64 kvm_pmu_get_pmc_value(struct kvm_pmc *pmc) in kvm_pmu_get_pmc_value() 132 static void kvm_pmu_set_pmc_value(struct kvm_pmc *pmc, u64 val, bool force) in kvm_pmu_set_pmc_value() 177 static void kvm_pmu_release_perf_event(struct kvm_pmc *pm [all...] |
/kernel/linux/linux-5.10/arch/arm64/kvm/ |
H A D | pmu-emul.c | 19 static void kvm_pmu_stop_counter(struct kvm_vcpu *vcpu, struct kvm_pmc *pmc); 49 static struct kvm_vcpu *kvm_pmc_to_vcpu(struct kvm_pmc *pmc) in kvm_pmc_to_vcpu() 64 static bool kvm_pmu_pmc_is_chained(struct kvm_pmc *pmc) in kvm_pmu_pmc_is_chained() 87 static struct kvm_pmc *kvm_pmu_get_canonical_pmc(struct kvm_pmc *pmc) in kvm_pmu_get_canonical_pmc() 95 static struct kvm_pmc *kvm_pmu_get_alternate_pmc(struct kvm_pmc *pmc) in kvm_pmu_get_alternate_pmc() 129 struct kvm_pmc *pmc) in kvm_pmu_get_pair_counter_value() 167 struct kvm_pmc *pmc = &pmu->pmc[select_idx]; in kvm_pmu_get_counter_value() 202 static void kvm_pmu_release_perf_event(struct kvm_pmc *pm [all...] |
/kernel/linux/linux-6.6/arch/x86/kvm/vmx/ |
H A D | pmu_intel.c | 73 struct kvm_pmc *pmc; in reprogram_fixed_counters() 92 static struct kvm_pmc *intel_pmc_idx_to_pmc(struct kvm_pmu *pmu, int pmc_idx) in intel_pmc_idx_to_pmc() 104 static bool intel_hw_event_available(struct kvm_pmc *pmc) in intel_hw_event_available() 139 static struct kvm_pmc *intel_rdpmc_ecx_to_pmc(struct kvm_vcpu *vcpu, in intel_rdpmc_ecx_to_pmc() 144 struct kvm_pmc *counters; in intel_rdpmc_ecx_to_pmc() 174 static inline struct kvm_pmc *get_fw_gp_pmc(struct kvm_pmu *pmu, u32 msr) in get_fw_gp_pmc() 231 static struct kvm_pmc *intel_msr_idx_to_pmc(struct kvm_vcpu *vcpu, u32 msr) in intel_msr_idx_to_pmc() 234 struct kvm_pmc *pmc; in intel_msr_idx_to_pmc() 351 struct kvm_pmc *pmc; in intel_pmu_get_msr() 394 struct kvm_pmc *pm in intel_pmu_set_msr() [all...] |
/kernel/linux/linux-6.6/arch/riscv/kvm/ |
H A D | vcpu_pmu.c | 36 static u64 kvm_pmu_get_sample_period(struct kvm_pmc *pmc) in kvm_pmu_get_sample_period() 77 static void kvm_pmu_release_perf_event(struct kvm_pmc *pmc) in kvm_pmu_release_perf_event() 203 struct kvm_pmc *pmc; in pmu_ctr_read() 232 static int kvm_pmu_create_perf_event(struct kvm_pmc *pmc, struct perf_event_attr *attr, in kvm_pmu_create_perf_event() 344 struct kvm_pmc *pmc; in kvm_riscv_vcpu_pmu_ctr_start() 401 struct kvm_pmc *pmc; in kvm_riscv_vcpu_pmu_ctr_stop() 466 struct kvm_pmc *pmc = NULL; in kvm_riscv_vcpu_pmu_ctr_cfg_match() 549 struct kvm_pmc *pmc; in kvm_riscv_vcpu_pmu_init() 614 struct kvm_pmc *pmc; in kvm_riscv_vcpu_pmu_deinit()
|
/kernel/linux/linux-6.6/arch/riscv/include/asm/ |
H A D | kvm_vcpu_pmu.h | 30 struct kvm_pmc { struct 43 struct kvm_pmc pmc[RISCV_KVM_MAX_COUNTERS];
|
/kernel/linux/linux-5.10/include/kvm/ |
H A D | arm_pmu.h | 18 struct kvm_pmc { struct 25 struct kvm_pmc pmc[ARMV8_PMU_MAX_COUNTERS];
|
/kernel/linux/linux-6.6/include/kvm/ |
H A D | arm_pmu.h | 17 struct kvm_pmc { struct 30 struct kvm_pmc pmc[ARMV8_PMU_MAX_COUNTERS];
|
/kernel/linux/linux-5.10/arch/x86/include/asm/ |
H A D | kvm_host.h | 416 struct kvm_pmc { struct 445 struct kvm_pmc gp_counters[INTEL_PMC_MAX_GENERIC]; 446 struct kvm_pmc fixed_counters[INTEL_PMC_MAX_FIXED];
|
/kernel/linux/linux-6.6/arch/x86/include/asm/ |
H A D | kvm_host.h | 490 struct kvm_pmc { struct 529 struct kvm_pmc gp_counters[KVM_INTEL_PMC_MAX_GENERIC]; 530 struct kvm_pmc fixed_counters[KVM_PMC_MAX_FIXED];
|