From: David Gibson <david@gibson.dropbear.id.au>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: mdroth@linux.vnet.ibm.com, thuth@redhat.com, lvivier@redhat.com,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] pseries: Correct panic behaviour for pseries machine type
Date: Wed, 7 Jun 2017 21:16:11 +1000 [thread overview]
Message-ID: <20170607111611.GK13397@umbus.fritz.box> (raw)
In-Reply-To: <1799129848.6598516.1496820296394.JavaMail.zimbra@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2310 bytes --]
On Wed, Jun 07, 2017 at 03:24:56AM -0400, Paolo Bonzini wrote:
>
>
> ----- Original Message -----
> > From: "David Gibson" <david@gibson.dropbear.id.au>
> > To: mdroth@linux.vnet.ibm.com, thuth@redhat.com, lvivier@redhat.com
> > Cc: pbonzini@redhat.com, qemu-ppc@nongnu.org, qemu-devel@nongnu.org, "David Gibson" <david@gibson.dropbear.id.au>
> > Sent: Wednesday, June 7, 2017 9:07:32 AM
> > Subject: [PATCH] pseries: Correct panic behaviour for pseries machine type
> >
> > The pseries machine type doesn't usually use the 'pvpanic' device as such,
> > because it has a firmware/hypervisor facility with roughly the same
> > purpose. The 'ibm,os-term' RTAS call notifies the hypervisor that the
> > guest has crashed.
> >
> > Our implementation of this call was sending a GUEST_PANICKED qmp event;
> > however, it was not doing the other usual panic actions, making its
> > behaviour different from pvpanic for no good reason.
> >
> > To correct this, we should call qemu_system_guest_panicked() rather than
> > directly sending the panic event.
> >
> > Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> > ---
> > hw/ppc/spapr_rtas.c | 7 ++-----
> > 1 file changed, 2 insertions(+), 5 deletions(-)
> >
> > diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c
> > index 707c4d4..94a2799 100644
> > --- a/hw/ppc/spapr_rtas.c
> > +++ b/hw/ppc/spapr_rtas.c
> > @@ -293,12 +293,9 @@ static void rtas_ibm_os_term(PowerPCCPU *cpu,
> > target_ulong args,
> > uint32_t nret, target_ulong rets)
> > {
> > - target_ulong ret = 0;
> > + qemu_system_guest_panicked(NULL);
> >
> > - qapi_event_send_guest_panicked(GUEST_PANIC_ACTION_PAUSE, false, NULL,
> > - &error_abort);
> > -
> > - rtas_st(rets, 0, ret);
> > + rtas_st(rets, 0, RTAS_OUT_SUCCESS);
> > }
>
> It's possible to "cont" a panicked guest, so I think you should keep
> the rtas_st.
I did keep the rtas_st(), I just changed it to using a constant
instead of an always-0 variable.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2017-06-07 11:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-07 7:07 [Qemu-devel] [PATCH] pseries: Correct panic behaviour for pseries machine type David Gibson
2017-06-07 7:24 ` Paolo Bonzini
2017-06-07 11:16 ` David Gibson [this message]
2017-06-07 7:33 ` Thomas Huth
2017-06-07 11:25 ` David Gibson
2017-06-07 14:34 ` Paolo Bonzini
2017-06-07 17:10 ` [Qemu-devel] [Qemu-ppc] " Thomas Huth
2017-06-08 0:18 ` David Gibson
2017-06-08 4:33 ` Thomas Huth
2017-06-08 4:38 ` David Gibson
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=20170607111611.GK13397@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=lvivier@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.