On 2024/1/27 上午4:32, Sean Christopherson wrote:
On Thu, Jan 25, 2024, Bibo Mao wrote:
---
Tianrui Zhao (4):
KVM: selftests: Add KVM selftests header files for LoongArch
KVM: selftests: Add core KVM selftests support for LoongArch
KVM: selftests: Add ucall test support for LoongArch
KVM: selftests: Add test cases for LoongArch
tools/testing/selftests/kvm/Makefile | 16 +
.../selftests/kvm/include/kvm_util_base.h | 5 +
.../kvm/include/loongarch/processor.h | 133 +++++++
.../selftests/kvm/include/loongarch/ucall.h | 20 ++
.../selftests/kvm/lib/loongarch/exception.S | 59 ++++
.../selftests/kvm/lib/loongarch/processor.c | 332 ++++++++++++++++++
.../selftests/kvm/lib/loongarch/ucall.c | 38 ++
.../selftests/kvm/set_memory_region_test.c | 2 +-
8 files changed, 604 insertions(+), 1 deletion(-)
create mode 100644 tools/testing/selftests/kvm/include/loongarch/processor.h
create mode 100644 tools/testing/selftests/kvm/include/loongarch/ucall.h
create mode 100644 tools/testing/selftests/kvm/lib/loongarch/exception.S
create mode 100644 tools/testing/selftests/kvm/lib/loongarch/processor.c
create mode 100644 tools/testing/selftests/kvm/lib/loongarch/ucall.c
I did a *very* quick read through and didn't see anything egregious. I really
hope that someday we can deduplicate much of the ARM/RISC-V/LoongArch code, but
that's no reason to hold up getting selftests support merged.
kvm seltests for LoongArch originally comes from ARM64, especially ucall
and page table walk code. And LoongArch kvm actually benefits much from
open source code, we will deduplicate some ARM/RISC-V/LoongArch kvm
selftests code when LoongArch KVM is basically supported.
Regards
Bibo Mao