[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 19/30] panic: Add the panic hypervisor notifier list
 
- To: "Guilherme G. Piccoli" <gpiccoli@xxxxxxxxxx>
 
- From: Petr Mladek <pmladek@xxxxxxxx>
 
- Date: Wed, 18 May 2022 09:58:18 +0200
 
- Cc: David Gow <davidgow@xxxxxxxxxx>, Evan Green <evgreen@xxxxxxxxxxxx>,	Julius Werner <jwerner@xxxxxxxxxxxx>,	Scott Branden <scott.branden@xxxxxxxxxxxx>,	bcm-kernel-feedback-list@xxxxxxxxxxxx,	Sebastian Reichel <sre@xxxxxxxxxx>, linux-pm@xxxxxxxxxxxxxxx,	Florian Fainelli <f.fainelli@xxxxxxxxx>, akpm@xxxxxxxxxxxxxxxxxxxx,	bhe@xxxxxxxxxx, kexec@xxxxxxxxxxxxxxxxxxx,	linux-kernel@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx,	linux-alpha@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx,	linux-edac@xxxxxxxxxxxxxxx, linux-hyperv@xxxxxxxxxxxxxxx,	linux-leds@xxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxxx,	linux-parisc@xxxxxxxxxxxxxxx, linux-remoteproc@xxxxxxxxxxxxxxx,	linux-s390@xxxxxxxxxxxxxxx, linux-tegra@xxxxxxxxxxxxxxx,	linux-um@xxxxxxxxxxxxxxxxxxx, linux-xtensa@xxxxxxxxxxxxxxxx,	netdev@xxxxxxxxxxxxxxx, openipmi-developer@xxxxxxxxxxxxxxxxxxxxx,	rcu@xxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx,	xen-devel@xxxxxxxxxxxxxxxxxxxx, x86@xxxxxxxxxx,	kernel-dev@xxxxxxxxxx, kernel@xxxxxxxxxxxx, halves@xxxxxxxxxxxxx,	fabiomirmar@xxxxxxxxx, alejandro.j.jimenez@xxxxxxxxxx,	andriy.shevchenko@xxxxxxxxxxxxxxx, arnd@xxxxxxxx, bp@xxxxxxxxx,	corbet@xxxxxxx, d.hatayama@xxxxxxxxxxxxxx,	dave.hansen@xxxxxxxxxxxxxxx, dyoung@xxxxxxxxxx, feng.tang@xxxxxxxxx,	gregkh@xxxxxxxxxxxxxxxxxxx, mikelley@xxxxxxxxxxxxx,	hidehiro.kawai.ez@xxxxxxxxxxx, jgross@xxxxxxxx,	john.ogness@xxxxxxxxxxxxx, keescook@xxxxxxxxxxxx, luto@xxxxxxxxxx,	mhiramat@xxxxxxxxxx, mingo@xxxxxxxxxx, paulmck@xxxxxxxxxx,	peterz@xxxxxxxxxxxxx, rostedt@xxxxxxxxxxx, senozhatsky@xxxxxxxxxxxx,	stern@xxxxxxxxxxxxxxxxxxx, tglx@xxxxxxxxxxxxx, vgoyal@xxxxxxxxxx,	vkuznets@xxxxxxxxxx, will@xxxxxxxxxx,	Alexander Gordeev <agordeev@xxxxxxxxxxxxx>,	Andrea Parri <parri.andrea@xxxxxxxxx>,	Ard Biesheuvel <ardb@xxxxxxxxxx>,	Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>,	Brian Norris <computersforpeace@xxxxxxxxx>,	Christian Borntraeger <borntraeger@xxxxxxxxxxxxx>,	Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>,	"David S. Miller" <davem@xxxxxxxxxxxxx>,	Dexuan Cui <decui@xxxxxxxxxxxxx>, Doug Berger <opendmb@xxxxxxxxx>,	Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>,	Hari Bathini <hbathini@xxxxxxxxxxxxx>,	Heiko Carstens <hca@xxxxxxxxxxxxx>,	Justin Chen <justinpopo6@xxxxxxxxx>,	"K. Y. Srinivasan" <kys@xxxxxxxxxxxxx>,	Lee Jones <lee.jones@xxxxxxxxxx>,	Markus Mayer <mmayer@xxxxxxxxxxxx>,	Michael Ellerman <mpe@xxxxxxxxxxxxxx>,	Mihai Carabas <mihai.carabas@xxxxxxxxxx>,	Nicholas Piggin <npiggin@xxxxxxxxx>,	Paul Mackerras <paulus@xxxxxxxxx>, Pavel Machek <pavel@xxxxxx>,	Shile Zhang <shile.zhang@xxxxxxxxxxxxxxxxx>,	Stephen Hemminger <sthemmin@xxxxxxxxxxxxx>,	Sven Schnelle <svens@xxxxxxxxxxxxx>,	Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx>,	Tianyu Lan <Tianyu.Lan@xxxxxxxxxxxxx>,	Vasily Gorbik <gor@xxxxxxxxxxxxx>,	Wang ShaoBo <bobo.shaobowang@xxxxxxxxxx>,	Wei Liu <wei.liu@xxxxxxxxxx>, zhenwei pi <pizhenwei@xxxxxxxxxxxxx>
 
- Delivery-date: Wed, 18 May 2022 07:58:25 +0000
 
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
 
 
 
On Tue 2022-05-17 15:57:34, Petr Mladek wrote:
> On Mon 2022-05-16 12:06:17, Guilherme G. Piccoli wrote:
> > >> --- a/drivers/soc/bcm/brcmstb/pm/pm-arm.c
> > >> +++ b/drivers/soc/bcm/brcmstb/pm/pm-arm.c
> > >> @@ -814,7 +814,7 @@ static int brcmstb_pm_probe(struct platform_device 
> > >> *pdev)
> > >>                  goto out;
> > >>          }
> > >>  
> > >> -        atomic_notifier_chain_register(&panic_notifier_list,
> > >> +        atomic_notifier_chain_register(&panic_hypervisor_list,
> > >>                                         &brcmstb_pm_panic_nb);
> > > 
> > > I am not sure about this one. It instruct some HW to preserve DRAM.
> > > IMHO, it better fits into pre_reboot category but I do not have
> > > strong opinion.
> > 
> > Disagree here, I'm CCing Florian for information.
> > 
> > This notifier preserves RAM so it's *very interesting* if we have
> > kmsg_dump() for example, but maybe might be also relevant in case kdump
> > kernel is configured to store something in a persistent RAM (then,
> > without this notifier, after kdump reboots the system data would be lost).
> 
> I see. It is actually similar problem as with
> drivers/firmware/google/gsmi.c.
As discussed in the other other reply, it seems that both affected
notifiers do not store kernel logs and should stay in the "hypervisor".
> I does similar things like kmsg_dump() so it should be called in
> the same location (after info notifier list and before kdump).
>
> A solution might be to put it at these notifiers at the very
> end of the "info" list or make extra "dump" notifier list.
I just want to point out that the above idea has problems.
Notifiers storing kernel log need to be treated as kmsg_dump().
In particular, we would  need to know if there are any.
We do not need to call "info" notifier list before kdump
when there is no kernel log dumper registered.
Best Regards,
Petr
 
 
    
     |