Searched full:pmu (Results 1 – 16 of 16) sorted by relevance
/kvm-unit-tests/lib/x86/ |
H A D | pmu.c | 1 #include "pmu.h" 3 struct pmu_caps pmu; variable 7 pmu.is_intel = is_intel(); in pmu_init() 9 if (pmu.is_intel) { in pmu_init() 10 pmu.version = this_cpu_property(X86_PROPERTY_PMU_VERSION); in pmu_init() 12 if (pmu.version > 1) { in pmu_init() 13 pmu.nr_fixed_counters = this_cpu_property(X86_PROPERTY_PMU_NR_FIXED_COUNTERS); in pmu_init() 14 pmu.fixed_counter_width = this_cpu_property(X86_PROPERTY_PMU_FIXED_COUNTERS_BIT_WIDTH); in pmu_init() 17 pmu.nr_gp_counters = this_cpu_property(X86_PROPERTY_PMU_NR_GP_COUNTERS); in pmu_init() 18 pmu.gp_counter_width = this_cpu_property(X86_PROPERTY_PMU_GP_COUNTERS_BIT_WIDTH); in pmu_init() [all …]
|
H A D | pmu.h | 78 extern struct pmu_caps pmu; 84 if (pmu.msr_gp_counter_base == MSR_F15H_PERF_CTR0) in MSR_GP_COUNTERx() 85 return pmu.msr_gp_counter_base + 2 * i; in MSR_GP_COUNTERx() 87 return pmu.msr_gp_counter_base + i; in MSR_GP_COUNTERx() 92 if (pmu.msr_gp_event_select_base == MSR_F15H_PERF_CTL0) in MSR_GP_EVENT_SELECTx() 93 return pmu.msr_gp_event_select_base + 2 * i; in MSR_GP_EVENT_SELECTx() 95 return pmu.msr_gp_event_select_base + i; in MSR_GP_EVENT_SELECTx() 100 return !pmu.is_intel || !!pmu.version; in this_cpu_has_pmu() 105 return pmu.version > 1; in this_cpu_has_perf_global_ctrl() 110 return pmu.version > 1; in this_cpu_has_perf_global_status() [all …]
|
H A D | setup.c | 18 #include "pmu.h"
|
/kvm-unit-tests/arm/ |
H A D | unittests.cfg | 48 # Test PMU support 49 [pmu-cycle-counter] 50 file = pmu.flat 51 groups = pmu 53 kvmtool_params = --pmu 55 [pmu-event-introspection] 56 file = pmu.flat 57 groups = pmu 59 test_args = pmu-event-introspection 60 kvmtool_params = --pmu [all …]
|
H A D | pmu.c | 2 * Test the ARM Performance Monitors Unit (PMU). 43 /* Some PMU events */ 86 struct pmu { struct 98 static struct pmu pmu; argument 176 set_pmcr(pmu.pmcr_ro | PMU_PMCR_LC | PMU_PMCR_C | PMU_PMCR_P); in pmu_reset() 284 if (!pmu.nb_implemented_counters) { in test_event_introspection() 295 if (pmu.version >= ID_DFR0_PMU_V3_8_1) { in test_event_introspection() 373 set_pmcr(pmu.pmcr_ro | PMU_PMCR_LC | PMU_PMCR_C | PMU_PMCR_P); in pmu_reset() 388 if (!pmu.nb_implemented_counters) { in test_event_counter_config() 432 if (pmu.nb_implemented_counters < nb_events) { in satisfy_prerequisites() [all …]
|
H A D | Makefile.common | 10 tests-common += $(TEST_DIR)/pmu.$(exe)
|
/kvm-unit-tests/x86/ |
H A D | pmu.c | 4 #include "x86/pmu.h" 195 u32 global_ctl = pmu.msr_global_ctl; in __precise_loop() 231 if (pmu.is_intel && this_cpu_has_perf_global_ctrl()) { in adjust_events_range() 270 if (!pmu.is_intel) in is_gp() 279 if (pmu.is_intel) in event_to_global_idx() 280 return cnt->ctr - (is_gp(cnt) ? pmu.msr_gp_counter_base : in event_to_global_idx() 283 if (pmu.msr_gp_counter_base == MSR_F15H_PERF_CTR0) in event_to_global_idx() 284 return (cnt->ctr - pmu.msr_gp_counter_base) / 2; in event_to_global_idx() 286 return cnt->ctr - pmu.msr_gp_counter_base; in event_to_global_idx() 313 wrmsr(pmu.msr_global_ctl, rdmsr(pmu.msr_global_ctl) | BIT_ULL(cnt->idx)); in global_enable() [all …]
|
H A D | pmu_lbr.c | 3 #include "x86/pmu.h" 51 if (!pmu.is_intel) { in main() 57 report_skip("No pmu is detected!"); in main() 71 printf("PMU version: %d\n", pmu.version); in main()
|
H A D | pmu_pebs.c | 3 #include "x86/pmu.h" 218 for (idx = 0; idx < pmu.nr_fixed_counters; idx++) { in pebs_enable() 366 for (idx = 0; has_baseline && idx < pmu.nr_fixed_counters; idx++) in check_pebs_counters() 372 for (idx = 0; has_baseline && idx < pmu.nr_fixed_counters; idx++) in check_pebs_counters() 384 * 2. From a core pmu perspective, the vCPU and pCPU models are not same; 393 max_nr_gp_events = MIN(pmu.nr_gp_counters, ARRAY_SIZE(intel_arch_events)); in main() 395 printf("PMU version: %d\n", pmu.version); in main() 401 if (!pmu.is_intel) { in main() 405 report_skip("PEBS required PMU version 2, reported version is %d", pmu.version); in main() 416 printf("PEBS GP counters: %d\n", pmu.nr_gp_counters); in main() [all …]
|
H A D | unittests.cfg | 188 [pmu] 189 file = pmu.flat 193 groups = pmu 201 groups = pmu 209 groups = pmu
|
H A D | Makefile.common | 25 cflatobjs += lib/x86/pmu.o 84 $(TEST_DIR)/s3.$(exe) $(TEST_DIR)/pmu.$(exe) $(TEST_DIR)/setjmp.$(exe) \
|
H A D | vmx_tests.c | 12 #include "pmu.h"
|
/kvm-unit-tests/ |
H A D | .gitlab-ci.yml | 44 pmu-cycle-counter 45 pmu-event-counter-config 46 pmu-sw-incr 104 pmu-cycle-counter 105 pmu-event-counter-config 106 pmu-sw-incr 139 pci-test pmu-cycle-counter gicv2-ipi gicv2-mmio gicv3-ipi gicv2-active
|
H A D | errata.txt | 5 9e3f7a296940 : 4.9 : arm64: KVM: pmu: Fix AArch32 cycle counter access
|
/kvm-unit-tests/x86/efi/ |
H A D | run | 49 # run in UEFI, some test cases, e.g. `x86/pmu.c`, require more free memory. A
|
/kvm-unit-tests/powerpc/ |
H A D | sprs.c | 152 /* POWER4+ PMU, should confirm with PPC970 */ 558 /* Prevent PMU interrupt */ in main()
|