From: Paolo Bonzini <pbonzini@redhat.com>
To: "Radim Krčmář" <rkrcmar@redhat.com>, qemu-devel@nongnu.org
Cc: drjones@redhat.com, kvm@vger.kernel.org
Subject: Re: [Qemu-devel] [PATCH] kvm: print suberror on all internal errors
Date: Wed, 22 Jan 2014 14:03:28 +0100 [thread overview]
Message-ID: <52DFC1A0.3090308@redhat.com> (raw)
In-Reply-To: <1390324291-9847-1-git-send-email-rkrcmar@redhat.com>
Il 21/01/2014 18:11, Radim Krčmář ha scritto:
> KVM introduced internal error exit reason and suberror at the same time,
> and later extended it with internal error data.
> QEMU does not report suberror on hosts between these two events because
> we check for the extension. (half a year in 2009, but it is misleading)
>
> Fix by removing KVM_CAP_INTERNAL_ERROR_DATA condition on printf.
>
> (partially improved by bb44e0d12df70 and ba4047cf848a3 in the past)
>
> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
> ---
> kvm-all.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/kvm-all.c b/kvm-all.c
> index 0bfb060..0a91d8e 100644
> --- a/kvm-all.c
> +++ b/kvm-all.c
> @@ -1539,17 +1539,16 @@ static void kvm_handle_io(uint16_t port, void *data, int direction, int size,
>
> static int kvm_handle_internal_error(CPUState *cpu, struct kvm_run *run)
> {
> - fprintf(stderr, "KVM internal error.");
> + fprintf(stderr, "KVM internal error. Suberror: %d\n",
> + run->internal.suberror);
> +
> if (kvm_check_extension(kvm_state, KVM_CAP_INTERNAL_ERROR_DATA)) {
> int i;
>
> - fprintf(stderr, " Suberror: %d\n", run->internal.suberror);
> for (i = 0; i < run->internal.ndata; ++i) {
> fprintf(stderr, "extra data[%d]: %"PRIx64"\n",
> i, (uint64_t)run->internal.data[i]);
> }
> - } else {
> - fprintf(stderr, "\n");
> }
> if (run->internal.suberror == KVM_INTERNAL_ERROR_EMULATION) {
> fprintf(stderr, "emulation failure\n");
>
Applied to uq/master, thanks (please remember uq/master in the subject
line in the future).
Paolo
prev parent reply other threads:[~2014-01-22 14:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-21 17:11 [Qemu-devel] [PATCH] kvm: print suberror on all internal errors Radim Krčmář
2014-01-21 17:20 ` Laszlo Ersek
2014-01-22 13:03 ` Paolo Bonzini [this message]
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=52DFC1A0.3090308@redhat.com \
--to=pbonzini@redhat.com \
--cc=drjones@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
--cc=rkrcmar@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;
as well as URLs for NNTP newsgroup(s).