Skip to contentSkip to conversation

kvm: do not abort if KVM_RUN fails

PATCH In review Paolo Bonzini 2 participants 2 messages Aug 29, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kvm: do not abort if KVM_RUN fails

Just go to the internal error runstate. This lets you use the "x", "dump-guest-memory" or "info register" commands.

---
 kvm-all.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
kvm-all.c +2 -1
index b240bf8..f5edcb1 100644
@@ -1738,7 +1738,8 @@ int kvm_cpu_exec(CPUState *cpu)
             }
             fprintf(stderr, "error: kvm run failed %s\n",
                     strerror(-run_ret));
-            abort();
+            ret = -1;
+            break;
         }
 
         trace_kvm_run_exit(cpu->cpu_index, run->exit_reason);
Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Paolo Bonzini

Just go to the internal error runstate. This lets you use the "x", "dump-guest-memory" or "info register" commands.

Very nice. This helps a lot in understanding some problems. (Even if those are rare).

Christian

Quoted 19 lines
---
 kvm-all.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
kvm-all.c +2 -1
index b240bf8..f5edcb1 100644
@@ -1738,7 +1738,8 @@ int kvm_cpu_exec(CPUState *cpu)
             }
             fprintf(stderr, "error: kvm run failed %s\n",
                     strerror(-run_ret));
-            abort();
+            ret = -1;
+            break;
         }
 
         trace_kvm_run_exit(cpu->cpu_index, run->exit_reason);