Skip to content
Commit ac6c85e9 authored by Anup Patel's avatar Anup Patel Committed by Anup Patel
Browse files

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: default avatarAnup Patel <apatel@ventanamicro.com>
Tested-by: default avatarMayuresh Chitale <mchitale@ventanamicro.com>
Signed-off-by: default avatarAnup Patel <anup@brainfault.org>
parent 42226c98
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment