stop and show registers on error.
PATCH 1/1 stop and show registers on error.
qemu-kvm.c +2 -2
@@ -644,8 +644,7 @@ int kvm_run(CPUState *env)break ;#endif case KVM_EXIT_INTERNAL_ERROR : -kvm_handle_internal_error (env, run); - r =1 ; + r =kvm_handle_internal_error (env, run);break ;default :if (kvm_arch_run (env)) {
@@ -1233,6 +1232,7 @@ int kvm_cpu_exec(CPUState *env) r =kvm_run (env);if (r <0 ) {printf ("kvm_run returned %d\n" , r); +kvm_show_regs (env);vm_stop (0 ); }
--
Gleb.
Quoted 16 lines · Gleb Natapov
Signed-off-by Gleb Natapov<[email protected]>qemu-kvm.c +1
-2@@ -644,8 +644,7 @@ int kvm_run(CPUState *env)break ;#endif case KVM_EXIT_INTERNAL_ERROR : -kvm_handle_internal_error (env, run); - r =1 ; + r =kvm_handle_internal_error (env, run);break ;default :if (kvm_arch_run (env)) {
qemu-kvm.c int kvm_cpu_exec(CPUState *env) · line 1237
Quoted 6 lines
qemu-kvm.c +1
-0@@ -1233,6 +1232,7 @@ int kvm_cpu_exec(CPUState *env) r =kvm_run (env);if (r<0 ) {printf ("kvm_run returned %d\n" , r); +kvm_show_regs (env);vm_stop (0 ); }
'info registers'.
Signature · 2 lines
I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.
Quoted 17 lines · Avi Kivity
Quoted 16 lines · Gleb Natapov
Signed-off-by Gleb Natapov<[email protected]>qemu-kvm.c +1
-2@@ -644,8 +644,7 @@ int kvm_run(CPUState *env)break ;#endif case KVM_EXIT_INTERNAL_ERROR : -kvm_handle_internal_error (env, run); - r =1 ; + r =kvm_handle_internal_error (env, run);break ;default :if (kvm_arch_run (env)) {@@ -1233,6 +1232,7 @@ int kvm_cpu_exec(CPUState *env)
Quoted 9 lines
qemu-kvm.c int kvm_cpu_exec(CPUState *env) · line 1237
Quoted 6 lines
qemu-kvm.c +1
-0r =kvm_run (env);if (r<0 ) {printf ("kvm_run returned %d\n" , r); +kvm_show_regs (env);vm_stop (0 ); }'info registers'.
That is if you can reproduce. For useful bug reports it is better to have them printed for user.
--
Gleb.
Quoted 27 lines · Gleb Natapov
Quoted 17 lines · Avi Kivity
Quoted 16 lines · Gleb Natapov
Signed-off-by Gleb Natapov<[email protected]>qemu-kvm.c +1
-2@@ -644,8 +644,7 @@ int kvm_run(CPUState *env)break ;#endif case KVM_EXIT_INTERNAL_ERROR : -kvm_handle_internal_error (env, run); - r =1 ; + r =kvm_handle_internal_error (env, run);break ;default :if (kvm_arch_run (env)) {@@ -1233,6 +1232,7 @@ int kvm_cpu_exec(CPUState *env)Quoted 9 lines
qemu-kvm.c int kvm_cpu_exec(CPUState *env) · line 1237
Quoted 6 lines
qemu-kvm.c +1
-0r =kvm_run (env);if (r<0 ) {printf ("kvm_run returned %d\n" , r); +kvm_show_regs (env);vm_stop (0 ); }'info registers'.
Quoted 2 lines
That is if you can reproduce. For useful bug reports it is better to have them printed for user.
FWIW, this patch just aligns qemu-kvm to what upstream already does and what qemu-kvm will soon or later do as well when it starts using the upstream loop. I'm neutral /wrt applying this patch before the cleanup or achieving the same by consolidating the code.
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux
Quoted 28 lines · Jan Kiszka
Quoted 27 lines · Gleb Natapov
Quoted 26 lines · Avi Kivity
Quoted 16 lines · Gleb Natapov
Signed-off-by Gleb Natapov<[email protected]>qemu-kvm.c +1
-2@@ -644,8 +644,7 @@ int kvm_run(CPUState *env)break ;#endif case KVM_EXIT_INTERNAL_ERROR : -kvm_handle_internal_error (env, run); - r =1 ; + r =kvm_handle_internal_error (env, run);break ;default :if (kvm_arch_run (env)) {qemu-kvm.c int kvm_cpu_exec(CPUState *env) · line 1237
Quoted 6 lines
qemu-kvm.c +1
-0@@ -1233,6 +1232,7 @@ int kvm_cpu_exec(CPUState *env) r =kvm_run (env);if (r<0 ) {printf ("kvm_run returned %d\n" , r); +kvm_show_regs (env);vm_stop (0 ); }'info registers'.
Quoted 8 lines
Quoted 2 lines
That is if you can reproduce. For useful bug reports it is better to have them printed for user.
FWIW, this patch just aligns qemu-kvm to what upstream already does and what qemu-kvm will soon or later do as well when it starts using the upstream loop. I'm neutral /wrt applying this patch before the cleanup or achieving the same by consolidating the code.
Indeed. When I got no register dump on error I stared at the wrong code for 20 minutes trying to understand how it could happen. Having two kvm implementations in the same tree is such fun!
--
Gleb.
Quoted 9 lines · Gleb Natapov
Quoted 6 lines
FWIW, this patch just aligns qemu-kvm to what upstream already does and what qemu-kvm will soon or later do as well when it starts using the upstream loop. I'm neutral /wrt applying this patch before the cleanup or achieving the same by consolidating the code.
Indeed. When I got no register dump on error I stared at the wrong code for 20 minutes trying to understand how it could happen. Having two kvm implementations in the same tree is such fun!
Very well, patch applied.
Signature · 1 line
error compiling committee.c: too many arguments to function