diff options
author | Anup Patel <apatel@ventanamicro.com> | 2022-04-09 10:02:36 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2022-05-20 09:08:56 +0530 |
commit | ac6c85e962d4c009c499d93657f25f46fd8212b9 (patch) | |
tree | 3c0304dac9f34accef6220fa4e3a2e8d0b815dee /lib/test_scanf.c | |
parent | 42226c989789d8da4af1de0c31070c96726d990c (diff) | |
download | linux-stable-ac6c85e962d4c009c499d93657f25f46fd8212b9.tar.gz linux-stable-ac6c85e962d4c009c499d93657f25f46fd8212b9.tar.bz2 linux-stable-ac6c85e962d4c009c499d93657f25f46fd8212b9.zip |
KVM: selftests: riscv: Improve unexpected guest trap handling
Currently, we simply hang using "while (1) ;" upon any unexpected
guest traps because the default guest trap handler is guest_hang().
The above approach is not useful to anyone because KVM selftests
users will only see a hung application upon any unexpected guest
trap.
This patch improves unexpected guest trap handling for KVM RISC-V
selftests by doing the following:
1) Return to host user-space
2) Dump VCPU registers
3) Die using TEST_ASSERT(0, ...)
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Tested-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'lib/test_scanf.c')
0 files changed, 0 insertions, 0 deletions