]> granicus.if.org Git - strace/commitdiff
tests: print the reason of failure in ioctl_kvm_run tests
authorMasatake YAMATO <yamato@redhat.com>
Thu, 23 May 2019 03:17:17 +0000 (12:17 +0900)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 23 May 2019 09:56:10 +0000 (09:56 +0000)
* 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 <yamato@redhat.com>
tests/ioctl_kvm_run_common.c

index 26e72cec69dea004ec86f6829689c917a4bf07e7..bb7f85f577e0381e31f06cc80f69b72d2395f92c 100644 (file)
@@ -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",