RISC-V: KVM: selftests: Add ebreak test support
authorChao Du <duchao@eswincomputing.com>
Tue, 2 Apr 2024 06:26:28 +0000 (06:26 +0000)
committerAnup Patel <anup@brainfault.org>
Mon, 8 Apr 2024 08:36:27 +0000 (14:06 +0530)
commitf1c48c1ec73538a8e49695445a0fbc52156aac42
treeea39d15d1ee5e305a9364959ed66c2750f5c4062
parent1df1fb521b9dcf6a2fa8f74f9f39d40e5a6bd233
RISC-V: KVM: selftests: Add ebreak test support

Initial support for RISC-V KVM ebreak test. Check the exit reason and
the PC when guest debug is enabled. Also to make sure the guest could
handle the ebreak exception without exiting to the VMM when guest debug
is not enabled.

Signed-off-by: Chao Du <duchao@eswincomputing.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Link: https://lore.kernel.org/r/20240402062628.5425-4-duchao@eswincomputing.com
Signed-off-by: Anup Patel <anup@brainfault.org>
tools/testing/selftests/kvm/Makefile
tools/testing/selftests/kvm/riscv/ebreak_test.c [new file with mode: 0644]