Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11C31C636D6 for ; Fri, 3 Feb 2023 14:48:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233449AbjBCOsg (ORCPT ); Fri, 3 Feb 2023 09:48:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231663AbjBCOsc (ORCPT ); Fri, 3 Feb 2023 09:48:32 -0500 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01BC0AD27; Fri, 3 Feb 2023 06:48:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675435711; x=1706971711; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=3ZXfW3OZ9rOl30CkxCVAbG0KUPE0+HfzveRINET94sI=; b=Qdnc6FB+76CEt7/qZ07s4qEW0Ldd9WuYW6Q45REq4AZ15AeVG8PqVaNx 0Yw3XTO+UQ3Zyd8kylow3KchFpWHpVZlaNwsiilDCRI4tsS4pfe510qXt Ix8oHOJ5WgCiwquIn/J6GK8T8lg1+j8BJhavSOLgskobz0/H2Sd8wCWG5 SBzXlFKRdF/ob87PqawDeMW6GZKal0inYxDVL//ljQQWpx5ApZbJhncQ1 +7Xn1FgLYkzlk8voV4nHp/2Ef2QXQuIRxHNtmkVBn398gfw2sdNMsqnh9 fFb3jIKO02fM+avVVJ2Ze9WR7lhXKCVt9UzrdZd85nrsQpsCXZfpzVdOk g==; X-IronPort-AV: E=McAfee;i="6500,9779,10610"; a="326459099" X-IronPort-AV: E=Sophos;i="5.97,270,1669104000"; d="scan'208";a="326459099" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2023 06:48:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10610"; a="729284308" X-IronPort-AV: E=Sophos;i="5.97,270,1669104000"; d="scan'208";a="729284308" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga008.fm.intel.com with ESMTP; 03 Feb 2023 06:48:31 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Fri, 3 Feb 2023 06:48:30 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Fri, 3 Feb 2023 06:48:30 -0800 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.46) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Fri, 3 Feb 2023 06:48:30 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gYj9mCSrRDxq3Fwqh0jQ0j2lSqF587KkjI6y9O336U4ttziUzTKvZV4Nqq4hGWQs+1qFFruG1v15CtaVJ1k+nl0GE23NLMq6rGJasHMPYlnJvOC737H5i0BhGEW9tcSuUTPfxvHOX1K967cgTmOqw1mMp03x738cVwKBLb1+vS8Wu+iKQs4NYvKLws0N9NbMMYLXd0bDGJhmIEVJFDIHiOK8VkCDN0Ym8tXtXGRJ/OuqSb2YHw4zp8goHbQSIL+pABdRaf1HGIQmmHfnaNPRSuJ34A1xswS9BSvQaYkGV/JXrUeMNs1BFRrw67Yn6qcPsRUOPZpC1T05k+ymRbjmeg== 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=3ZXfW3OZ9rOl30CkxCVAbG0KUPE0+HfzveRINET94sI=; b=C5l2rb+zO2EhLeUFg1orZdEGE5uWKHAmkvLBtIoZogV9YZ9BRIBPyZBdiMMiweHTk4g5xzE1Wb0aoi/nMGD9HHKCIslV4FoYpb1AWG4q37tGV4TgiKDuVwfbBwv83qoe3B9UMVwyHue9ibln68WqASDSwBAO4GtoFPG3cfZKjEY4MTlsFVTf0ma+f2ZBTh/9xTRYK/8l/r5TJH2nfTvQKNw8CpkXiYFVLnQ96kL/EsSYDdqCQcPCfSshiiUkswSDModZydtdbwN8g3+FMBCIxXaTmbPMJ4CqULyc9fBjrDeCJtHNnLQJWx015IbYCb0JohsEKSMhf9JpFh7PbDB3Vg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DS0PR11MB7529.namprd11.prod.outlook.com (2603:10b6:8:141::20) by CY8PR11MB6867.namprd11.prod.outlook.com (2603:10b6:930:5d::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.31; Fri, 3 Feb 2023 14:48:26 +0000 Received: from DS0PR11MB7529.namprd11.prod.outlook.com ([fe80::e1fa:abbe:2009:b0a3]) by DS0PR11MB7529.namprd11.prod.outlook.com ([fe80::e1fa:abbe:2009:b0a3%4]) with mapi id 15.20.6064.024; Fri, 3 Feb 2023 14:48:26 +0000 From: "Liu, Yi L" To: Matthew Rosato , "alex.williamson@redhat.com" , "pbonzini@redhat.com" , "jgg@nvidia.com" CC: "cohuck@redhat.com" , "farman@linux.ibm.com" , "pmorel@linux.ibm.com" , "borntraeger@linux.ibm.com" , "frankja@linux.ibm.com" , "imbrenda@linux.ibm.com" , "david@redhat.com" , "akrowiak@linux.ibm.com" , "jjherne@linux.ibm.com" , "pasic@linux.ibm.com" , "zhenyuw@linux.intel.com" , "Wang, Zhi A" , "Christopherson,, Sean" , "Tian, Kevin" , "linux-s390@vger.kernel.org" , "kvm@vger.kernel.org" , "intel-gvt-dev@lists.freedesktop.org" , "intel-gfx@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v3] vfio: fix deadlock between group lock and kvm lock Thread-Topic: [PATCH v3] vfio: fix deadlock between group lock and kvm lock Thread-Index: AQHZNyMjAB7EXHsi0Ue5s99XWjtHT6687BlAgABckoCAAAYT4A== Date: Fri, 3 Feb 2023 14:48:26 +0000 Message-ID: References: <20230202162442.78216-1-mjrosato@linux.ibm.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DS0PR11MB7529:EE_|CY8PR11MB6867:EE_ x-ms-office365-filtering-correlation-id: efdd87fa-335c-41e4-4a7d-08db05f5b4f2 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: h9TOQ5ny+Xp4jYus25mg2zfBlQ97yhEmTj4A0FRNoWktzj7DWZjaMpMfdN7//a5Hkajv+T9U0vjDI0XwOQDqGYoXkOpBcS2O8BPKjbMcQwnxeooP0pdHg96o1UnndDprZxgVSJQX5WcL3VRezk1Z8O1yLw/PqfNHuJFKirpSCW05CQrxf40FgXPWf30A5WMWszGKk3Rgfa/kl3SozyFCfSbZ5Zb498CsVqTucqDLlfYa1Qu8XeroA7gG0qVEeAfw/ynxh7lOu7DOJ2S4elnTyj5MI+DyAWhICCdhNBE19mzaONZrSM899cmXm9okl6uNZ21+n0jUVhBjKvWOa6sr8yrMM6tAliMkJBb7ueogQZL1TQdCNzWcqua3bl5p5c/iCwIiDuGUFOj27kpkRSC9wigZGIaNKqZQzD+ilXezKxF6IvK/Vv2SI8jFoSyMP55VrjXGCQCHgSPcQHouBRmZ4pWlTFmNcXknV2LUdMzi3CZqmtErMW1zPxSbNiz1+WO2ReQCCDsGL9P3D+v9auEoVewPadcyy+CMlbHje1ET1p+nhAEQHvyjd5vCPCyZjU6oWM5/nYNsQpDR8biCwf20gk9HrZx74FoHjoSbhvEh1y9/NISERA42qktuj20u9qWWewWBo4qIy6hxNoPKK9pMsp1GqwDzW2m9L4+E4zB7jmH/uaCFpvJyjZ5hrYe81n0A09cNfli9WvI66cZw1qH+8TNcPTgb2oiwDMervKObZTo= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR11MB7529.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(136003)(376002)(396003)(366004)(39860400002)(346002)(451199018)(33656002)(82960400001)(86362001)(122000001)(38100700002)(478600001)(53546011)(6506007)(83380400001)(9686003)(186003)(26005)(38070700005)(54906003)(110136005)(2906002)(8676002)(76116006)(66476007)(5660300002)(4326008)(316002)(66946007)(66556008)(66446008)(7696005)(71200400001)(64756008)(7416002)(41300700001)(8936002)(52536014)(55016003)(13296009);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?K0lVbHJQZFQ3ZzVkeFhsRHNjR05YZlo5K2RPRll2U21Dakp3L1BKNlNmN2xt?= =?utf-8?B?Vmly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ZURKUXV4TE1qWkJLNC9zTXhOMHlC?= =?utf-8?B?allSUTFqN0E0UHFoR2VtQzFmYzNFejVMaCsvenhhR29xOE45cFFjS2syck1S?= =?utf-8?B?RWVQaUNkcWxjbG9tU0JWSXRSbytpR0VmSjRySFZWdzl3TmlkRVJiQ2Q3NEQz?= =?utf-8?B?VU5mWUZNK25wa21mYUx6cUtWNFBwRFdYNmQ0L3cxY3k5eUp5ZllLbWlLMlBn?= =?utf-8?B?MXZBYlFOaWtSVjBGNDlaaUdjR3VLMnl2TGpkVXB2SEtxOVB4UzdQTE1wZFVy?= =?utf-8?Q?L+8JIWz4qXZOQ1wp/5daVlcY/?= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7529.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: efdd87fa-335c-41e4-4a7d-08db05f5b4f2 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Feb 2023 14:48:26.3805 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: AKoCJJtc06dIdgcFvKkczZER1pcYiXuEpBLQls8ygJf1mPg1fiwS4u22nekhZRDKePmTkWWQoS+vF2lWSjWyxA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR11MB6867 X-OriginatorOrg: intel.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org PiBGcm9tOiBNYXR0aGV3IFJvc2F0byA8bWpyb3NhdG9AbGludXguaWJtLmNvbT4NCj4gU2VudDog RnJpZGF5LCBGZWJydWFyeSAzLCAyMDIzIDEwOjI2IFBNDQo+IA0KPiBPbiAyLzMvMjMgMzo1OCBB TSwgTGl1LCBZaSBM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