* [PATCH] stop and show registers on error.
@ 2011-02-21 10:16 Gleb Natapov
2011-02-21 12:24 ` Avi Kivity
0 siblings, 1 reply; 6+ messages in thread
From: Gleb Natapov @ 2011-02-21 10:16 UTC (permalink / raw)
To: avi, mtosatti; +Cc: kvm
Signed-off-by: Gleb Natapov <gleb@redhat.com>
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);
}
--
Gleb.
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] stop and show registers on error.
2011-02-21 10:16 [PATCH] stop and show registers on error Gleb Natapov
@ 2011-02-21 12:24 ` Avi Kivity
2011-02-21 12:25 ` Gleb Natapov
0 siblings, 1 reply; 6+ messages in thread
From: Avi Kivity @ 2011-02-21 12:24 UTC (permalink / raw)
To: Gleb Natapov; +Cc: mtosatti, kvm
On 02/21/2011 12:16 PM, Gleb Natapov wrote:
> Signed-off-by: Gleb Natapov<gleb@redhat.com>
> 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'.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] stop and show registers on error.
2011-02-21 12:24 ` Avi Kivity
@ 2011-02-21 12:25 ` Gleb Natapov
2011-02-21 12:53 ` Jan Kiszka
0 siblings, 1 reply; 6+ messages in thread
From: Gleb Natapov @ 2011-02-21 12:25 UTC (permalink / raw)
To: Avi Kivity; +Cc: mtosatti, kvm
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@redhat.com>
> >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.
--
Gleb.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] stop and show registers on error.
2011-02-21 12:25 ` Gleb Natapov
@ 2011-02-21 12:53 ` Jan Kiszka
2011-02-21 12:57 ` Gleb Natapov
0 siblings, 1 reply; 6+ messages in thread
From: Jan Kiszka @ 2011-02-21 12:53 UTC (permalink / raw)
To: Gleb Natapov; +Cc: Avi Kivity, mtosatti, kvm
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@redhat.com>
>>> 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.
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] stop and show registers on error.
2011-02-21 12:53 ` Jan Kiszka
@ 2011-02-21 12:57 ` Gleb Natapov
2011-02-24 16:20 ` Avi Kivity
0 siblings, 1 reply; 6+ messages in thread
From: Gleb Natapov @ 2011-02-21 12:57 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Avi Kivity, mtosatti, kvm
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@redhat.com>
> >>> 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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] stop and show registers on error.
2011-02-21 12:57 ` Gleb Natapov
@ 2011-02-24 16:20 ` Avi Kivity
0 siblings, 0 replies; 6+ messages in thread
From: Avi Kivity @ 2011-02-24 16:20 UTC (permalink / raw)
To: Gleb Natapov; +Cc: Jan Kiszka, mtosatti, kvm
On 02/21/2011 02:57 PM, Gleb Natapov wrote:
> >
> > 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.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-02-24 16:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-21 10:16 [PATCH] stop and show registers on error Gleb Natapov
2011-02-21 12:24 ` Avi Kivity
2011-02-21 12:25 ` Gleb Natapov
2011-02-21 12:53 ` Jan Kiszka
2011-02-21 12:57 ` Gleb Natapov
2011-02-24 16:20 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox