Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3489866ybb; Tue, 31 Mar 2020 06:22:42 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsktGlvUCuCwQRb771YXV62wW55r1vAzE3ubwl+mUfrSMfRkQmMoDT1YE3LIYWuKKR3X9AW X-Received: by 2002:aca:6056:: with SMTP id u83mr2068494oib.95.1585660962150; Tue, 31 Mar 2020 06:22:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585660962; cv=none; d=google.com; s=arc-20160816; b=q1eT+ZByjsaHgUUhqCOCIUP4Axu5+Du4f0rAok0RuwPuIe2uBCRq5v8Z2ms+EDqVYR d16/QRTNI2xpjmR9Ipx4nYXX+bWRxofHSYGJ+e/rC5DqrDR+Q091/DAaNuab1YOlgiy+ jYN6a6+jjCgiIBFPxwQijXSXi2dx3TtSm3fJzz+V37/EcZFl8YmoUVEsoVNYeR9jAn4d ju3PGvAvJIx8BwUZbog59a+/FF/cghgZEqt/3Ni5kAVsXKFRHNr5bNLZ94Xd1rrisKsl PeJMt7kgzYZdisw3DwjOSDk4rsYtZigqQOUHvt00AMu+MCLNBplwFAGJIT1DyKHbsT9I SGYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:dlp-reaction:dlp-version :dlp-product:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=/6jDxhJzifeClllFJK5WHHKL8ifYLhEOyMSiyCkfLdo=; b=QW3spTdVYsd1hrPq2kxIK+QtZH/uJQLlSc93isSat7bCZnUE6uWTSNlwd0uCK+ONBM OUIJhecbmElvYQHmGZqyQXsCjEHXS/EEdw9FZmTREtV/UykGaE474molsTLhq/p1NLgX VHNJoBYc0vI2itjDlPbDESb9zbssAwvwR/jawYLOTnBp6kYvRp0asj/G+dQGstzI/KPz S6XEVhtLIjbV5uGIsYkepI+d0vak7HQma+FL/gilWQEnyvXrzXlY6MiYqOFoDuPscnQc RGn3D0CdeeyZ9p50tKSq/0XaVN+JX0U4vKJz+VsP0hmvWLlx0F2StuHWMd0gjMWR6XKJ ypKw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x23si4611055ote.264.2020.03.31.06.22.29; Tue, 31 Mar 2020 06:22:42 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730867AbgCaNWN (ORCPT + 99 others); Tue, 31 Mar 2020 09:22:13 -0400 Received: from mga03.intel.com ([134.134.136.65]:18367 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730358AbgCaNWM (ORCPT ); Tue, 31 Mar 2020 09:22:12 -0400 IronPort-SDR: 0EmT8GW6Y14/Cr2rcPvjtLt1P+nqQxSR4GMiO62odit97zNQ2t9jK383yHuc9T5t8xiUUJu5B0 JwPQ3kbDyyvg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2020 06:22:10 -0700 IronPort-SDR: PfzoMPliTOZUDWIt8lcXwVdoivjgEHvBDhM6mdnv2aih1BrUxls0K8JpHu5EBRBFFa0lteoVtK 2GOMDDlhQDyw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,327,1580803200"; d="scan'208";a="252240646" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga006.jf.intel.com with ESMTP; 31 Mar 2020 06:22:10 -0700 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 31 Mar 2020 06:22:09 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.225]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.217]) with mapi id 14.03.0439.000; Tue, 31 Mar 2020 21:22:03 +0800 From: "Liu, Yi L" To: "Tian, Kevin" , "alex.williamson@redhat.com" , "eric.auger@redhat.com" CC: "jacob.jun.pan@linux.intel.com" , "joro@8bytes.org" , "Raj, Ashok" , "Tian, Jun J" , "Sun, Yi Y" , "jean-philippe@linaro.org" , "peterx@redhat.com" , "iommu@lists.linux-foundation.org" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Wu, Hao" Subject: RE: [PATCH v1 1/8] vfio: Add VFIO_IOMMU_PASID_REQUEST(alloc/free) Thread-Topic: [PATCH v1 1/8] vfio: Add VFIO_IOMMU_PASID_REQUEST(alloc/free) Thread-Index: AQHWAEUbC4GB74LMekup8jIcF6WIFqhgVMYAgACL5QCAANaCgIAAmyhQ Date: Tue, 31 Mar 2020 13:22:03 +0000 Message-ID: References: <1584880325-10561-1-git-send-email-yi.l.liu@intel.com> <1584880325-10561-2-git-send-email-yi.l.liu@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: multipart/mixed; boundary="_002_A2975661238FB949B60364EF0F2C25743A21B065SHSMSX104ccrcor_" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --_002_A2975661238FB949B60364EF0F2C25743A21B065SHSMSX104ccrcor_ Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 PiBGcm9tOiBUaWFuLCBLZXZpbiA8a2V2aW4udGlhbkBpbnRlbC5jb20+DQo+IFNlbnQ6IFR1ZXNk YXksIE1hcmNoIDMxLCAyMDIwIDE6NDEgUE0NCj4gVG86IExpdSwgWWkgTCA8eWkubC5saXVAaW50 ZWwuY29tPjsgYWxleC53aWxsaWFtc29uQHJlZGhhdC5jb207DQo+IGVyaWMuYXVnZXJAcmVkaGF0 LmNvbQ0KPiBTdWJqZWN0OiBSRTogW1BBVENIIHYxIDEvOF0gdmZpbzogQWRkIFZGSU9fSU9NTVVf UEFTSURfUkVRVUVTVChhbGxvYy9mcmVlKQ0KPiANCj4gPiBGcm9tOiBMaXUsIFlpIEwgPHlpLmwu bGl1QGludGVsLmNvbT4NCj4gPiBTZW50OiBNb25kYXksIE1hcmNoIDMwLCAyMDIwIDEwOjM3IFBN DQo+ID4NCj4gPiA+IEZyb206IFRpYW4sIEtldmluIDxrZXZpbi50aWFuQGludGVsLmNvbT4NCj4g PiA+IFNlbnQ6IE1vbmRheSwgTWFyY2ggMzAsIDIwMjAgNDozMiBQTQ0KPiA+ID4gVG86IExpdSwg WWkgTCA8eWkubC5saXVAaW50ZWwuY29tPjsgYWxleC53aWxsaWFtc29uQHJlZGhhdC5jb207DQo+ ID4gPiBTdWJqZWN0OiBSRTogW1BBVENIIHYxIDEvOF0gdmZpbzogQWRkDQo+ID4gVkZJT19JT01N VV9QQVNJRF9SRVFVRVNUKGFsbG9jL2ZyZWUpDQo+ID4gPg0KPiA+ID4gPiBGcm9tOiBMaXUsIFlp IEwgPHlpLmwubGl1QGludGVsLmNvbT4NCj4gPiA+ID4gU2VudDogU3VuZGF5LCBNYXJjaCAyMiwg Mj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2hhdCBhYm91dCBwdXR0aW5nIGEgY29tbW9uIHBhc2lkIGZpZWxkIGFmdGVyIGZsYWdz Pw0KPiA+DQo+ID4gbG9va3MgZ29vZCB0byBtZS4gQnV0IGl0IHdvdWxkIG1ha2UgdGhlIHVuaW9u IHBhcnQgb25seSBtZWFuaW5nZnVsDQo+ID4gdG8gYWxsb2MgcGFzaWQuIGlmIHNvLCBtYXliZSBt YWtlIHRoZSB1bmlvbiBwYXJ0IGFzIGEgZGF0YSBmaWVsZCBhbmQNCj4gPiBvbmx5IGFsbG9jIHBh c2lkIHdpbGwgaGF2ZSBpdC4gRm9yIGZyZWUgcGFzaWQsIGl0IGlzIG5vdCBuZWNlc3NhcnkNCj4g PiB0byByZWFkIGl0IGZyb20gdXNlcnNwYWNlLiBkb2VzIGl0IGxvb2sgZ29vZD8NCj4gDQo+IG1h eWJlIGtlZXBpbmcgdGhlIHVuaW9uIGlzIGFsc28gT0ssIGp1c3Qgd2l0aCB7bWluLCBtYXh9IGZv ciBhbGxvYy4NCj4gd2hvIGtub3dzIHdoZXRoZXIgbW9yZSBwYXNpZCBvcHMgd2lsbCBiZSBhZGRl ZCBpbiB0aGUgZnV0dXJlDQo+IHdoaWNoIG1heSByZXF1aXJlIGl0cyBzcGVjaWZpYyB1bmlvbiBz dHJ1Y3R1cmUuID8/IHB1dHRpbmcgcGFzaWQNCj4gYXMgYSBjb21tb24gZmllbGQgaXMgcmVhc29u YWJsZSBiZWNhdXNlIHRoZSB3aG9sZSBjbWQgaXMgZm9yDQo+IHBhc2lkLg0KDQpnb3QgaXQuDQoN ClRoYW5rcywNCllpIExpdQ0KDQo= --_002_A2975661238FB949B60364EF0F2C25743A21B065SHSMSX104ccrcor_ Content-Type: message/rfc822 Content-Disposition: attachment; creation-date="Tue, 31 Mar 2020 13:22:01 GMT"; modification-date="Tue, 31 Mar 2020 13:22:01 GMT" Received: from fmsmsx103.amr.corp.intel.com (10.18.124.201) by SHSMSX101.ccr.corp.intel.com (10.239.4.153) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 27 Mar 2020 07:57:25 +0800 Received: from orsmga004.jf.intel.com (10.7.209.38) by FMSMSX103.amr.corp.intel.com (10.18.124.210) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 26 Mar 2020 16:57:23 -0700 Received: from jacob-builder.jf.intel.com (HELO jacob-builder) ([10.7.199.155]) by orsmga004.jf.intel.com with ESMTP; 26 Mar 2020 16:57:07 -0700 From: Jacob Pan To: "Liu, Yi L" CC: "jacob.jun.pan@linux.intel.com" Subject: Re: [PATCH v1 1/8] vfio: Add VFIO_IOMMU_PASID_REQUEST(alloc/free) Thread-Topic: [PATCH v1 1/8] vfio: Add VFIO_IOMMU_PASID_REQUEST(alloc/free) Thread-Index: AQHWAEUbC4GB74LMekup8jIcF6WIFqhbD3cA Date: Fri, 27 Mar 2020 00:02:52 +0000 Message-ID: <20200326170252.719ff28d@jacob-builder> References: <1584880325-10561-1-git-send-email-yi.l.liu@intel.com> <1584880325-10561-2-git-send-email-yi.l.liu@intel.com> In-Reply-To: <1584880325-10561-2-git-send-email-yi.l.liu@intel.com> Content-Language: en-US X-MS-Exchange-Organization-AuthMechanism: 10 X-MS-Exchange-Organization-AuthSource: FMSMSX103.amr.corp.intel.com X-MS-Has-Attach: X-Message-Flag: Follow up X-MS-TNEF-Correlator: x-ironport-av: E=Sophos;i="5.72,310,1580803200"; d="scan'208";a="394198175" Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 off the list On Sun, 22 Mar 2020 05:31:58 -0700 "Liu, Yi L" wrote: > + mutex_lock(&vmm->pasid_lock); > + pdata =3D ioasid_find(vmm->ioasid_sid, pasid, NULL); > + if (IS_ERR(pdata)) { > + ret =3D PTR_ERR(pdata); > + goto out_unlock; > + } > + ioasid_free(pasid); > + [Jacob Pan] this might be better to put under ioasid code such that it is under the ioasid lock. no one else can free the ioasid between find() and free(). e.g. ioasid_free(sid, pasid) if sid =3D=3D INVALID_IOASID_SET, then no set ownership checking. thoughts? --_002_A2975661238FB949B60364EF0F2C25743A21B065SHSMSX104ccrcor_--