diff options
author | Radim Krčmář <rkrcmar@redhat.com> | 2014-01-21 18:11:31 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-02-03 17:33:54 +0100 |
commit | 977c7b6d8909464eb3a510829f534451d0adb227 (patch) | |
tree | 8f59cd06b98a355a932c6a3ad4c3a0fa5e56be5d /kvm-all.c | |
parent | f0b9b11164482a8a2283dee25cecc4a4c531259e (diff) | |
download | qemu-977c7b6d8909464eb3a510829f534451d0adb227.zip qemu-977c7b6d8909464eb3a510829f534451d0adb227.tar.gz qemu-977c7b6d8909464eb3a510829f534451d0adb227.tar.bz2 |
kvm: print suberror on all internal errors
KVM introduced internal error exit reason and suberror at the same time,
and later extended it with internal error data.
QEMU does not report suberror on hosts between these two events because
we check for the extension. (half a year in 2009, but it is misleading)
Fix by removing KVM_CAP_INTERNAL_ERROR_DATA condition on printf.
(partially improved by bb44e0d12df70 and ba4047cf848a3 in the past)
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'kvm-all.c')
-rw-r--r-- | kvm-all.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -1545,17 +1545,16 @@ static void kvm_handle_io(uint16_t port, void *data, int direction, int size, static int kvm_handle_internal_error(CPUState *cpu, struct kvm_run *run) { - fprintf(stderr, "KVM internal error."); + fprintf(stderr, "KVM internal error. Suberror: %d\n", + run->internal.suberror); + if (kvm_check_extension(kvm_state, KVM_CAP_INTERNAL_ERROR_DATA)) { int i; - fprintf(stderr, " Suberror: %d\n", run->internal.suberror); for (i = 0; i < run->internal.ndata; ++i) { fprintf(stderr, "extra data[%d]: %"PRIx64"\n", i, (uint64_t)run->internal.data[i]); } - } else { - fprintf(stderr, "\n"); } if (run->internal.suberror == KVM_INTERNAL_ERROR_EMULATION) { fprintf(stderr, "emulation failure\n"); |