qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH uq/master 1/2] kvm: detect errors from kvm_arch_proc


From: Paolo Bonzini
Subject: [Qemu-devel] [PATCH uq/master 1/2] kvm: detect errors from kvm_arch_process_async_events
Date: Sat, 9 Mar 2013 07:48:49 +0100

The next patch will call a ioctl from kvm_arch_process_async_events.
Trap errors and abort the program if one comes.

Signed-off-by: Paolo Bonzini <address@hidden>
---
 kvm-all.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/kvm-all.c b/kvm-all.c
index 4decfdc..bc1534c 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1536,7 +1536,13 @@ int kvm_cpu_exec(CPUArchState *env)
 
     DPRINTF("kvm_cpu_exec()\n");
 
-    if (kvm_arch_process_async_events(cpu)) {
+    ret = kvm_arch_process_async_events(cpu);
+    if (ret) {
+        if (ret < 0) {
+            fprintf(stderr, "error: kvm process events failed %s\n",
+                    strerror(-ret));
+            abort();
+        }
         cpu->exit_request = 0;
         return EXCP_HLT;
     }
-- 
1.8.1.4





reply via email to

[Prev in Thread] Current Thread [Next in Thread]