[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>, "akpm@xxxxxxxxxxxxxxxxxxxx" <akpm@xxxxxxxxxxxxxxxxxxxx>, "bhe@xxxxxxxxxx" <bhe@xxxxxxxxxx>, "pmladek@xxxxxxxx" <pmladek@xxxxxxxx>, "kexec@xxxxxxxxxxxxxxxxxxx" <kexec@xxxxxxxxxxxxxxxxxxx>
- From: "Michael Kelley (LINUX)" <mikelley@xxxxxxxxxxxxx>
- Date: Tue, 3 May 2022 17:44:03 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4f7/UQ5vrJT1CcOWidK1fYhaFM8aZiWH/zdIuOdIqFI=; b=dqXqNwHhYIB0ER3lhh/rWVNm4ZKERdEz94orJ80nKUJUfttp/wnfqSikyK7yKt7iYkc6ldUXEJma4nPZMqUqXLWeqBqYn3BdE2tOa/aMKvNt9gj8PT3QNHIdWaLn8iw/avUa7KnRHtq2eRRYGwyR7FuPyrdomPVLH2oCaEXcOUnrjeVd/oiCqcnnAd/up+tug/xBARgpdJCDI/9XQpeIX67uH77GUYwgNe77hWgiQhX7h5Bo1kYMNhBf7E0pbeQS5Uw18UPkTEbTw5p8eddfnQ5xc5RmwbnOWVCy1bs9vErVywk/hlTEcX9LIiT7Ea0jg2aEKuPewehmuyrotSaXxA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XbijhHt7DvBA3OPHj5t3ISIXnYrTgZbDSRSHY/XkvVdsezGq0sD81iZ//y42Fi2Hm7oEIw1H8MDO35AWd9+dF5auopwSIzFPe74YuKNP1Oz83tgle2Aq1+PBTM7yyQtPdPg8dBbkObOOfdcHgPQwCYlcKGuWJ4R156bFid/pLdBUkpw8ikAC6TwUDIHN2W7gUY/PlWHAT3ycgAIsFpuAIVIlReaxm4w8jPPJRfFHTDrwfikPx+q0M2KAr4BP+Mkr2WGz6Mo0WABvgcYmWGlqDonrI6A0W3sVJYI01Hwlyz83gHMY/7BNmBCbcS7mV6SQ4sjfr4xbKlH5do/EEq/TuQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com;
- Cc: "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, "bcm-kernel-feedback-list@xxxxxxxxxxxx" <bcm-kernel-feedback-list@xxxxxxxxxxxx>, "linuxppc-dev@xxxxxxxxxxxxxxxx" <linuxppc-dev@xxxxxxxxxxxxxxxx>, "linux-alpha@xxxxxxxxxxxxxxx" <linux-alpha@xxxxxxxxxxxxxxx>, "linux-edac@xxxxxxxxxxxxxxx" <linux-edac@xxxxxxxxxxxxxxx>, "linux-hyperv@xxxxxxxxxxxxxxx" <linux-hyperv@xxxxxxxxxxxxxxx>, "linux-leds@xxxxxxxxxxxxxxx" <linux-leds@xxxxxxxxxxxxxxx>, "linux-mips@xxxxxxxxxxxxxxx" <linux-mips@xxxxxxxxxxxxxxx>, "linux-parisc@xxxxxxxxxxxxxxx" <linux-parisc@xxxxxxxxxxxxxxx>, "linux-pm@xxxxxxxxxxxxxxx" <linux-pm@xxxxxxxxxxxxxxx>, "linux-remoteproc@xxxxxxxxxxxxxxx" <linux-remoteproc@xxxxxxxxxxxxxxx>, "linux-s390@xxxxxxxxxxxxxxx" <linux-s390@xxxxxxxxxxxxxxx>, "linux-tegra@xxxxxxxxxxxxxxx" <linux-tegra@xxxxxxxxxxxxxxx>, "linux-um@xxxxxxxxxxxxxxxxxxx" <linux-um@xxxxxxxxxxxxxxxxxxx>, "linux-xtensa@xxxxxxxxxxxxxxxx" <linux-xtensa@xxxxxxxxxxxxxxxx>, "netdev@xxxxxxxxxxxxxxx" <netdev@xxxxxxxxxxxxxxx>, "openipmi-developer@xxxxxxxxxxxxxxxxxxxxx" <openipmi-developer@xxxxxxxxxxxxxxxxxxxxx>, "rcu@xxxxxxxxxxxxxxx" <rcu@xxxxxxxxxxxxxxx>, "sparclinux@xxxxxxxxxxxxxxx" <sparclinux@xxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "x86@xxxxxxxxxx" <x86@xxxxxxxxxx>, "kernel-dev@xxxxxxxxxx" <kernel-dev@xxxxxxxxxx>, "kernel@xxxxxxxxxxxx" <kernel@xxxxxxxxxxxx>, "halves@xxxxxxxxxxxxx" <halves@xxxxxxxxxxxxx>, "fabiomirmar@xxxxxxxxx" <fabiomirmar@xxxxxxxxx>, "alejandro.j.jimenez@xxxxxxxxxx" <alejandro.j.jimenez@xxxxxxxxxx>, "andriy.shevchenko@xxxxxxxxxxxxxxx" <andriy.shevchenko@xxxxxxxxxxxxxxx>, "arnd@xxxxxxxx" <arnd@xxxxxxxx>, "bp@xxxxxxxxx" <bp@xxxxxxxxx>, "corbet@xxxxxxx" <corbet@xxxxxxx>, "d.hatayama@xxxxxxxxxxxxxx" <d.hatayama@xxxxxxxxxxxxxx>, "dave.hansen@xxxxxxxxxxxxxxx" <dave.hansen@xxxxxxxxxxxxxxx>, "dyoung@xxxxxxxxxx" <dyoung@xxxxxxxxxx>, "feng.tang@xxxxxxxxx" <feng.tang@xxxxxxxxx>, "gregkh@xxxxxxxxxxxxxxxxxxx" <gregkh@xxxxxxxxxxxxxxxxxxx>, "hidehiro.kawai.ez@xxxxxxxxxxx" <hidehiro.kawai.ez@xxxxxxxxxxx>, "jgross@xxxxxxxx" <jgross@xxxxxxxx>, "john.ogness@xxxxxxxxxxxxx" <john.ogness@xxxxxxxxxxxxx>, "keescook@xxxxxxxxxxxx" <keescook@xxxxxxxxxxxx>, "luto@xxxxxxxxxx" <luto@xxxxxxxxxx>, "mhiramat@xxxxxxxxxx" <mhiramat@xxxxxxxxxx>, "mingo@xxxxxxxxxx" <mingo@xxxxxxxxxx>, "paulmck@xxxxxxxxxx" <paulmck@xxxxxxxxxx>, "peterz@xxxxxxxxxxxxx" <peterz@xxxxxxxxxxxxx>, "rostedt@xxxxxxxxxxx" <rostedt@xxxxxxxxxxx>, "senozhatsky@xxxxxxxxxxxx" <senozhatsky@xxxxxxxxxxxx>, "stern@xxxxxxxxxxxxxxxxxxx" <stern@xxxxxxxxxxxxxxxxxxx>, "tglx@xxxxxxxxxxxxx" <tglx@xxxxxxxxxxxxx>, "vgoyal@xxxxxxxxxx" <vgoyal@xxxxxxxxxx>, vkuznets <vkuznets@xxxxxxxxxx>, "will@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 Gow <davidgow@xxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Dexuan Cui <decui@xxxxxxxxxxxxx>, Doug Berger <opendmb@xxxxxxxxx>, Evan Green <evgreen@xxxxxxxxxxxx>, Florian Fainelli <f.fainelli@xxxxxxxxx>, Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>, Hari Bathini <hbathini@xxxxxxxxxxxxx>, Heiko Carstens <hca@xxxxxxxxxxxxx>, Julius Werner <jwerner@xxxxxxxxxxxx>, Justin Chen <justinpopo6@xxxxxxxxx>, KY 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>, Scott Branden <scott.branden@xxxxxxxxxxxx>, Sebastian Reichel <sre@xxxxxxxxxx>, 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: Tue, 03 May 2022 17:44:23 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=9d743df4-32f4-4832-b2bd-4bac7169537f;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2022-05-03T17:32:26Z;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47;
- Thread-index: AQHYWonjjKMtrubrvUiw63ryI2yC7q0HJOjggAANHwCABkBo0A==
- Thread-topic: [PATCH 19/30] panic: Add the panic hypervisor notifier list
From: Guilherme G. Piccoli <gpiccoli@xxxxxxxxxx> Sent: Friday, April 29, 2022
11:04 AM
>
> On 29/04/2022 14:30, Michael Kelley (LINUX) wrote:
> > From: Guilherme G. Piccoli <gpiccoli@xxxxxxxxxx> Sent: Wednesday, April 27,
> > 2022
> 3:49 PM
> >> [...]
> >>
> >> @@ -2843,7 +2843,7 @@ static void __exit vmbus_exit(void)
> >> if (ms_hyperv.misc_features & HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE) {
> >> kmsg_dump_unregister(&hv_kmsg_dumper);
> >> unregister_die_notifier(&hyperv_die_report_block);
> >> - atomic_notifier_chain_unregister(&panic_notifier_list,
> >> + atomic_notifier_chain_unregister(&panic_hypervisor_list,
> >> &hyperv_panic_report_block);
> >> }
> >>
> >
> > Using the hypervisor_list here produces a bit of a mismatch. In many cases
> > this notifier will do nothing, and will defer to the kmsg_dump() mechanism
> > to notify the hypervisor about the panic. Running the kmsg_dump()
> > mechanism is linked to the info_list, so I'm thinking the Hyper-V panic
> > report
> > notifier should be on the info_list as well. That way the reporting
> > behavior
> > is triggered at the same point in the panic path regardless of which
> > reporting mechanism is used.
> >
>
> Hi Michael, thanks for your feedback! I agree that your idea could work,
> but...there is one downside: imagine the kmsg_dump() approach is not set
> in some Hyper-V guest, then we would rely in the regular notification
> mechanism [hv_die_panic_notify_crash()], right?
> But...you want then to run this notifier in the informational list,
> which...won't execute *by default* before kdump if no kmsg_dump() is
> set. So, this logic is convoluted when you mix it with the default level
> concept + kdump.
Yes, you are right. But to me that speaks as much to the linkage
between the informational list and kmsg_dump() being the core
problem. But as I described in my reply to Patch 24, I can live with
the linkage as-is.
FWIW, guests on newer versions of Hyper-V will always register a
kmsg dumper. The flags that are tested to decide whether to
register provide compatibility with older versions of Hyper-V that
don’t support the 4K bytes of notification info.
>
> May I suggest something? If possible, take a run with this patch set +
> DEBUG_NOTIFIER=y, in *both* cases (with and without the kmsg_dump()
> set). I did that and they run almost at the same time...I've checked the
> notifiers called, it's like almost nothing runs in-between.
>
> I feel the panic notification mechanism does really fit with a
> hypervisor list, it's a good match with the nature of the list, which
> aims at informing the panic notification to the hypervisor/FW.
> Of course we can modify it if you prefer...but please take into account
> the kdump case and how it complicates the logic.
I agree that the runtime effect of one list vs. the other is nil. The
code works and can stay as you written it.
I was trying to align from a conceptual standpoint. It was a bit
unexpected that one path would be on the hypervisor list, and the
other path effectively on the informational list. When I see
conceptual mismatches like that, I tend to want to understand why,
and if there is something more fundamental that is out-of-whack.
>
> Let me know your considerations, in case you can experiment with the
> patch set as-is.
> Cheers,
>
>
> Guilherme
|