From: Eric Blake <eblake@redhat.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>,
qemu-s390x <qemu-s390x@nongnu.org>
Cc: qemu-devel <qemu-devel@nongnu.org>,
Cornelia Huck <cohuck@redhat.com>, Thomas Huth <thuth@redhat.com>,
David Hildenbrand <david@redhat.com>,
Halil Pasic <pasic@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH v5 1/1] s390x/cpu: expose the guest crash information
Date: Tue, 6 Feb 2018 09:31:48 -0600 [thread overview]
Message-ID: <4181f0ff-5a2d-bdaa-9e40-ae3cb6f4417c@redhat.com> (raw)
In-Reply-To: <20180206074622.157812-1-borntraeger@de.ibm.com>
On 02/06/2018 01:46 AM, Christian Borntraeger wrote:
> This patch is the s390 implementation of guest crash information,
> similar to commit d187e08dc4 ("i386/cpu: add crash-information QOM
> property") and the related commits. We will detect several crash
> reasons, with the "disabled wait" being the most important one, since
> this is used by all s390 guests as a "panic like" notification.
>
>
> Co-authored-by: Jing Liu <liujbjl@linux.vnet.ibm.com>
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
> qapi/run-state.json | 27 ++++++++++++++++++++++--
> target/s390x/cpu.c | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++
> target/s390x/cpu.h | 11 ++++++++++
> target/s390x/helper.c | 5 ++++-
> target/s390x/kvm.c | 15 +++++++-------
> vl.c | 6 ++++++
> 6 files changed, 110 insertions(+), 11 deletions(-)
>
>
> ##
> # @GuestPanicInformation:
> #
> # Information about a guest panic
> #
> +# @type: Crash type that defines the hypervisor specific information
> +#
> # Since: 2.9
> ##
> {'union': 'GuestPanicInformation',
> 'base': {'type': 'GuestPanicInformationType'},
> 'discriminator': 'type',
> - 'data': { 'hyper-v': 'GuestPanicInformationHyperV' } }
> + 'data': { 'hyper-v': 'GuestPanicInformationHyperV',
> + 's390': 'GuestPanicInformationS390' } }
>
The qapi type has only integers (that the caller will presumably know
how to decode if it cares) and a human readable string. Meanwhile,...
>
> +/* Crash cases. */
> +enum crash_reasons {
Doesn't seem to match our usual coding conventions of CamelCase for
names in the enum/struct/union namespace.
> + CRASH_REASON_UNKNOWN, /* default value of 0 on reset */
> + CRASH_REASON_PGM,
> + CRASH_REASON_EXT,
> + CRASH_REASON_WAITPSW,
> + CRASH_REASON_OPEREXC,
...you have an internal enum for decoding some of those integer values
into specific human readable strings, but don't expose the enum over
QAPI. Are we sure that's the interface we want to go with? As long as
you are okay with that, then I can live with the interface change; I
just want to make sure that you are certain that the machine-based
consumer of the QMP command does not need to decode crash_reasons
because you left it as an internal enum.
> +
> +static void s390_cpu_get_crash_info_qom(Object *obj, Visitor *v,
> + const char *name, void *opaque,
> + Error **errp)
Indentation is off.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2018-02-06 15:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-06 7:46 [Qemu-devel] [PATCH v5 1/1] s390x/cpu: expose the guest crash information Christian Borntraeger
2018-02-06 12:49 ` Cornelia Huck
2018-02-06 12:59 ` [Qemu-devel] [qemu-s390x] " Christian Borntraeger
2018-02-06 15:31 ` Eric Blake [this message]
2018-02-06 18:21 ` [Qemu-devel] " Christian Borntraeger
2018-02-06 18:55 ` Eric Blake
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=4181f0ff-5a2d-bdaa-9e40-ae3cb6f4417c@redhat.com \
--to=eblake@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@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).