Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp474433pxt; Thu, 5 Aug 2021 04:29:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+HDfDi3CbHPikdwo4Vmbwl2Nl1v/Yw+fcZDNndRMGy861vpOSdrqHm7yzpPctkfmbPqaJ X-Received: by 2002:a5d:9eda:: with SMTP id a26mr663842ioe.166.1628162971620; Thu, 05 Aug 2021 04:29:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1628162971; cv=pass; d=google.com; s=arc-20160816; b=tZzBJriUE7rNVnOLQtkipDh2eB0kzHhFtWiCyLMPI6m32Zdbs59YBRdPVicX8qGeQu Uj4FF555G52cBa8qFpbhD04Xa31SAukbnP9d9L7y3DCZCI6WJ0RGxQHvV7qp3RVYetko hd4/7a+d9xJXwfAGQKHd9DflKxUz/Bn4+KsR1iudVJbCW266yQJLQ1OXCx6JUKZWeAJZ vd2XKOwYl2g34uXELTRyM+g87e8lWy4bIKsoNBb6xdRqSUaevm6QgzfXsZ04GayeruqE YQ4TXnDqEtXisb6YwLjvFysw+zpLolwHpevQ3WZSv6+Qcm0YiIe3QR/b2nwOuF4/Yedk IPRQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/ABRnOqvn6Pyo06AlJXTr47rHRrubGpQns2+C1Oqcyw=; b=udjbRwc9MP2hnTN57yUzMhYmFMUAGhtsmZLGHU7LnVEyVcDT4gD2gA57UudtrrmqGw Q+JA2LREnEYTsnRizdYwMbMTCog3JWE3zxPROfSDa7oB/PB/h/blnRHwZvARUUxD8VmR jmWL5eHzqSrYM6Qz05PRWUzDmZ2xz8FVLFm0npe8pTVNw7DCOQDvc1U+StFIQgJBebVm Y2bXL4LncGBsf5aSlxtxcd3cD8haOvJr4DXDbEVgFONyobxHpcnDvg2ptY192HsaDdc9 YNGdejreqYIjcdm2AaGimj3+q8xcdAIgOb4BxwSM65YQBmvG2c2f8XA5h0TtAm2oekGQ nAEQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=jfQfSSo7; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t2si5072582iop.79.2021.08.05.04.29.19; Thu, 05 Aug 2021 04:29: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=@Nvidia.com header.s=selector2 header.b=jfQfSSo7; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241076AbhHEL1d (ORCPT + 99 others); Thu, 5 Aug 2021 07:27:33 -0400 Received: from mail-bn7nam10on2074.outbound.protection.outlook.com ([40.107.92.74]:32608 "EHLO NAM10-BN7-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S241022AbhHEL1c (ORCPT ); Thu, 5 Aug 2021 07:27:32 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xdq8JHUG9KU7c3qn0WP24uYxcoshQjuXWe+rSsr/EDLfSrUf07ZUOcEsPM9G72vi7sucdQu8GKQmVFwUIHC753+tIZ/+a/HI+ADN0wdxmS2alDIIAbqSjjqGxSWTwIVwdORqQbVaig1wPBapR7+IxlRuS4lWLNgtqSDH2nK7ugkp/+nGN33gqv/amfPVdSlQ3J+7v4pyBr751rN7RgfPmhtZUxjgjmb93a1xeHS/eyXStnJQ+tyIz6vc2+O7ciq4WFAS6EOeZRD5TLRpu00WwC0nAmwwgLharTPVIAeipDY66FjUR5o9WNbROfLq9wO+EvLBsjzFLBNLATIc5+JTIA== 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=/ABRnOqvn6Pyo06AlJXTr47rHRrubGpQns2+C1Oqcyw=; b=lGublZaKZUDukJFGyxFN38LBU7SqZGr4wOwDmxqe0cI5rTBDV4iqEEmXrlwMeM+fJ2IUfy5EaxMpK5mTRto1bJRwq+mCgS9XeEBFRy3mXUw6QVeUn6E5/m9DRx+T1usaUDqWfUSn6EemsuB1p/EFmqJWWfrs7ixhoDnon/FCTpovG0xxYd4MWvk6HIliZAHadEVk2zIAXJtD8vOEyH/7bO6Wta8PD1NbRl9+7VsB1yjDxVcE3+JPmPVA8ZzRyfv7QtihckeGPAW01kPzZTKE9ELFcJnz+WOdVfEab7mq0m02tD6sTe4iKbN03gQEt1IVmP9PUd7BUJDs4bAlBVoPTw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/ABRnOqvn6Pyo06AlJXTr47rHRrubGpQns2+C1Oqcyw=; b=jfQfSSo7Devzo9CRUyeJDX2gsn9Sy2IWO8pzuOC4hQqzLvkI1fECQeaRnkqY4drZxocBZKAQCHsg8xBYmBD+xp45YyeeanoQ/5K4rNOr+qEwSkEQI8n383iawmMaAVEnhB8WUV35nY38HFi+9qvxjTkZwxPxmcRYs7kZuJrAsXcZ0e7yUGQg9F1W2fVqdyn9ZYbMrpPSV/+a6EL3BMub0iKehB5zsnZ2pTL6Qt27OXQ6U1kIQWUqIbp3K2A8OiT2eAdxknlPVRLfCqWHTE8ZgKvgKfcUKkK8B/CEOnb3J/wq/Rnxly/rk6HTBOl/vR4tdjrI+xTNCL4hKrTONedk7g== Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=nvidia.com; Received: from BL0PR12MB5506.namprd12.prod.outlook.com (2603:10b6:208:1cb::22) by BL1PR12MB5222.namprd12.prod.outlook.com (2603:10b6:208:31e::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.25; Thu, 5 Aug 2021 11:27:15 +0000 Received: from BL0PR12MB5506.namprd12.prod.outlook.com ([fe80::1de1:52a9:cf66:f336]) by BL0PR12MB5506.namprd12.prod.outlook.com ([fe80::1de1:52a9:cf66:f336%7]) with mapi id 15.20.4394.018; Thu, 5 Aug 2021 11:27:15 +0000 Date: Thu, 5 Aug 2021 08:27:13 -0300 From: Jason Gunthorpe To: "Tian, Kevin" Cc: David Gibson , "Alex Williamson (alex.williamson@redhat.com)" , Jean-Philippe Brucker , Jason Wang , "parav@mellanox.com" , "Enrico Weigelt, metux IT consult" , Paolo Bonzini , Shenming Lu , Joerg Roedel , Eric Auger , Jonathan Corbet , "Raj, Ashok" , "Liu, Yi L" , "Wu, Hao" , "Jiang, Dave" , Jacob Pan , Kirti Wankhede , Robin Murphy , "kvm@vger.kernel.org" , "iommu@lists.linux-foundation.org" , David Woodhouse , LKML , Lu Baolu Subject: Re: [RFC v2] /dev/iommu uAPI proposal Message-ID: <20210805112713.GN1721383@nvidia.com> References: <20210730145123.GW1721383@nvidia.com> <20210804140447.GH1721383@nvidia.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: CH2PR11CA0025.namprd11.prod.outlook.com (2603:10b6:610:54::35) To BL0PR12MB5506.namprd12.prod.outlook.com (2603:10b6:208:1cb::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from mlx.ziepe.ca (206.223.160.26) by CH2PR11CA0025.namprd11.prod.outlook.com (2603:10b6:610:54::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.15 via Frontend Transport; Thu, 5 Aug 2021 11:27:15 +0000 Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1mBbWr-00DDeR-DN; Thu, 05 Aug 2021 08:27:13 -0300 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9f356322-5653-4d21-0c94-08d95803fa06 X-MS-TrafficTypeDiagnostic: BL1PR12MB5222: 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: xHSf+ufjFjS+4SectuZQg9MnQ2HtFg0OoFovC7s2xyrOZRdv/mvCkJR0izLwM9OyTNNuKt+H+Rm3JTyglfdjRxyBv4zrW5mYz/uT7qD9WuV4Z/DQRSfbPyB6Xw3uvDkEiKxn/gbO4DpMTpnw5e7KH0nRXxpj6Au9nbilkMzn7InU7pEUBdodSehYEVwQJPEscNyOS/B+KxGQB6q0gTEugA0iZw2RbNMZEI+bnwpegeHrDKk2rQcAU8BJ9c8TgHW89bjnOU5o1WBhb8LmDFnUJDPmsYkOJapVYZLFnAeHq49NU67UWc/jZF5CKV9QIqOZ4T+8vMmQ1eNhgXOcoGJxg6JIq1Zc7KnTAC6KOV5ryeZDjmpBHe2AwSPPZxkh+IMbxlpLoqMt086AFoSWCsgffFeoT08KlQ6JEWSZkxmFx7Qd7lUPtYJVxu09aFHP0C+vfW6Ios0AruIAK7rYCug4psVAvNBwkwsdSciduUa+XIY+xN+BRWquvXNPYjKvLKkLkMvwZOdy6noD46elnFR45ZBRkgRRv8BQLAexuf1SNUdmhMRGPbbTeL52PRRpnZ4q7Mu2tBLn4jvcWP3gYqeks3b5cThlEf2wmMo3xNlAMairmWnOxm9Llk5PD7po/kKtd4WaOK9z32NbFXwWlfRnsQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL0PR12MB5506.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(376002)(39860400002)(346002)(366004)(396003)(136003)(9786002)(36756003)(478600001)(9746002)(316002)(5660300002)(66946007)(7416002)(33656002)(66556008)(66476007)(86362001)(38100700002)(6916009)(2616005)(54906003)(426003)(2906002)(186003)(4326008)(26005)(1076003)(8936002)(8676002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?6+GvoW2Gy4+xr5HRNHFTdO+JHL6kSYKN7scCRIq/+GfnhH5yL+mFcwgCaba1?= =?us-ascii?Q?jtDyl5C2h5KsahOxMAmiRAe7WZstNGkbJRjGBVBKYeYZHv/CWxR1r8HgXOxK?= =?us-ascii?Q?rm9DrWxUIDWD2P4Hv83rimjAzQAjr6uouuxlzN9kXOjwoGOx5IiEPGesLZ6v?= =?us-ascii?Q?8fLQlBiyEgPEUNUWryw/kQpe6liH/E21OFYOMYZIZHup9h5Rhn+s+Jn0i0j1?= =?us-ascii?Q?IF2Hfp4yaVwBv1jG23kcgoAjGcuyD5ymuPRYt4jUSn74xhfG4+ZUUD8vXkw6?= =?us-ascii?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CCYK4XEoon96hyxN452B?= =?us-ascii?Q?gBzKkT//t2ZVYQ2D08L39OVZCMm2xdLDnNc4IRCg0KISGTD+UCEXjGKhA+rX?= =?us-ascii?Q?dXngHW5afQpn+95WMGgGoRUhiiZLZytlVhs9UCOX8flVqgej30Jer4SfICgS?= =?us-ascii?Q?zVxrdu6MFL9N1d6Uo2OOM1tx?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9f356322-5653-4d21-0c94-08d95803fa06 X-MS-Exchange-CrossTenant-AuthSource: BL0PR12MB5506.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Aug 2021 11:27:15.5180 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 5qOLVmToY+/se2ulBewv84zqtYYPzvdX0zsoeGivaVv0du+vmLuQFzkb7MNUpkvx X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5222 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 04, 2021 at 10:59:21PM +0000, Tian, Kevin wrote: > > From: Jason Gunthorpe > > Sent: Wednesday, August 4, 2021 10:05 PM > > > > On Mon, Aug 02, 2021 at 02:49:44AM +0000, Tian, Kevin wrote: > > > > > Can you elaborate? IMO the user only cares about the label (device cookie > > > plus optional vPASID) which is generated by itself when doing the attaching > > > call, and expects this virtual label being used in various spots (invalidation, > > > page fault, etc.). How the system labels the traffic (the physical RID or RID+ > > > PASID) should be completely invisible to userspace. > > > > I don't think that is true if the vIOMMU driver is also emulating > > PASID. Presumably the same is true for other PASID-like schemes. > > > > I'm getting even more confused with this comment. Isn't it the > consensus from day one that physical PASID should not be exposed > to userspace as doing so breaks live migration? Uh, no? > with PASID emulation vIOMMU only cares about vPASID instead of > pPASID, and the uAPI only requires user to register vPASID instead > of reporting pPASID back to userspace... vPASID is only a feature of one device in existance, so we can't make vPASID mandatory. Jason