Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp135774pxy; Wed, 28 Apr 2021 00:49:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJFFRDFiLm4qE9DtZLeNXnNS5Oa18nrFQ7e2V43vYmcNzifbuIrerV0VyQo2aES5zpsgeV X-Received: by 2002:a17:90a:2e03:: with SMTP id q3mr2603483pjd.206.1619596171607; Wed, 28 Apr 2021 00:49:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1619596171; cv=pass; d=google.com; s=arc-20160816; b=F5zk9wLw61ms+RLnofgpUIMJY5YOEbnyPclicvkPs2v3YU8KIZmw2WdTWPf5ujsNuy FgzMtC5sWFlM3bFhugQ4ASlPy0Ou7q8+pt/o3xF1IudCQooSxphTCPslZhEw3zvrElJl tZDw9lUaroCY9Qo2U4MH3hEUnTxbElaaoYwov5lZlKbh+DAvFwDLlsAuuKzeFBa3ExkI 7jR/pVtW0PJavQ0uT7GNZF2p5Fd14QykW6FY9SloYk2w9EhbcHBOLXIL6MyPeemYwlXp qZcjsQp/XdZebJ+jF/gL2Iv/Aa+tBfAPbD+M/bgdcUaNtwRlWbFk+cVikVqJpAnpuwlb hZ0w== 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 :dlp-reaction:dlp-product:dlp-version:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature:ironport-sdr :ironport-sdr; bh=NPz8Og2u6aLtUq4xQukjUxKU/TryxrPNsjv9pdxRKds=; b=BTB+LGP0uakkbLk803QV3vL3XWPzX97sJemM0jLpbZqWly3/uz5ltk68cjPaRCeAiw 5JPQJk+n1pBjBTE2pArycXTT/crE+hLjzx6kFS4wzewAh974o56DRcm6YgOnabD7ft8x Lu9mvnqO3+v/2d3nbYHFTIke8tVYMZB09n7gRuvSdUAcx0ffngiz+qV46E3Du2lJDbR4 p/yWdCs2GDtnSnxf2DX+mR/0EEa1K08qDL89ifMr5WS6JlE4YvAhZngvPqW4M1jmDxYG s5ILdTSOd7953Tl8alh/v+jfCI8wOMdvG0iePhI1TQFcYfRzFncLoxDvSaspttTNCRd/ HWMw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=jJCG5zvl; 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 m7si2812054pgn.256.2021.04.28.00.49.19; Wed, 28 Apr 2021 00:49:31 -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=jJCG5zvl; 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 S236807AbhD1Hsq (ORCPT + 99 others); Wed, 28 Apr 2021 03:48:46 -0400 Received: from mga18.intel.com ([134.134.136.126]:2080 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230145AbhD1Hso (ORCPT ); Wed, 28 Apr 2021 03:48:44 -0400 IronPort-SDR: DvUXpg9Z5lj3tGCOI33YqoOkoipi4EWSKL3gC5cHU93sNJeo5lb8o4hBC3oGRIDnTEjqxC0iXC V7lTW4RPvC8w== X-IronPort-AV: E=McAfee;i="6200,9189,9967"; a="184166403" X-IronPort-AV: E=Sophos;i="5.82,257,1613462400"; d="scan'208";a="184166403" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Apr 2021 00:47:59 -0700 IronPort-SDR: jRsk+mnRHA+16n4Vwp48FtD2PwJG5+lZ5DxAiKSFcqotvTs40U+ETWaCG17FodTTa/53LI16vb d3B8lKIDWf1Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,257,1613462400"; d="scan'208";a="425515986" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga007.jf.intel.com with ESMTP; 28 Apr 2021 00:47:59 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Wed, 28 Apr 2021 00:47:59 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Wed, 28 Apr 2021 00:47:58 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Wed, 28 Apr 2021 00:47:58 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.36.55) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Wed, 28 Apr 2021 00:47:58 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TuJMJdbHlR/e2ZikRyymbXSbkYlGfHxzg8dylBewyL+C81OpA7nv8zDx0YYreVB0Bc6oo8aAKabisfnaZNJv0s6fDAct4OK6jkCb0jeuokJCDpTI+u6+InUBuMZEDkDn5ddi3/7xNh9Qrt6lJ1ERSlB1IhQospflaVO2i2E5WFrB4C0Ks7stnWP+T2KyRWTRDzR63MJsr1NAuQMc96dAWyH4EhSMwyyEMb5yDEW22u/Hz0NKvUiWBBcijMhVc+T5ZNfh5WX+BuHoNDYOJPNxgh8ZdUl/t9JeNIXrtdfz7o26yTMcog1KLmjKhqxnDgFDPEenWHVhd/7feVHz8RexjA== 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-SenderADCheck; bh=NPz8Og2u6aLtUq4xQukjUxKU/TryxrPNsjv9pdxRKds=; b=DzlTAxbZu/UjrFx/CwjOp5talSHbq+p2BZ2248Pwe5BQGfn0/Orxg9NMoLetdfzP0mpP1BJcuadzwyTF0J7SNSYyWiTqpRrLrMfF5fgFixqXLcZ76chWMohbL7MzjBPUVjVo49Y0qLavafFzec8eZtJciVl4qBChR5SITuQuv5mKMRXlV38dpOgjxYDQFJVG4qH8ZWrwonJqRz8inlDgQ6FG3kvB3KAIaoT5JzPHbw0EA4XWT8AUv1ss2UHvLcJI+zazTVgxpEcgKiUOeq22O6lZpWEDXCUmUzqQVvIA0ydghkdS4sz9xmdToQykJ4cNu/jKwArjIna5q1tNWOvegQ== 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=NPz8Og2u6aLtUq4xQukjUxKU/TryxrPNsjv9pdxRKds=; b=jJCG5zvl8P6o5Wzp0UCOaCfnNhAMmHfj2hZoAEa3YDQ7s1oLAHv0dcE2x3wlYUbOnb2TjiobQsTWffLGkd3fw3ENASw7MBLW+n/OkQ4SEK8SfST5NJW2jSLQW6oL+UZcKXcOVol840XjEqfb81zElQzAQWOGLoZAMkmCK4ZqKe8= Received: from MWHPR11MB1886.namprd11.prod.outlook.com (2603:10b6:300:110::9) by CO1PR11MB4915.namprd11.prod.outlook.com (2603:10b6:303:93::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.20; Wed, 28 Apr 2021 07:47:56 +0000 Received: from MWHPR11MB1886.namprd11.prod.outlook.com ([fe80::75b0:a8e9:60cb:7a29]) by MWHPR11MB1886.namprd11.prod.outlook.com ([fe80::75b0:a8e9:60cb:7a29%9]) with mapi id 15.20.4065.027; Wed, 28 Apr 2021 07:47:56 +0000 From: "Tian, Kevin" To: Jason Gunthorpe , David Gibson CC: Alex Williamson , "Liu, Yi L" , Jacob Pan , Auger Eric , Jean-Philippe Brucker , LKML , Joerg Roedel , Lu Baolu , David Woodhouse , "iommu@lists.linux-foundation.org" , "cgroups@vger.kernel.org" , Tejun Heo , Li Zefan , Johannes Weiner , Jean-Philippe Brucker , Jonathan Corbet , "Raj, Ashok" , "Wu, Hao" , "Jiang, Dave" , "Alexey Kardashevskiy" Subject: RE: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs Thread-Topic: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs Thread-Index: AQHXDZub0CDG82VGXUmLEYgvMuPs4KqKkLIAgACg94CAAC72gIAAD04AgAADogCAAErUgIAETQEAgAOaswCAB7C3gIAAhxQwgADYDACAATCSAIAAVGMAgAELsQCAACiXgIAAVBgAgAAaMwCAAAESAIAABy2AgAAgOYCAFdCAgIAAppUAgADsNgCAACqygIAHsmaAgAAzsYCAAAjdgIAAD/yAgAAcQgCAADqggIABMLWAgAAMMYCAABwXgIAABlIAgAAsEgCAABE9AIAGpToAgADKIACAAObmgA== Date: Wed, 28 Apr 2021 07:47:56 +0000 Message-ID: References: <20210421175203.GN1370958@nvidia.com> <20210421133312.15307c44@redhat.com> <20210421230301.GP1370958@nvidia.com> <20210422111337.6ac3624d@redhat.com> <20210422175715.GA1370958@nvidia.com> <20210422133747.23322269@redhat.com> <20210422200024.GC1370958@nvidia.com> <20210422163808.2d173225@redhat.com> <20210422233950.GD1370958@nvidia.com> <20210427171212.GD1370958@nvidia.com> In-Reply-To: <20210427171212.GD1370958@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.213] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: fb10c083-cd2d-4b83-4eaa-08d90a19efe5 x-ms-traffictypediagnostic: CO1PR11MB4915: 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-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: MHzN0f6B8chpsWAA8s9tGJ/g7tghPkb6+H0ElNcsM6xAdS7+ApZn7ZkKa/86RO63c4roR8ETGtP7Z2I+4pRpTbJocZ+MWdcMNnUrfPKUao0hZiUghITcmUOmkCxhSglDcCGwE+8psmMeDUsSYoXu17ZQZlg7bnisum8TS3M8smeI+o7Ub6HyGHLE7S8hLxitpdhs3p7hC4aILYuXkeputv3F/IWsyMYqpiujPl2i3K24eB/q06/CAF+foLWa/7FbcWZXiT7QhyJUWd/VGHDo/ycmyONX2kf40I8bH4s1JnjuvFowFaeSI8Jh5w/FFjdoiQPcg2dKfnm/8Inm1RgIOFqJ4wzazyOvYpjE2NrlhgxjRV+SK+xiH0t5hwzv60aKSpwkugdagXUB483z4n3L+bm1mz4kMjOsHOSfD65q52/o/x1vJwfphiaBPFmwars5PkfOszxUFBLaKfMguLRHLajlKpz/PBU1pkEaCXouWLpWEuzs3L6IrAFCKmM66YcH69PLCp4w+kQpeKdu+3F8kGwgVZwGyLHg2l0zASEllObu2Trxo5aQ74KrhwLkOo6MYEjVHKKuvFd0rTPoD1YjagrFiPQR4T1pCXPib6iJGmA= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR11MB1886.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(136003)(376002)(396003)(39860400002)(346002)(7696005)(33656002)(110136005)(4326008)(52536014)(76116006)(71200400001)(66476007)(5660300002)(6506007)(86362001)(55016002)(2906002)(26005)(8676002)(186003)(478600001)(38100700002)(122000001)(8936002)(64756008)(316002)(66556008)(66446008)(7416002)(66946007)(54906003)(9686003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?DGoDlZ9cs9a7Ml0TyBNBSl9Imww4usUn9F+58QJkpapbd4fr96cSFkCs4VCv?= =?us-ascii?Q?ZTbg0NVeFTdp4yHzMuVEfFN7G1wiQF+2gff5rSubHRZgEkT30JLcx3mnpWJ5?= =?us-ascii?Q?GBZ2mqCpW0cD4cgAMjDhQVG3ojqMlNz6STDMncskfZsA36V+Hiq3nfGxT+nt?= =?us-ascii?Q?m8jmjobwcsnstL4Pi1hV4QMAZ36c1F70AlI1o0PvAk/Iij9sIj4cGGLQEkzk?= =?us-ascii?Q?E5JyD4+s3+ZRpeRgRtQ2lIfWiaDpVSAsEgNrZrZnqYb9+4nsBof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r03B79Y9CJaH5qNJ3uipe0X/UaVyO+?= =?us-ascii?Q?BQhTGyAvSjHnm3k8CSCBlUnbpwTd5Nq8aJEp72bBPcBG58E0OI2X7xyj1zdu?= =?us-ascii?Q?96eN8hEn0C5MceQFrmKI1dfzwdB08vvmkhia8JsO+Mz4eOILY1MAeHTufwmG?= =?us-ascii?Q?C4m0Fp9/gYhyq6oSYjgRiAK0?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1886.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fb10c083-cd2d-4b83-4eaa-08d90a19efe5 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Apr 2021 07:47:56.2719 (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: UtI6aDH/bnX0XTvxGEgxQoNroWf5wY058TcATyWvHZiEHWc13rasxH33jbG6SakGlLItflHuiORuIURLGIV4Kw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB4915 X-OriginatorOrg: intel.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > From: Jason Gunthorpe > Sent: Wednesday, April 28, 2021 1:12 AM >=20 [...] > One option is VFIO can keep its group FD but nothing else will have > anthing like it. However I don't much like the idea that VFIO will > have a special and unique programming model to do that same things > other subsystem will do. That will make it harder for userspace to > implement. Hi, Jason, I have a question here. Based on discussions so far, it's clearly that the new ioasid uAPI will differ from existing VFIO uAPI a lot, e.g. ioasid- centric operations, no group fd, no incompatible domains, etc. Then=20 I wonder how we plan to support legacy VFIO applications in this=20 transition phase. Earlier you ever mentioned the desire of directly replacing /dev/vfio/vfio with /dev/ioasid and having ioasid to present both VFIO and new uAPI. Doesn't it imply that we have to copy the=20 VFIO container/group semantics into /dev/ioasid although it's a special=20 programming model only for VFIO? Alternatively we could keep all the container/group legacy within VFIO and having /dev/ioasid support only the new uAPI semantics. In this case VFIO will include a shim iommu backend to connect its legacy uAPI into=20 drivers/ioasid backend functions for backward compatibility. Then VFIO will also support a new model which only uses its device uAPI to bind to new ioasid fd w/o using any legacy container/group/iommu uAPI. Does this sound a plan?=20 Thanks Kevin