From: Cornelia Huck <cohuck@redhat.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: qemu-s390x <qemu-s390x@nongnu.org>,
qemu-devel <qemu-devel@nongnu.org>,
Thomas Huth <thuth@redhat.com>,
David Hildenbrand <david@redhat.com>,
Halil Pasic <pasic@linux.vnet.ibm.com>,
Eric Blake <eblake@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v3 1/1] s390x/cpu: expose the guest crash information
Date: Mon, 5 Feb 2018 14:51:09 +0100 [thread overview]
Message-ID: <20180205145109.45cc28f2.cohuck@redhat.com> (raw)
In-Reply-To: <9ec94463-8ce0-65de-ad58-597be5f15605@de.ibm.com>
On Mon, 5 Feb 2018 14:44:36 +0100
Christian Borntraeger <borntraeger@de.ibm.com> wrote:
> On 02/05/2018 01:04 PM, Cornelia Huck wrote:
>
> > You're doing the crash_reason -> reason mapping here and also below.
> > Maybe introduce a helper for it?
> >
> [....]
> >> diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
> >> index 8736001156..c6a23262a8 100644
> >> --- a/target/s390x/kvm.c
> >> +++ b/target/s390x/kvm.c
> >> @@ -1568,15 +1568,32 @@ static int handle_instruction(S390CPU *cpu, struct kvm_run *run)
> >> return r;
> >> }
> >>
> >> -static void unmanageable_intercept(S390CPU *cpu, const char *str, int pswoffset)
> >> +static void unmanageable_intercept(S390CPU *cpu, enum crash_reasons reason,
> >> + int pswoffset)
> >> {
> >> CPUState *cs = CPU(cpu);
> >> + const char *str;
> >>
> >> + switch (reason) {
> >> + case CRASH_REASON_PGM:
> >> + str = "program interrupt loop";
> >> + break;
> >> + case CRASH_REASON_EXT:
> >> + str = "external interrupt loop";
> >> + break;
> >> + case CRASH_REASON_OPEREXC:
> >> + str = "operation exception loop";
> >> + break;
> >> + default:
> >> + str = "unknown crash reason";
> >> + break;
> >> + }
> >> error_report("Unmanageable %s! CPU%i new PSW: 0x%016lx:%016lx",
> >
> > "Unmanageable unknown crash reason!" looks a bit odd. In this case,
> > "Unmanageable intercept!" would actually look a bit saner (but you
> > would not be able to use a common converter in that case). We can also
> > just simply keep it :)
>
> We could maybe just drop this print in kvm.c. qemu_system_guest_panicked below will
> trigger some logging as well (if enabled) and it will also notify libvirt about
> that. a future libvirt code will print something like
> panic s390: psw-mask='0x0000000000000000', psw-addr='0x0000000000000002', crash reason: operation exception loop
> anyway in the log file.
>
> That would also address your concern from above.
>
Yes, that would also work if we do some program check loop detection in
tcg in the future.
next prev parent reply other threads:[~2018-02-05 13:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-02 14:37 [Qemu-devel] [PATCH v3 0/1] respin of s390 crash information Christian Borntraeger
2018-02-02 14:37 ` [Qemu-devel] [PATCH v3 1/1] s390x/cpu: expose the guest " Christian Borntraeger
2018-02-02 14:51 ` Eric Blake
2018-02-05 8:31 ` Christian Borntraeger
2018-02-05 12:04 ` Cornelia Huck
2018-02-05 13:44 ` Christian Borntraeger
2018-02-05 13:51 ` Cornelia Huck [this message]
2018-02-02 19:25 ` [Qemu-devel] [PATCH v3 0/1] respin of s390 " no-reply
2018-02-02 20:30 ` no-reply
2018-02-02 21:29 ` no-reply
2018-02-02 22:22 ` no-reply
2018-02-02 22:54 ` no-reply
2018-02-05 12:06 ` Cornelia Huck
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=20180205145109.45cc28f2.cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=david@redhat.com \
--cc=eblake@redhat.com \
--cc=pasic@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=thuth@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).