summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/kvm/lib/loongarch/processor.c
diff options
context:
space:
mode:
authorBibo Mao <maobibo@loongson.cn>2025-11-28 14:49:44 +0800
committerHuacai Chen <chenhuacai@loongson.cn>2025-11-28 14:49:44 +0800
commitdf41742343fad11fde06e085096003d64599785f (patch)
treed42787c09666a6eba2587a0e5bf29fb99e6863f4 /tools/testing/selftests/kvm/lib/loongarch/processor.c
parentd84fe2f30b0a0cbe08260c00a84ffe42161c95ce (diff)
KVM: LoongArch: selftests: Add timer interrupt test case
Add timer test case based on common arch_timer code, timer interrupt with one-shot and period mode is tested. Signed-off-by: Bibo Mao <maobibo@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'tools/testing/selftests/kvm/lib/loongarch/processor.c')
-rw-r--r--tools/testing/selftests/kvm/lib/loongarch/processor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/kvm/lib/loongarch/processor.c b/tools/testing/selftests/kvm/lib/loongarch/processor.c
index b2a1fa7b18da..a1b16140942b 100644
--- a/tools/testing/selftests/kvm/lib/loongarch/processor.c
+++ b/tools/testing/selftests/kvm/lib/loongarch/processor.c
@@ -276,8 +276,8 @@ static void loongarch_vcpu_setup(struct kvm_vcpu *vcpu)
TEST_FAIL("Unknown guest mode, mode: 0x%x", vm->mode);
}
- /* user mode and page enable mode */
- val = PLV_USER | CSR_CRMD_PG;
+ /* kernel mode and page enable mode */
+ val = PLV_KERN | CSR_CRMD_PG;
loongarch_set_csr(vcpu, LOONGARCH_CSR_CRMD, val);
loongarch_set_csr(vcpu, LOONGARCH_CSR_PRMD, val);
loongarch_set_csr(vcpu, LOONGARCH_CSR_EUEN, 1);