diff mbox

kvm: do not abort if KVM_RUN fails

Message ID 1409320717-11186-1-git-send-email-pbonzini@redhat.com
State New
Headers show

Commit Message

Paolo Bonzini Aug. 29, 2014, 1:58 p.m. UTC
Just go to the internal error runstate.  This lets you use the "x",
"dump-guest-memory" or "info register" commands.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 kvm-all.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Christian Borntraeger Aug. 29, 2014, 2:11 p.m. UTC | #1
On 29/08/14 15:58, Paolo Bonzini wrote:
> Just go to the internal error runstate.  This lets you use the "x",
> "dump-guest-memory" or "info register" commands.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>

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

Christian

> ---
>  kvm-all.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/kvm-all.c b/kvm-all.c
> index b240bf8..f5edcb1 100644
> --- a/kvm-all.c
> +++ b/kvm-all.c
> @@ -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);
>
diff mbox

Patch

diff --git a/kvm-all.c b/kvm-all.c
index b240bf8..f5edcb1 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -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);