linux/tools/testing/selftests/kvm
Song Gao 11c8401927 KVM: LoongArch: selftests: Add basic PMU event counting test
Introduce a basic PMU test that verifies hardware event counting for
four performance counters. The test enables the events for CPU cycles,
instructions retired, branch instructions, and branch misses, runs a
fixed number of loops, and checks that the counter values fall within
expected ranges. It also validates that the host supports PMU and that
the VM feature is enabled.

Signed-off-by: Song Gao <gaosong@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2026-04-09 18:56:37 +08:00
..
arm64 Merge branch kvm-arm64/resx into kvmarm-master/next 2026-02-05 09:17:48 +00:00
include KVM: LoongArch: selftests: Add basic PMU event counting test 2026-04-09 18:56:37 +08:00
lib KVM: LoongArch: selftests: Add basic PMU event counting test 2026-04-09 18:56:37 +08:00
loongarch KVM: LoongArch: selftests: Add basic PMU event counting test 2026-04-09 18:56:37 +08:00
riscv RISC-V: KVM: selftests: Add Zalasr extensions to get-reg-list test 2026-02-06 19:05:29 +05:30
s390 KVM: s390: selftests: Add IRQ routing address offset tests 2026-03-16 16:56:39 +01:00
x86 KVM: selftests: Verify SEV+ guests can read and write EFER, CR0, CR4, and CR8 2026-03-12 17:31:53 +01:00
.gitignore KVM: selftests: Provide empty 'all' and 'clean' targets for unsupported ARCHs 2024-12-18 14:15:03 -08:00
access_tracking_perf_test.c KVM: riscv: selftests: Add missing headers for new testcases 2025-09-16 10:53:55 +05:30
arch_timer.c KVM: selftests: Convert arch_timer tests to common helpers to pin task 2025-07-09 09:33:42 -07:00
coalesced_io_test.c KVM: selftests: Add a test for coalesced MMIO (and PIO on x86) 2024-08-29 19:38:33 -07:00
config KVM: selftests: Add CONFIG_EVENTFD for irqfd selftest 2025-07-10 06:20:20 -07:00
demand_paging_test.c KVM selftests treewide updates for 6.10: 2024-05-12 03:18:11 -04:00
dirty_log_perf_test.c KVM: arm64: selftests: Create a VGICv3 for 'default' VMs 2025-09-24 19:23:32 +01:00
dirty_log_test.c KVM: arm64: selftests: Create a VGICv3 for 'default' VMs 2025-09-24 19:23:32 +01:00
get-reg-list.c KVM: arm64: selftests: Provide helper for getting default vCPU target 2025-09-24 19:23:32 +01:00
guest_memfd_test.c KVM: selftests: Increase 'maxnode' for guest_memfd tests 2026-03-11 18:41:10 +01:00
guest_print_test.c KVM: selftests: Open code vcpu_run() equivalent in guest_printf test 2024-08-29 16:25:06 -07:00
hardware_disable_test.c KVM: selftests: Remove unused macro in the hardware disable test 2024-10-30 13:51:46 -07:00
irqfd_test.c KVM: selftests: Fix irqfd_test for non-x86 architectures 2025-10-13 14:17:03 +01:00
kvm_binary_stats_test.c KVM: selftests: Define wrappers for common syscalls to assert success 2025-10-20 06:30:42 -07:00
kvm_create_max_vcpus.c KVM: selftests: Adjust number of files rlimit for all "standard" VMs 2025-02-14 07:02:12 -08:00
kvm_page_table_test.c Revert "kvm: selftests: move base kvm_util.h declarations to kvm_util_base.h" 2024-04-29 12:54:13 -07:00
Makefile KVM: selftests: Forcefully override ARCH from x86_64 to x86 2025-10-20 08:55:24 -07:00
Makefile.kvm KVM: LoongArch: selftests: Add basic PMU event counting test 2026-04-09 18:56:37 +08:00
memslot_modification_stress_test.c KVM: riscv: selftests: Add missing headers for new testcases 2025-09-16 10:53:55 +05:30
memslot_perf_test.c KVM: riscv: selftests: Add missing headers for new testcases 2025-09-16 10:53:55 +05:30
mmu_stress_test.c KVM: selftests: Stop using __virt_pg_map() directly in tests 2025-11-21 10:15:14 -08:00
pre_fault_memory_test.c KVM: selftests: Use "gpa" and "gva" for local variable names in pre-fault test 2025-10-20 08:59:30 -07:00
rseq_test.c KVM: selftests: Add missing "break" in rseq_test's param parsing 2025-12-02 08:49:10 -08:00
set_memory_region_test.c KVM: selftests: Add wrappers for mmap() and munmap() to assert success 2025-10-10 14:25:28 -07:00
settings selftests: kvm: Raise the default timeout to 120 seconds 2021-02-09 08:17:08 -05:00
steal_time.c KVM: LoongArch: selftests: Add steal time test case 2026-02-06 09:28:01 +08:00
system_counter_offset_test.c KVM: selftests: Remove redundant newlines 2024-01-29 08:39:14 -08:00