Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp653386pxb; Thu, 17 Feb 2022 11:41:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJzpyKbvNrIlH6HYAvZsWOL65OJR63K3YWHbkcijUiN1ookEJWyXjrfwAnBTnuFaaS8U47a2 X-Received: by 2002:a17:903:283:b0:14d:6e68:27cb with SMTP id j3-20020a170903028300b0014d6e6827cbmr4198877plr.80.1645126891952; Thu, 17 Feb 2022 11:41:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1645126891; cv=pass; d=google.com; s=arc-20160816; b=DRqYuN47CciJM3j1MboHSO2xkIUehwnDW1JRqz/PyFhapfK2R5VDaIUAZSRnpM3THs ufhKiEjCZgTRvSgUo+Ib+ciF/h+Ree7khpJt1INY/WRF2NQo2e8ckPSOeVdvuZ3IrWzo bnNt7ODHLcN17Z+c9l3wstS3FRo2pRoOd4n0RruqHvFHFXxs8Ae5+nFACDR0HXJSuxKT 0FsdSMYSGV/nfH44cC390nq+Yepc4EKHwRIVP2rW2OYL4CkKgI5v200+QQ63CoFBIYko Vyd66q0nwysPEggKAY/UL3ek9WKuKmiBNLo9PyTL23bytkOgXPf5YoX2BxSKcks+NCsu b5BQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :msip_labels:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=9Pv9uIdekkIMb8S85Kxm2R0YqYVcKW25TQ4CkWw4X/E=; b=fGI7rT6kEQSRMZwdfMVsyUbvrjE7ICB04XtnKzF0zB1qbbYQ40mERqdu7/us1Kw8iy 53bUiTW16H+Bw4M6HBZ5Ny6RnLjQk5AcfzYwWifbLM6DemGI2oUhWW2n2FcVdRafvXPh 2YxbWkTpBtnn7afYDhNt6C5JOmwawqUG5qOMndgZuVsKicG1btNB+WrjoUeJymfzLxtu nfjrH9TS6ZrvBqes2grQfymfXlRBDD9Dla/OGk+igdOS5FdQivGjAMb6NYxjGcd72f+T Dw1honCebwgiFqLGN+CfdBPGP63I4WkL2nZIaLLLAwHChqofkqX5Qs2AQ1CEBUM5lEhu yALQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector2 header.b=c6wNdMUK; arc=pass (i=1 spf=pass spfdomain=microsoft.com dkim=pass dkdomain=microsoft.com dmarc=pass fromdomain=microsoft.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e9si23924369plh.450.2022.02.17.11.41.15; Thu, 17 Feb 2022 11:41:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector2 header.b=c6wNdMUK; arc=pass (i=1 spf=pass spfdomain=microsoft.com dkim=pass dkdomain=microsoft.com dmarc=pass fromdomain=microsoft.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239976AbiBQQof (ORCPT + 99 others); Thu, 17 Feb 2022 11:44:35 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:60576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229501AbiBQQod (ORCPT ); Thu, 17 Feb 2022 11:44:33 -0500 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2070a.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe5b::70a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AA13AC; Thu, 17 Feb 2022 08:44:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Shkuyn7kcK5W9A3nkw3EXMPapBPYN3Samqsmj4nhgbbeZh9JWmnQ5cDYP1FU3FolyHusfs75X03O7HIOWbBhpmyB9zmTtNZfusJoyEz6XHeZ1TeIlFUKo0LHsFmkveUyPoy1YuiHlkH6vV5LVdXRtmv7ZrmPnCxw9j9uGWreUmojH1kqCpdrk5zItQ3/M9UE6bIhglsKUNuu9oZC0yKsrjcPgaB5welR6nH2SxeuB0mAKI0OwbQveLcrfXh77wr8uPwj+Xuyyn8LhrOKLHxH1B/qQnuFCQT0Y1KsiS+rXHfjajpUMqjjJM1OZzbJR5GAdW1q/KpH5hhYZm2cGQAFMg== 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=9Pv9uIdekkIMb8S85Kxm2R0YqYVcKW25TQ4CkWw4X/E=; b=Ji5rl6m6iavSmeu7j0ZCJqczN6/Fv+Z0KlRvbfqnCFH+BiHiPDJtYDlLk4iO7DWdRZEv0OpKlNPOXw0SlAJXu1y3XKZAkuAJqFneO2+/UUuFgWqkqBiZwio9puHvfP6N3UyKhdgpR+vXuY0bdVPP/dCVMBiirY4zkIFdsuVU1/WH/slsUN0HkS1qnD3dy0/TS9ZW/y5TdXwz2TmD4NfJ8d0cHZjjcBsEtHCzMfIP4UGkBPp57+onrwzYz6TRbslszbnvvPanAy1ijD6UOt/SU9cw2JRKUAyov4AEcOj22F5Y31PndEpxotf+DzqWSaFPQ+5mghWXQyiiDcUI22DWoQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9Pv9uIdekkIMb8S85Kxm2R0YqYVcKW25TQ4CkWw4X/E=; b=c6wNdMUKZO5uonFsnbmAKY7Fo2Tz6H2fagjdHOmprq6YhTVJ3GgYbnLxpJIi+KyU9bEsc9jwAf4zRad588zHj0M/ev1hvFRhz1u/csEoLWinm82XW3PergBM77W/jEBnUkZ4yjqDelJ5o1yhzhgoW0DBXFmm989ZKw1HlEwPPk0= Received: from MWHPR21MB1593.namprd21.prod.outlook.com (2603:10b6:301:7c::11) by CY4PR21MB1587.namprd21.prod.outlook.com (2603:10b6:910:91::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.10; Thu, 17 Feb 2022 16:44:13 +0000 Received: from MWHPR21MB1593.namprd21.prod.outlook.com ([fe80::ad12:1420:5435:34e4]) by MWHPR21MB1593.namprd21.prod.outlook.com ([fe80::ad12:1420:5435:34e4%5]) with mapi id 15.20.5017.009; Thu, 17 Feb 2022 16:44:13 +0000 From: "Michael Kelley (LINUX)" To: Stephen Brennan , KY Srinivasan , Haiyang Zhang , Stephen Hemminger , Wei Liu , Dexuan Cui CC: "linux-hyperv@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH] drivers: hv: log when enabling crash_kexec_post_notifiers Thread-Topic: [PATCH] drivers: hv: log when enabling crash_kexec_post_notifiers Thread-Index: AQHYIgympyDoJIn0jEOJRMc1uX9nZayX9IWw Date: Thu, 17 Feb 2022 16:44:13 +0000 Message-ID: References: <20220215013735.358327-1-stephen.s.brennan@oracle.com> In-Reply-To: <20220215013735.358327-1-stephen.s.brennan@oracle.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=3ffdb1fd-c82a-4029-8393-d58b4452847a;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-02-17T16:35:01Z;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 488fb92a-0e63-402c-a000-08d9f234bae1 x-ms-traffictypediagnostic: CY4PR21MB1587:EE_ x-ms-exchange-atpmessageproperties: SA|SL x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3513; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: IrnyBaJ9b+1XsQC0uBnaD/I4fWE1YTyqf8RpJMgU3bUvEPxTUYks9Ii5rAZW0YkzaVXigjExlH8Q/3x8QVU2FN/h2S2SJ2GEpDF2oHwzH1os7zzLCvU7niG4+WlCx2OSNiYSpJH4ux0esj2mw/8I/poOfFskz5aHhG9I1+Kuj/K7Tivp9keTo8CHlur9BdnnW1AGtUXLaMM7uctn0vIX6ULgEA2BevD3Zb3dCDKUTb0AKOXbFhT+ffTIFsoyTrjTR2U9vr4vWFLNrdTO1lSb7+UK86UNW/X8jwViEoHsBuUvCzaY4z1XgvR0dKT9EA3jE7wBX8OXK2wUBl+o16GsoS9qcDAVlLul6IB+waXkE2qQhT6+15XZsqrkRQdm6+WnlGb8Ie65E5zNHcLKdo5WsXAtoAmcSir+PiQLZJAJmTqBE1xy9lzFJvkq/LRpD26m5Iy5zMBzNabi0qEIYVCRtmn8i96SW//ndd1csZdmVxSh3OfEUBZunKBl5mikipIDvSmwuBuJlge9xUvK/PWRmxphjSBKdrNWezIgUaPeCSOn99pk8wq9tIS5/RFpO0AYzi3RRU8XtQI78B35XJeerNdccQ3fStcYwhH0Q2tvVXcMmLDyJrLiPel2Zew5Dt3FB+mURMElEX2NVmM8pqhsQZvdq/MsqQo+3Ic6W3+gqoMbpOAEU1NQ7dKg4mjlOkYWoHdKf/t6tu39CGZZJaOK00rZ7LFR31hZPA9X+KBsuTjRb7ScLJxldI+8Q07V8eL50fteYWbWA6/NWQoj1+KGsOpCIrI7AkHx7WdUdDgLtWENpESi6PFAOAmPiaIh1yBkDHObMw8acCWNvl1VhTy8dg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR21MB1593.namprd21.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(54906003)(110136005)(2906002)(8990500004)(82950400001)(82960400001)(86362001)(316002)(33656002)(6636002)(38100700002)(83380400001)(10290500003)(55016003)(508600001)(71200400001)(8676002)(66446008)(66946007)(76116006)(66476007)(66556008)(64756008)(38070700005)(6506007)(9686003)(186003)(966005)(4326008)(8936002)(26005)(52536014)(122000001)(7696005)(5660300002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ZBNhj8TrQ+qr/5bbzGBs5Enps1gcRdiTAu57y9rwgLKliSXcmfO7HK5FmpWz?= =?us-ascii?Q?/cv0ere38a4wM92kIxkw1e2T4l3FSVTq/YcM4VGjRxEhXmateYHW56FD+MF4?= =?us-ascii?Q?eni+3HfSMevLzZfnTJ5kylB28+kV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ZBe6NpB2rXRMBvSgXNr41fVq47lmZoyVmFFLSsRUJ/1Bdtef0UaXLXeMVjwj?= =?us-ascii?Q?VkZMmyXAgjalRsArXk3V3R0KYWvLuSttmmG1Rod2/8LZnXaveAKgHhR6VmQi?= =?us-ascii?Q?YkafN2bI4CPIgJYqx9eNN9dTwBhNk5KVSsFJVPaUZPm7o7OHJB58j2VTybu0?= =?us-ascii?Q?X8OXcoUMv0fEjtKMM3KMEvejpHgQ4MW/aYa/KEdkqsHygziG5Sz6FGbp/mr6?= =?us-ascii?Q?FKHXvp1yBYunJ+g847F9FqpEAFNH1Bp7vtXx/fiQOcLobxenPTOue4s0fwo0?= =?us-ascii?Q?ofL3sqdWzSgHqtD3nTjUrjrS4jmBRpA+wWMfCO9XjRZqEf3l54Z3GSqGcukv?= =?us-ascii?Q?28F0qDS6ULKjxPHC6/2RcUNJ35ea44FhAwVsIgAG0qTt4qZb6/mpYvPR7b8Y?= =?us-ascii?Q?/GACBVYndSjbGwNGXEdXy2DbMXAGlVwHyWFabbM4Lzyc7EkMbliyWeo0wqIq?= =?us-ascii?Q?7Vkm+0G5C/ITWv6ieIrCpYtkPLlFhs9G9NZRDR8GpcRxTM3vv9NOHmkjCfkK?= =?us-ascii?Q?D/Vh4kLslf1jBRdR6wI8DmayhWEpudCl31iuln8T2JU+jTItL/qZ/KAgV+UK?= =?us-ascii?Q?SI5OSV7gDP6vkOu6nBaPDqlJvwgZXujW4JAx3gD2MCPKd3e15BHuQIZxHuHq?= =?us-ascii?Q?dPdw6w=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR21MB1593.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 488fb92a-0e63-402c-a000-08d9f234bae1 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Feb 2022 16:44:13.4555 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 3Uu40z/aGFWj7AhCS2waPZ6GSQIIN7TXwGLuTnkv5YrKw+pFZly9Xp3uIdAT7WnqhW023xxFANeENoP7xRGn0A+CIgGzq8OflGPN/TzbX64= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB1587 X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stephen Brennan Sent: Monday, February= 14, 2022 5:38 PM >=20 > Recently I went down a rabbit hole looking at a race condition in > panic() on a Hyper-V guest. I assumed, since it was missing from the > command line, that crash_kexec_post_notifiers was disabled. Only after > a rather long reproduction and analysis process did I learn that Hyper-V > actually enables this setting unconditionally. >=20 > Users and debuggers alike would like to know when these things happen. I > think it would be good to print a message to the kernel log when this > happens, so that a grep for "crash_kexec_post_notifiers" shows relevant > results. I'm OK with adding this output line. However, you have probably seen the two other LKML threads [1] and [2] about reorganizing the panic notifiers to clearly distinguish between notifiers that always run vs. those controlled by "crash_kexec_post_notifiers". If the changes proposed in those threads are submitted and accepted, it is likely that the kernel log message in this patch would become unnecessary. But since we don't know when those proposed changes might come to fruition, adding the message for now makes sense. Reviewed-by: Michael Kelley [1] https://lore.kernel.org/lkml/20220108153451.195121-1-gpiccoli@igalia.co= m/ [2] https://lore.kernel.org/lkml/20220114183046.428796-1-gpiccoli@igalia.co= m/ >=20 > Signed-off-by: Stephen Brennan > --- > drivers/hv/hv_common.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/hv/hv_common.c b/drivers/hv/hv_common.c > index 181d16bbf49d..c1dd21d0d7ef 100644 > --- a/drivers/hv/hv_common.c > +++ b/drivers/hv/hv_common.c > @@ -79,8 +79,10 @@ int __init hv_common_init(void) > * calling crash enlightment interface before running kdump > * kernel. > */ > - if (ms_hyperv.misc_features & HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE) > + if (ms_hyperv.misc_features & HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE) { > crash_kexec_post_notifiers =3D true; > + pr_info("Hyper-V: enabling crash_kexec_post_notifiers\n"); > + } >=20 > /* > * Allocate the per-CPU state for the hypercall input arg. > -- > 2.30.2