]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: LoongArch: selftests: Add PMU overflow interrupt test
authorSong Gao <gaosong@loongson.cn>
Thu, 9 Apr 2026 10:56:38 +0000 (18:56 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Thu, 9 Apr 2026 10:56:38 +0000 (18:56 +0800)
commite47b8e1db9a9bbef6765e85b11e87f48e6b56846
tree21b4d271b0e85c3d78250a3d035098526a70c5c9
parent11c840192768a5a63b6aed75273c5e8e416230ee
KVM: LoongArch: selftests: Add PMU overflow interrupt test

Extend the PMU test suite to cover overflow interrupts. The test enables
the PMI (Performance Monitor Interrupt), sets counter 0 to one less than
the overflow value, and verifies that an interrupt is raised when the
counter overflows. A guest interrupt handler checks the interrupt cause
and disables further PMU interrupts upon success.

Signed-off-by: Song Gao <gaosong@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
tools/testing/selftests/kvm/include/loongarch/pmu.h
tools/testing/selftests/kvm/include/loongarch/processor.h
tools/testing/selftests/kvm/loongarch/pmu_test.c