From c580643c19e08d2610f84f8c835ac658f7c42001 Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Thu, 23 May 2019 12:17:17 +0900 Subject: [PATCH] tests: print the reason of failure in ioctl_kvm_run tests * tests/ioctl_kvm_run_common.c (run_kvm): Print hardware_entry_failure_reason field of kvm_run when KVM_RUN is failed with KVM_EXIT_FAIL_ENTRY. Signed-off-by: Masatake YAMATO --- tests/ioctl_kvm_run_common.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/ioctl_kvm_run_common.c b/tests/ioctl_kvm_run_common.c index 26e72cec..bb7f85f5 100644 --- a/tests/ioctl_kvm_run_common.c +++ b/tests/ioctl_kvm_run_common.c @@ -238,6 +238,10 @@ run_kvm(const int vcpu_fd, struct kvm_run *const run, const size_t mmap_size, run->mmio.data[4], run->mmio.data[5], run->mmio.data[6], run->mmio.data[7], run->mmio.len, run->mmio.is_write); + case KVM_EXIT_FAIL_ENTRY: + error_msg_and_fail("Got an unexpected FAIL_ENTRY exit:" + " hardware_entry_failure_reason %" PRI__x64, + run->fail_entry.hardware_entry_failure_reason); default: error_msg_and_fail("exit_reason = %#x", -- 2.40.0