Re: [PATCH v2 0/7] KVM: LoongArch: selftests: Add timer test case
From: Huacai Chen
Date: Fri Nov 14 2025 - 22:43:22 EST
Hi, Bibo,
I'm very confused with this series.
1. The cover letter doesn't appear in the maillist.
2. Patch-6 is missed in the thread.
3. The one-shot and periodic test splitting is a little strange,
because you put some common parts in the on-shot test, maybe you can
consider merge these two.
Huacai
On Tue, Nov 4, 2025 at 7:37 PM Bibo Mao <maobibo@xxxxxxxxxxx> wrote:
>
> This patchset adds timer test case for LoongArch system, it is based
> on common arch_timer test case. And it includes one-shot and period mode
> timer interrupt test, software emulated timer function and time counter
> test.
> ---
> v1 ... v2:
> 1. Restore PC and PRMD after exception handler.
> 2. Split patch 4 into two small patches with period timer test and
> time counter test.
> 3. With time counter test, set time count with 0 when create VM. And
> verify time count starts from 0 in guest code.
> ---
> Bibo Mao (7):
> KVM: LoongArch: selftests: Add system registers save and restore on
> exception
> KVM: LoongArch: selftests: Add exception handler register interface
> KVM: LoongArch: selftests: Add basic interfaces
> KVM: LoongArch: selftests: Add timer test case with one-shot mode
> KVM: LoongArch: selftests: Add period mode timer test
> KVM: LoongArch: selftests: Add SW emulated timer test
> KVM: LoongArch: selftests: Add time counter test
>
> tools/testing/selftests/kvm/Makefile.kvm | 10 +-
> .../kvm/include/loongarch/arch_timer.h | 84 ++++++++
> .../kvm/include/loongarch/processor.h | 81 +++++++-
> .../selftests/kvm/lib/loongarch/exception.S | 6 +
> .../selftests/kvm/lib/loongarch/processor.c | 47 ++++-
> .../selftests/kvm/loongarch/arch_timer.c | 195 ++++++++++++++++++
> 6 files changed, 417 insertions(+), 6 deletions(-)
> create mode 100644 tools/testing/selftests/kvm/include/loongarch/arch_timer.h
> create mode 100644 tools/testing/selftests/kvm/loongarch/arch_timer.c
>
>
> base-commit: ec0b62ccc986c06552c57f54116171cfd186ef92
> --
> 2.39.3
>