qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>,
	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>,
	Bjoern Walk <bwalk@linux.vnet.ibm.com>,
	Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH v8] s390x/cpu: expose the guest crash information
Date: Mon, 12 Feb 2018 19:16:55 +0100	[thread overview]
Message-ID: <20180212191655.27662101.cohuck@redhat.com> (raw)
In-Reply-To: <85636569-9a27-738f-0b86-86b6eef57805@redhat.com>

On Mon, 12 Feb 2018 11:51:37 -0600
Eric Blake <eblake@redhat.com> wrote:

> On 02/09/2018 06:25 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>
> > ---  
> 
> > +##
> > +# @GuestPanicInformationS390:
> > +#
> > +# S390 specific guest panic information (PSW)
> > +#
> > +# @core: core id of the CPU that crashed
> > +# @psw-mask: control fields of guest PSW
> > +# @psw-addr: guest instruction address
> > +# @reason: guest crash reason in human readable form  
> 
> This description is stale, now that it is an enum (and thus also 
> machine-readable).  I'd shorten it to just
> 
> # @reason: guest crash reason

Agreed, folded in.

> 
> > +#
> > +# Since: 2.12
> > +##
> > +{'struct': 'GuestPanicInformationS390',
> > + 'data': { 'core': 'uint32',
> > +           'psw-mask': 'uint64',
> > +           'psw-addr': 'uint64',
> > +           'reason': 'S390CrashReason' } }  
> 
> > +static GuestPanicInformation *s390_cpu_get_crash_info(CPUState *cs)
> > +{
> > +    GuestPanicInformation *panic_info;
> > +    S390CPU *cpu = S390_CPU(cs);
> > +
> > +    cpu_synchronize_state(cs);
> > +    panic_info = g_malloc0(sizeof(GuestPanicInformation));
> > +
> > +    panic_info->type = GUEST_PANIC_INFORMATION_TYPE_S390;
> > +#if !defined(CONFIG_USER_ONLY)
> > +    panic_info->u.s390.core = cpu->env.core_id;
> > +#else
> > +    panic_info->u.s390.core = 0; /* sane default for non system emulation */  
> 
> Redundant assignment thanks to the g_malloc0() above, but the comment 
> makes it explicit why you did that, so I can live with it.

I actually prefer it this way, as it preempts questions about user-only
handling.

> 
> With the qapi comment tweak,
> Reviewed-by: Eric Blake <eblake@redhat.com>

Thanks!

  reply	other threads:[~2018-02-12 18:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-09 12:25 [Qemu-devel] [PATCH v8] s390x/cpu: expose the guest crash information Christian Borntraeger
2018-02-12 17:39 ` Cornelia Huck
2018-02-12 17:51 ` Eric Blake
2018-02-12 18:16   ` Cornelia Huck [this message]
2018-02-13  8:54 ` 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=20180212191655.27662101.cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=bwalk@linux.vnet.ibm.com \
    --cc=david@redhat.com \
    --cc=eblake@redhat.com \
    --cc=fiuczy@linux.vnet.ibm.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).