From: Gleb Natapov <gleb@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Avi Kivity <avi@redhat.com>, mtosatti@redhat.com, kvm@vger.kernel.org
Subject: Re: [PATCH] stop and show registers on error.
Date: Mon, 21 Feb 2011 14:57:57 +0200 [thread overview]
Message-ID: <20110221125757.GM14984@redhat.com> (raw)
In-Reply-To: <4D62603B.2020709@siemens.com>
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.
next prev parent reply other threads:[~2011-02-21 12:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2011-02-24 16:20 ` Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110221125757.GM14984@redhat.com \
--to=gleb@redhat.com \
--cc=avi@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox