From: David Gibson <david@gibson.dropbear.id.au>
To: Nicholas Piggin <npiggin@gmail.com>
Cc: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: a3b2cb30 broken panic reporting for qemu guests
Date: Mon, 4 Dec 2017 16:45:43 +1100 [thread overview]
Message-ID: <20171204054543.GN2130@umbus.fritz.box> (raw)
In-Reply-To: <20171129142343.1e371cbb@roar.ozlabs.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 2794 bytes --]
On Wed, Nov 29, 2017 at 02:23:43PM +1000, Nicholas Piggin wrote:
> On Wed, 29 Nov 2017 15:06:52 +1100
> David Gibson <david@gibson.dropbear.id.au> wrote:
>
> > a3b2cb30 "powerpc: Do not call ppc_md.panic in fadump panic notifier"
> > purports to fix a problem when the kernel panics with fadump not
> > registered, but it breaks something else instead. I _think_ it was
> > working on the incorrect assumption that ppc_md.panic was (or should
> > be) only used with fadump, but I'm not really sure.
> >
> > Panic works with kdump enabled, and (I think) with fadump enabled).
> > However, with neither of these enabled, we always go to the generic
> > panic logic.
>
> Yeah thanks, I can't remember what assumption I was working on tbh.
>
> > That's incorrect for PAPR guests - they should call ibm,os-term via
> > RTAS. Under qemu this leads to a "GUEST_PANICKED" event notification
> > which higher-level management pays attention to. Since a3b2cb30 we
> > now reboot instead of reporting that.
> >
> > I believe it will also break panic for PS3 machines, but since that
> > platform basically no longer exists, we probably don't care.
>
> I (hope) it should just go down to the normal panic path and not do
> much worse than it already does -- although it won't print out that
> message.
Sounds plausible.
> > I'm not entirely sure how to fix this. I _think_ what we want is to
> > call ppc_md.panic from a late panic notifier, the way this patch does
> > for fadump_panic_event() if fadump is registered.
>
> The problem I had there is that some of the printk and console stuff
> wasn't getting flushed out, so I was getting a blank screen. This was
> probably in conjunction with panicing from NMI context that we're now
> starting to introduce.
Ok. What was the exact bit of panic() that wasn't getting invoked
that needed to be?
AFAICT ppc_md.panic was already being called at the end of the panic
notifiers, by using INT_MIN priority. Note that this is the same way
that the pvpanic device (used on x86 for similar panic notification
functionality) does it. Well, pvpanic uses priority 1, which seems
less thorough than INT_MIN.
> So it's a bit annoying. There's other ugliness we have for being unable
> to control panic code well enough from arch code
> (arch/powerpc/platforms/powernv/opal.c)
>
> I guess a really minimal fix is to put an #ifdef powerpc down the bottom
> there (/me *cries*).
That would work for the PAPR os-term thing, but wouldn't if we ever
had a specific device that worked like pvpanic.
--
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: 833 bytes --]
prev parent reply other threads:[~2017-12-04 5:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-29 4:06 a3b2cb30 broken panic reporting for qemu guests David Gibson
2017-11-29 4:23 ` Nicholas Piggin
2017-11-30 5:11 ` David Gibson
2017-12-01 11:11 ` Michael Ellerman
2017-12-01 11:40 ` Nicholas Piggin
2017-12-04 5:49 ` David Gibson
2017-12-04 6:12 ` Nicholas Piggin
2017-12-04 6:31 ` David Gibson
2017-12-04 5:47 ` David Gibson
2017-12-04 5:45 ` David Gibson [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=20171204054543.GN2130@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mahesh@linux.vnet.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.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).