diff mbox

[QEMU-KVM,3/4] Report extra data on internal errors

Message ID 1257331796-29722-4-git-send-email-avi@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Avi Kivity Nov. 4, 2009, 10:49 a.m. UTC
None
diff mbox

Patch

diff --git a/qemu-kvm.c b/qemu-kvm.c
index 5568706..05caa1c 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -875,6 +875,16 @@  static int kvm_handle_internal_error(kvm_context_t kvm,
 {
     fprintf(stderr, "KVM internal error. Suberror: %d\n",
             run->internal.suberror);
+#ifdef KVM_CAP_INTERNAL_ERROR_DATA
+    if (kvm_check_extension(kvm_state, KVM_CAP_INTERNAL_ERROR_DATA)) {
+        int i;
+
+        for (i = 0; i < run->internal.ndata; ++i) {
+            fprintf(stderr, "extra data[%d]: %"PRIx64"\n",
+                    i, (uint64_t)run->internal.data[i]);
+        }
+    }
+#endif
     kvm_show_regs(env);
     if (run->internal.suberror == KVM_INTERNAL_ERROR_EMULATION)
         fprintf(stderr, "emulation failure, check dmesg for details\n");