Re: [PATCH] stop and show registers on error.

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

 



On Mon, Feb 21, 2011 at 01:53:15PM +0100, Jan Kiszka wrote:
> On 2011-02-21 13:25, Gleb Natapov wrote:
> > On Mon, Feb 21, 2011 at 02:24:19PM +0200, Avi Kivity wrote:
> >> On 02/21/2011 12:16 PM, Gleb Natapov wrote:
> >>> Signed-off-by: Gleb Natapov<gleb@xxxxxxxxxx>
> >>> diff --git a/qemu-kvm.c b/qemu-kvm.c
> >>> index 49cd683..2f3f683 100644
> >>> --- a/qemu-kvm.c
> >>> +++ b/qemu-kvm.c
> >>> @@ -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);
> >>>      }
> >>
> >> 'info registers'.
> >>
> > 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.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux