Received: by 10.213.65.68 with SMTP id h4csp123342imn; Thu, 15 Mar 2018 11:29:51 -0700 (PDT) X-Google-Smtp-Source: AG47ELuekeL/NXloz9xP+REnakOswmH4ZBY/X8kHIPoa54NnU/6lWGXhTXsxc8jVpjRXrPMaHW3I X-Received: by 10.99.150.2 with SMTP id c2mr5122585pge.352.1521138591680; Thu, 15 Mar 2018 11:29:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521138591; cv=none; d=google.com; s=arc-20160816; b=BpE0wggPvYWPI/VPP3SOssGCLWFwPSwr0GSWBWN1N+6lEvQyhwq6YTCGPzhAdw1c+U dtbKlSCBnmMRxcCiWNDSQQ9Wi0teugbGyYfQOCxwF5z/pB3+nqgvwgPbh5SDGqRFImHs 0yokwiPPQK+CdLpNut8C9dfUDj6KGp1jIyg1Mu+8qu4eyvoR6bnwghRmL1NSVRQ7vuR8 CuPOhGsnJ4s3iFl8sZRBCFGeCkFiNZ4LEKr4h9PKtS6o1EcoMXMl2/rrkh5eC1w99I24 RJMzio5x8L+lwaS1qx9bV0yBAv6yjRRwLS573iW9FxhD1GbLLPecn7JQVKnzumFfvzr+ CuNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:msip_labels :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=yxmnwTFx/M5eloGN2yXvARchdhqVoc7YpG5uYOEDlWU=; b=xI6AHlZ8jdBggmXHYl35l63Ih47YlqmvQqhpLVyEcHuJNcvvzp87X9opsFVB4oT5yE uG7XMX8UNzEUfmgMT6k+0l7WsiqF/SYagYvoWwS8zuqDwn0JhOnQJ3Q/qY/xIA3v7FAX BFg4zLdaURpONo2F+FbyTwgf/6ccpVl+Yfyp/le21zVLO7mv9wP7JOJ0Ylyk+o6NHOdm YD8VViBcoFhbXOSJfRgsnQzCf5gVNaIslmiUGLC14owZ2YF7taNUYKk+jVRGLlhRjrKk OcMJXix3RJ/OXQm1a/F+5pnQxYUGVsEszN0DNyTELn2Wa+twVEIc+OBRA3HpY2FWiYpN F99A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=NC6l8QnM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 71-v6si4406144plf.575.2018.03.15.11.29.37; Thu, 15 Mar 2018 11:29:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=NC6l8QnM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1752485AbeCOS2k (ORCPT + 99 others); Thu, 15 Mar 2018 14:28:40 -0400 Received: from mail-pu1apc01on0119.outbound.protection.outlook.com ([104.47.126.119]:53944 "EHLO APC01-PU1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752274AbeCOS2h (ORCPT ); Thu, 15 Mar 2018 14:28:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=yxmnwTFx/M5eloGN2yXvARchdhqVoc7YpG5uYOEDlWU=; b=NC6l8QnMeDpqkXA07RZ9zm+3YwzDGpH5nizWA6KWJL7J/cOKvfJFkjEPfaz+kllS7jPypfMZGkDHyBcLVKGEN4pZfYyaqFls0rzROa2fiCT2SMX36Gg6kA09EqytXJUDI+E6AbKGu9ikW/uCxIrXhnN5e3Ba0M44AUavVY5rswM= Received: from KL1P15301MB0006.APCP153.PROD.OUTLOOK.COM (10.170.167.17) by KL1P15301MB0055.APCP153.PROD.OUTLOOK.COM (10.170.168.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.609.6; Thu, 15 Mar 2018 18:28:21 +0000 Received: from KL1P15301MB0006.APCP153.PROD.OUTLOOK.COM ([10.170.167.17]) by KL1P15301MB0006.APCP153.PROD.OUTLOOK.COM ([10.170.167.17]) with mapi id 15.20.0609.006; Thu, 15 Mar 2018 18:28:21 +0000 From: Dexuan Cui To: 'Lorenzo Pieralisi' CC: "'bhelgaas@google.com'" , "'linux-pci@vger.kernel.org'" , KY Srinivasan , Stephen Hemminger , "'linux-kernel@vger.kernel.org'" , "'driverdev-devel@linuxdriverproject.org'" , Haiyang Zhang , "'olaf@aepfle.de'" , "'apw@canonical.com'" , "'jasowang@redhat.com'" , "'vkuznets@redhat.com'" , "'marcelo.cerri@canonical.com'" , "Michael Kelley (EOSG)" Subject: RE: [PATCH v4 1/2] PCI: hv: Serialize the present and eject work items Thread-Topic: [PATCH v4 1/2] PCI: hv: Serialize the present and eject work items Thread-Index: AdO8O3aRSVmxMVp3Qwu6AztIm4xINgAQ81WAAAFLJ6AAATH/AA== Date: Thu, 15 Mar 2018 18:28:21 +0000 Message-ID: References: <20180315170131.GA22134@e107981-ln.cambridge.arm.com> In-Reply-To: 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_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Owner=decui@microsoft.com; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2018-03-15T17:55:01.7168159Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Application=Microsoft Azure Information Protection; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Extended_MSFT_Method=Automatic; Sensitivity=General authentication-results: spf=none (sender IP is ) smtp.mailfrom=decui@microsoft.com; x-originating-ip: [2001:4898:80e8::39a] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;KL1P15301MB0055;7:gjSrlPJ17AQwEqHx6/HAe6rEr8mTplsQMA0DBhCKVZYNtd+jDKUdM3XxmGDb0J2l3N/AexVRBMeTuD0Jco5wK4lUFkoKSLnBPs79WqprnNcCXs+u/zHtgr5dVQojcDOcShjKcF/cVDrFUegCc4QDChD5Zi4NB1v0HDZRTdC22aVAD2vusLXlglZG1T1WAY3UjVhbHs8YEEr6/j5nC1a36zHtrIYpMMD4WmbFslYUimgHOWwJr6G+242Ld+coUiAR;20:YfxZg93G6EuiW1tk1YC5rca69z1TGZKPtoLujCbSGBO2tN/ryTWtDJBQbRsGg1qbkBGP6FxmNvdO1MHMTIn10PM4iJxAIoILL3UgGXKMKpFCH+vWLQZ3XBxXVGAf/ZqyHDiT+VsfGsjdXUv6yBZ+n/p80bM6DvynQGL7D23QL2g= x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 1db45b65-9746-4785-4a3e-08d58aa2883e x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:KL1P15301MB0055; x-ms-traffictypediagnostic: KL1P15301MB0055: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(180628864354917)(9452136761055); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3231221)(944501244)(52105095)(93006095)(93001095)(3002001)(6055026)(61426038)(61427038)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123564045)(6072148)(201708071742011);SRVR:KL1P15301MB0055;BCL:0;PCL:0;RULEID:;SRVR:KL1P15301MB0055; x-forefront-prvs: 0612E553B4 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39380400002)(39860400002)(396003)(366004)(376002)(346002)(199004)(189003)(51234002)(316002)(46003)(53936002)(55016002)(59450400001)(3280700002)(2950100002)(2900100001)(229853002)(102836004)(86612001)(9686003)(8936002)(33656002)(478600001)(7736002)(6246003)(6506007)(68736007)(107886003)(6916009)(8676002)(74316002)(105586002)(81166006)(5660300001)(10290500003)(25786009)(81156014)(99286004)(14454004)(10090500001)(76176011)(7696005)(186003)(2906002)(4326008)(22452003)(77096007)(86362001)(575784001)(97736004)(8990500004)(3660700001)(6116002)(54906003)(6436002)(2940100002)(106356001)(7416002)(305945005);DIR:OUT;SFP:1102;SCL:1;SRVR:KL1P15301MB0055;H:KL1P15301MB0006.APCP153.PROD.OUTLOOK.COM;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: kyO+LXhoZciGI1K0NVSKWEGKe3F7KNcnEbNriXKPm9aKQE08c+Nv08ldw3ZzwpKhHHUbMeb8LbeNpBIieTEJTcJleyq8Lgt5PgesLob3eR8NUy12XJrLdMS/xtb4Cg5qjlG53II+QpKEU5rqewTCKJwWDcTyPqwK8eQuNLqu6tpaeWyFeiFfmBr0o8yCkOnyx8Au2z4V5TdaBIWQTxrYR8zRQ2IyC6MXXWAyzrhpFAdi5Y7qjN23CvV9sUEVfMj/DhlxttNqcIoDMtZOicnEudgcv6f2BS97Z/0UGlG4/p2bruIZcPFcZXEFeVuOniPHae4sO1sFFEC0qRLbNatJmQ== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1db45b65-9746-4785-4a3e-08d58aa2883e X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Mar 2018 18:28:21.1974 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1P15301MB0055 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > From: Dexuan Cui > > From: Lorenzo Pieralisi > > I need to know either what commit you are fixing (ie Fixes: tag - which > > is preferrable) or you tell me which kernel versions we are targeting > > for the stable backport. > > Lorenzo >=20 > Sorry. Here I was hesitant to add a "Fixes:" because the bug was there t= he first > day > when the driver was introduced. >=20 > Please use > Fixes: 4daace0d8ce8 ("PCI: hv: Add paravirtual PCI front-end for Microsof= t > Hyper-V VMs") > or > Cc: # v4.6+ BTW, the bug here is a race condtion which couldn't be easily hit in the pa= st, probably because most of the time only one PCI device was only added into t= he VM once. But now it's becoming typical that a VM can have 4 GPU devices so = we start to notice this bug. With 7 Mellanox VFs assigned to a VM, we can easi= ly reproduce the bug by "hot-remove and hot-add VFs" test: general protection fault: 0000 [#1] SMP ... Workqueue: events hv_eject_device_work [pci_hyperv] task: ffff8800ed5e5400 ti: ffff8800ee674000 task.ti: ffff8800ee674000 RIP: 0010:[] ... hv_eject_device_work+0xbe/0x160 [pci_hy= perv] ... Call Trace: [] ? __schedule+0x3b6/0xa30 [] process_one_work+0x165/0x480 [] worker_thread+0x4b/0x4c0 [] ? process_one_work+0x480/0x480 [] kthread+0xe5/0x100 [] ? kthread_create_on_node+0x1e0/0x1e0 [] ret_from_fork+0x3f/0x70 [] ? kthread_create_on_node+0x1e0/0x1e0 Code: ... RIP [] hv_eject_device_work+0xbe/0x160 [pci_hyperv] ... BUG: unable to handle kernel paging request at ffffffffffffffd8 IP: [] kthread_data+0x10/0x20 PGD 1e0d067 PUD 1e0f067 PMD 0 Oops: 0000 [#2] SMP =20 Thanks, -- Dexuan