[04/17] kvm: Print something before calling abort() if KVM_RUN fails

Submitted by Stefan Hajnoczi on Dec. 19, 2011, 11:12 a.m.

Details

Message ID 1324293158-25433-5-git-send-email-stefanha@linux.vnet.ibm.com
State New
Headers show

Commit Message

Stefan Hajnoczi Dec. 19, 2011, 11:12 a.m.
From: Michael Ellerman <michael@ellerman.id.au>

It's a little unfriendly to call abort() without printing any sort of
error message. So turn the DPRINTK() into an fprintf(stderr, ...).

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 kvm-all.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Patch hide | download patch | download mbox

diff --git a/kvm-all.c b/kvm-all.c
index 4c466d6..ac048bc 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -977,7 +977,8 @@  int kvm_cpu_exec(CPUState *env)
                 ret = EXCP_INTERRUPT;
                 break;
             }
-            DPRINTF("kvm run failed %s\n", strerror(-run_ret));
+            fprintf(stderr, "error: kvm run failed %s\n",
+                    strerror(-run_ret));
             abort();
         }