Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp205391pxb; Tue, 28 Sep 2021 19:34:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvHSLD9nrk+yAw0r/Cz/ef7M3SEJ0jthsfxtPfvBMa2oJI5rHeewHMeQXa6aUUb5Z2h/ad X-Received: by 2002:a17:906:154c:: with SMTP id c12mr4703566ejd.76.1632882855620; Tue, 28 Sep 2021 19:34:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1632882855; cv=pass; d=google.com; s=arc-20160816; b=TUD1/ZnMp/jRl6MzPW2J5HOGGec9vrNj2okkBm+m0OYCBYPMZqsTzUSe8Upp58Yxlf g+KeQZ9MNOOu9UbjDkO6FQv1DGvP1iKqTFmFVwSjrXwm5ncteS3lawarpfYhUN2UPFlZ Pfe+d8cCnW5gWoUdIkIESEJUErrSBg2jWdnG/czg7jIIOINwneaJUJaiTDDLbwjbwoSz gA02pmxVUpkPFc2NEEowvJ8oNd/0eBcpnURilxzIb1XY2WqVUQF5uBKU62TT1RyV/Ent pTvhwqhweXAaKziVD0eCgQVQc0y1ejxcRGJzBYPCUCtg1a67ha45Qi05sv2biV8U/b5k wZQQ== 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 :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=ckcHQpvTNlEgl5V2dP2OoIHAUwxRSJmOiQnN2HZiOxU=; b=hzAyQhOEvGRKmC2BAWUj9SomXs0XVt4VGG8wyEsQwe69b3+FIVz0kuQ5GoVR4SyHi2 NLUe28ruj2qS0HLYm2zSHZh0umko4x9PWr/QjSj8Tmu0xd1D+HEvwYmwWxmaSe3qVbuf QIurQJ/6i94AYJrpIB324jWLtjMQ+0kPDBj4LzHutL1M5sAbIVO2fqWp2Jot8i9p1Q4q VFurDYG/eEpZdwfIpap9XIv4lRb03RJSEfURDuN0RuZAZWaZguE1fgU70HtsIQ0zhEMm 6WuS0bFosFKi8wrJNs1yAvAIONCJP6PFRQTBKsOHKqjTOtFxDvN9YhUkHg7CyQBPXlYX k4mg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=ENA23bwS; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id j4si1052199eds.47.2021.09.28.19.33.47; Tue, 28 Sep 2021 19:34:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=ENA23bwS; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S243797AbhI2CbH (ORCPT + 99 others); Tue, 28 Sep 2021 22:31:07 -0400 Received: from mga14.intel.com ([192.55.52.115]:55537 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242877AbhI2CbG (ORCPT ); Tue, 28 Sep 2021 22:31:06 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10121"; a="224501845" X-IronPort-AV: E=Sophos;i="5.85,331,1624345200"; d="scan'208";a="224501845" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2021 19:29:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,331,1624345200"; d="scan'208";a="456852609" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by orsmga002.jf.intel.com with ESMTP; 28 Sep 2021 19:29:24 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 28 Sep 2021 19:29:24 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Tue, 28 Sep 2021 19:29:24 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.42) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Tue, 28 Sep 2021 19:29:24 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KvX6HKEHcHyByyvPNJf8SBONr4sT4YAFyl03H7+oVffNZn+efWuW1dhFnO3TDHwi591lBFdiaAvGd6qI/SyO4qjGpaYbZiAihiBGdKzDNWMjzReTmv41A7rI1KYdDf+uKDdwhrNxnEkJ/i9Qi8HcZDpg3zYTND+xnFHG9p0KuUvVgE+vyCUtYNILu8ifkP6os80H2PalkgtagfEDS6G/TpzfzhK31BicHisqgprw2/W8Y/at4fjUfqLGpXXjkiNcJdHc2cGo2p5cugut6b4R8Ou80cJG5AbJXBGKyELtE5ZS7wKs9ghKElwpAr63mzhF23C1uVtJbNeef01P56GXsg== 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; bh=ckcHQpvTNlEgl5V2dP2OoIHAUwxRSJmOiQnN2HZiOxU=; b=OdE1RYk+Z57oatqhB4vsEau607gkg2OrnDPqL4GzIzrY3VhHD/HbGRGQe2UEZnoFeNpl2n9L4kCctQMpk5bvjXKBQBMuLS7HeIqixv2oI/fCqlufVTvU2MIfzHAZKzeNRxUdPzFlU93bO1nCZl2BqxC/V1NOFhVQFl0Si3Pnwap7TGvtlV3VCDRvnFv5LOYpX2IzoeiJhW3MgZ7AOALfrm6/6xA0iybdAY5M0CPrtmxEEG1U2gvA5NKiNxxcuVx/IjRBo2ji5I49PzWq79jnz6aV+lAc6QB7ACouqVSDRvgLgH6JiaMRLNoiGwJ9M887ssFeY7/qklKcQNW1YFwNPw== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ckcHQpvTNlEgl5V2dP2OoIHAUwxRSJmOiQnN2HZiOxU=; b=ENA23bwSxtAJK9dXATPIqc97yTOyzD6TeXXbtNvYSkq9LbKxj/6cQUsJ3UfuIvVAa+yoDUCNDS471RKqjpR2+xdeuu91DRn9B79WGPrr+Je8gD4UfrXVb5hjkrlVYvjh0ym2BbDnUil5DiaPdkjS6dvH34H8cCITACEF2e0xUJI= Received: from BN9PR11MB5433.namprd11.prod.outlook.com (2603:10b6:408:11e::13) by BN6PR11MB1796.namprd11.prod.outlook.com (2603:10b6:404:103::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.18; Wed, 29 Sep 2021 02:29:18 +0000 Received: from BN9PR11MB5433.namprd11.prod.outlook.com ([fe80::ddb7:fa7f:2cc:45df]) by BN9PR11MB5433.namprd11.prod.outlook.com ([fe80::ddb7:fa7f:2cc:45df%8]) with mapi id 15.20.4544.021; Wed, 29 Sep 2021 02:29:18 +0000 From: "Tian, Kevin" To: Lu Baolu , Jason Gunthorpe CC: "Liu, Yi L" , "alex.williamson@redhat.com" , "hch@lst.de" , "jasowang@redhat.com" , "joro@8bytes.org" , "jean-philippe@linaro.org" , "parav@mellanox.com" , "lkml@metux.net" , "pbonzini@redhat.com" , "lushenming@huawei.com" , "eric.auger@redhat.com" , "corbet@lwn.net" , "Raj, Ashok" , "yi.l.liu@linux.intel.com" , "Tian, Jun J" , "Wu, Hao" , "Jiang, Dave" , "jacob.jun.pan@linux.intel.com" , "kwankhede@nvidia.com" , "robin.murphy@arm.com" , "kvm@vger.kernel.org" , "iommu@lists.linux-foundation.org" , "dwmw2@infradead.org" , "linux-kernel@vger.kernel.org" , "david@gibson.dropbear.id.au" , "nicolinc@nvidia.com" Subject: RE: [RFC 06/20] iommu: Add iommu_device_init[exit]_user_dma interfaces Thread-Topic: [RFC 06/20] iommu: Add iommu_device_init[exit]_user_dma interfaces Thread-Index: AQHXrSF9WDj+Z+DU+UqMJ7tQK2EdmauuvK2AgACKnbCAALw6gIAHYVYAgACkNwCAAQ1OQIAAT36AgAAbKoCAAAj5AIAAzVwAgAABm9A= Date: Wed, 29 Sep 2021 02:29:18 +0000 Message-ID: References: <20210919063848.1476776-1-yi.l.liu@intel.com> <20210919063848.1476776-7-yi.l.liu@intel.com> <20210921170943.GS327412@nvidia.com> <20210922123931.GI327412@nvidia.com> <20210927150928.GA1517957@nvidia.com> <20210928115751.GK964074@nvidia.com> <9a314095-3db9-30fc-2ed9-4e46d385036d@linux.intel.com> <20210928140712.GL964074@nvidia.com> <4ba3294b-1628-0522-17ff-8aa38ed5a615@linux.intel.com> In-Reply-To: <4ba3294b-1628-0522-17ff-8aa38ed5a615@linux.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: linux.intel.com; dkim=none (message not signed) header.d=none;linux.intel.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 64f1f41b-19a2-4189-01bf-08d982f0f07e x-ms-traffictypediagnostic: BN6PR11MB1796: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: hFd/7VjvnVzy7gye8MYZb7uCvTWXNtSunuwbttbf4yc+yiDSiIYhpdYgSG8fMYhE+703aenZSquM6YOJHh8XIDX3ClHHyrK1dtVzvUux71jmtXd7vmU46wU6ynxBzuDaDoQ2dPpCvPIqIVgqgKTI7h6ucdKitoQ7+AimmVpbtjI2eigHJO1jWF/nSrl0RZxnufvp51timnHLvKSNbwoHTKDOZYAiD29KGfS4LbOZny86UytzL0YJ0N6PaIiGVzIkl8VjliJh4Uoa/KTjUbthi7uA1hEzmtVDP7KRMZWuVJDCk37RNgVnpsDSOEXlRzBHuwEU+eiG5yQX/nBvbJWWKF6QKAHCLCPXVnWacD2Ql2o//FPH9NgdOUEu5oCjWyGCDmgSKG7tOAl4rkMLSDzd/DxErgVv6b0ZsrJ1Mx9WWk1uLKwVe4ldnD1Plu2mWzLjKBAsGU60yjIqoM6+p+paS6xzYNPl8bV+/mwXJpPiOgdzRhmYhM2a+U0xa84TyDtAAHFGSFz1wNCgam0U/7H+SvqxmkzR1S8VxCN3f/xD6pcpRFAgjCSnbPxXdIAXUOD9FJO7y3xwzSTqhGOB7Pi0naKb05GgM00fm3QuKOXGUy0DwYtVuI2PcLdr2IJG3YwVSPK1lvUaGQM5ydm+2v6NwPVaJ7aqIwza6rfCuvZrZcaUg0g+7HEtkdp/5hTB6ZxCVFFC3jFVnpKN01wVaqtXIPciki1BpUuG+4vVagk948W55fDqIbCTHfP4kH07PXCGFih4c1KyKP06gATYVT6U6adeGJcPvsRB6tUCZo9vVBQ= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN9PR11MB5433.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(8676002)(8936002)(122000001)(38100700002)(26005)(186003)(2906002)(83380400001)(86362001)(966005)(38070700005)(508600001)(64756008)(66476007)(71200400001)(6506007)(52536014)(55016002)(66446008)(54906003)(4326008)(76116006)(316002)(7696005)(110136005)(66556008)(66946007)(33656002)(9686003)(7416002)(53546011)(5660300002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?RktSNTdReWlBbzcrMnR4SXovWGtsYWhvblRnRjkrNUZ6bzd4S1YwaWhxYVFr?= =?utf-8?B?b2VydE1CT1Bkejh5azlocVBRcWpLd2hHZnFBRkhOZHd4Um1IMk9kZFZlWHZY?= =?utf-8?B?bnh2NWQwdlN1TzVRdVB6NkpXMEgxdWdndjF0OVJYWTl3YzJxMTRyWmxuTEhB?= =?utf-8?B?M1JvS3hGeDhMZ2Vudk9DQ3VOdG43Y3FRbVh0WkhkeXdBaVZ6NFYwN0dNZ0c1?= =?utf-8?B?V2tELyt0NnFkMlZWRzFtZGdoWE9mSU1rZWsxaW9hUFJ3eE9qM2loTlpMYWp0?= =?utf-8?B?MHVoQ3QySlRucEJFdVRJQjhEUjVFK0JCOWgwdFJmSTY3Zm45UElYU3Y3ajdX?= =?utf-8?B?YkNDa21Vd0Y1eFdXN3NIT3lndWYzTTVjTkQzNi9TM3gxVzliL201WGhrdlVS?= =?utf-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VD?= =?utf-8?B?UTJZK0pMb2dEQWVkbmEzTFo5ZTlORG5KU0U3eXltQmpndGtGWlRSUndzUDE0?= =?utf-8?B?b1BiYUNnMVQ3N1Frdk5pdU4wSXZzRHZuWlYwTll6RUJneHhYbjUyRlNGTTV6?= =?utf-8?B?d3JMdyt0bUJZeWxtZUtMcFF3TklZWkducDBRcnpKdlNXV3N6czVUeEU4d3Z3?= =?utf-8?B?Q1lITW5KajdpdGE0Kzg1bmUzcFphdHBOMGNzckJqT0pyWTlEa25QNnpLZG1i?= =?utf-8?B?aDFhRWMrODNNdEZzZUNMMDlMWVdvTTFLRWtHT0xXdDV1R01Lay9rLzZKbllN?= =?utf-8?B?WVNsOVl1dmM1S2MxOUdXYm5pOXBpdW1NeG5FSTdrMWh5MUNtSldxclpEbm8z?= =?utf-8?B?S1l2bkR0SjJteTZZdEdpT2tLWFZGRTZ5UkkwcVY5K1JLQmtmaDkvckxVazRD?= =?utf-8?Q?FAUOTXl9FJhwzom7Kxx48vkUxjZuuXPqdCIbd/S?= 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: BN9PR11MB5433.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 64f1f41b-19a2-4189-01bf-08d982f0f07e X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Sep 2021 02:29:18.5330 (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: 4Fx33jgAfGGA4fq6MWfwjgVBkdqC9XMVIeK2d8A/6FyjpnYoc8SSYNOdm4A3J8Az91kmK/bhLUk6CqOM/6Bo+Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB1796 X-OriginatorOrg: intel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