Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp145688pxv; Thu, 24 Jun 2021 04:59:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpTOVU6kHWCzhjGSU4mvBpPgjDA9K5LkljOH3y/envAtRB4C0g62oN0hGgPqj8shE6CvK0 X-Received: by 2002:a17:907:1b29:: with SMTP id mp41mr4920708ejc.459.1624535991052; Thu, 24 Jun 2021 04:59:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1624535991; cv=pass; d=google.com; s=arc-20160816; b=G0AhvyyWvnbcxIfEejTq6g4Ldgo0vnKuAC3hJOnf/8z0ymaPQVEk4k8gCzjMY7IKBg b/60GI+jkpRpGaRZWAna/rLQDvWEBeNEjqDSAPFufMyBtMVQ9/JD2FK2deR1ntSpZHj4 IqpLypOl0JOC9VEnSnE36iIsowLADQKaISczLLlD3hYIVQU5jwYR8WRrCD0XNCju4Ojg pV9o4/46pMElQbyiXjt3CU4B8fJImZjDs6bWxdQcYm4eABO6Cjv7TiBXfAUz8r2zBSR1 dsfKuU2PpcNY4oHOa9T/crbBx+A0+HBUqGlu8zU/DNsx0/q17FEp2q2yrBrG43XEB/M1 BR7Q== 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=ARzBKaXoTrSFCAiBuoYsEJfTmLYrid4HDn8r4GDP0t0=; b=Bp2+17q6ybjHyu/MyZbk9vXZYdd9uGDNCZC6zsIhJuK+PPs8e/9m8indlb4il++2Zu wBGHWQNsxMdnRcHw3waOO5+KKjayAadC788mV4GaB886zhrJl1RvWKDm4eKr8JIgjnm/ zx0qUhtXVtHun+0Juyfi9T74l4+biBKxi9AOasekQfjpLK0q7e9hjawacK/vjR7yvFlS W7u7UGUKcgRqLefoVG1sdryppYUBM3sCeiDE3u4u6LNZdjit96Q173xW/smzkxmD/vez mY0Fx8jZ3WsHHjZ/U1YsL+TaVvhfe7H1RBcHQd6UMqRDzV+m8mxpgSR8cglUOV8FtnnG zzeg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=IgprYvGF; 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=NONE 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 i26si2781608ejo.34.2021.06.24.04.59.27; Thu, 24 Jun 2021 04:59:51 -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=IgprYvGF; 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=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229900AbhFXL6y (ORCPT + 99 others); Thu, 24 Jun 2021 07:58:54 -0400 Received: from mail-dm6nam08on2071.outbound.protection.outlook.com ([40.107.102.71]:25600 "EHLO NAM04-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229445AbhFXL6x (ORCPT ); Thu, 24 Jun 2021 07:58:53 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EoRYqtsp4UjOBTDkZV6SRr4r62cncGZVG3M12CK9+CYtHKm3lUHutLofcNWRPerBwZIQdEFcEVK0/A3YCsfnI6BdufG0lJ7fLxCkn4wdcctStfIhj8TywEvseH7/T6XzmKVUvPbH4PHEtde1CaGSa0k51Av/lVpv+5BUSuucaRpYLYDk20t7iEPgCjya3BlM2lY+meN0RqzbB/mOUUO2S/Yw/jML3qU2KfUsu+yIPT/pQxHIo8jHtU3G+TqM5TD8y9uGPuhMqa3KksAy9NaUNkZ9OaIZzBuB+beJbNHCmH0kyF0bM4B08BV/F6JdAWKcSUdx94D3GKU7RrKj5PDBnQ== 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=ARzBKaXoTrSFCAiBuoYsEJfTmLYrid4HDn8r4GDP0t0=; b=NN4rjNPjYDe0/bHykLeEASMNIalUsTKlkFRnVsguQHZZLodleeKbKoUFF55g07Vp3cxciYgm3PbbXmaMpYseYjplB240qpn0OglTjQwqaMGBOofBnzigDVepyg0DnC1ZQiz5ciVVnWq6GJRpxTbrXad4rIQflQgxftpMS8EQvuxmjjBabmQtM1IdrStlgCCjQYJnUg4c7Nz55uEvEtIZFxCwNTRjQIYrnmyt2m5nIY0dMjJfv14dJtsRUQzhRbQs7824gEphuS2oNzB5nXGSZuzQlk9EZcaFmKGVUtYAMGL2/jADKjvF376Asy0QfgQ5jYc5qRFGh5SSjDNFC00qLw== 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=ARzBKaXoTrSFCAiBuoYsEJfTmLYrid4HDn8r4GDP0t0=; b=IgprYvGFj5HTOv8C1QC72BKIJvng81/Oy0pZkfj8nelB+fY+CeKmCMsIoUssUJLz+RfmRlOHu0XKSKoyyBVIRyZ7MeFurHRDc6i+Ulqy1XW8WcRnFsimzOOumY2/UhOrv44/wP6s9gdPcQHBlSJij5idtcFfhph0KMEYaWRBp7187otgLGIDALBbhorOVgGZ98Cz8SJZWxSSN9r5mcKq2kFuLFDk1mDGdRHbWr0kjglEb79L9ZivnGLDbrZ5muMA2X9iwSuaNNb134EoDCcDhCvEr2dGn+eNuZRjAOXCyLJgY1tu6qUmiMfpwmrGgnGhPAnGrM6SE6ezsfsk/8DYug== Authentication-Results: gibson.dropbear.id.au; dkim=none (message not signed) header.d=none;gibson.dropbear.id.au; dmarc=none action=none header.from=nvidia.com; Received: from BL0PR12MB5506.namprd12.prod.outlook.com (2603:10b6:208:1cb::22) by BL1PR12MB5285.namprd12.prod.outlook.com (2603:10b6:208:31f::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.18; Thu, 24 Jun 2021 11:56:33 +0000 Received: from BL0PR12MB5506.namprd12.prod.outlook.com ([fe80::3d51:a3b9:8611:684e]) by BL0PR12MB5506.namprd12.prod.outlook.com ([fe80::3d51:a3b9:8611:684e%8]) with mapi id 15.20.4264.020; Thu, 24 Jun 2021 11:56:33 +0000 Date: Thu, 24 Jun 2021 08:56:31 -0300 From: Jason Gunthorpe To: David Gibson Cc: Joerg Roedel , "Tian, Kevin" , Alex Williamson , Jean-Philippe Brucker , Jason Wang , "parav@mellanox.com" , "Enrico Weigelt, metux IT consult" , Paolo Bonzini , Shenming Lu , 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: Plan for /dev/ioasid RFC v2 Message-ID: <20210624115631.GO2371267@nvidia.com> References: <20210614140711.GI1002214@nvidia.com> <20210614102814.43ada8df.alex.williamson@redhat.com> <20210615101215.4ba67c86.alex.williamson@redhat.com> <20210616133937.59050e1a.alex.williamson@redhat.com> <20210618151506.GG1002214@nvidia.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Originating-IP: [47.55.113.94] X-ClientProxiedBy: BL1PR13CA0141.namprd13.prod.outlook.com (2603:10b6:208:2bb::26) 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 (47.55.113.94) by BL1PR13CA0141.namprd13.prod.outlook.com (2603:10b6:208:2bb::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.10 via Frontend Transport; Thu, 24 Jun 2021 11:56:33 +0000 Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1lwNyB-00C1gS-ST; Thu, 24 Jun 2021 08:56:31 -0300 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 313389b8-1ec0-4593-c0ca-08d937071c66 X-MS-TrafficTypeDiagnostic: BL1PR12MB5285: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZZG5j/tNkx1BbxpQqWGKXQlQZFKRLqfpHHLYOgLIO8g01sYtSOHOO7P+OexLjdkqashllVrbIEr4otb6dN+ZRaZZxp8sIrPKqs2YJfJ52KnmwHG4Xh2t76aWixre2LlSCgRJOlp/B66gr7FyGmPJ/jIYhj1LMQ4sVOEsFYaYYOhNbuvXXHrXEaie1lVocttOaFlhjhJlfhVWrqQaAfq093TMQgmxWTAKVhJlBBDQSd9hWzWDWqW8kW2P9r5VQp3uYmdJ5MSVAzH3N4C0KUmBn+ghYNqVr7Yq0LdfSLf4MHLa5eXOgt9WISBb9FP+V+jb1LZiEdMaxcJUTD2AIwef2cwIJIvb6nDVlVRP/0Z0DR3TJ77rcpVIYa4T7+WLgxyPw/5NgAmjZ3fYGwm83WHFvrdDqhioqjrVWRVLmToE9VdJcjk9/kFWUwvmj8Zol7p98tgk2GVLXavqGx1ow6+SxjCgQLe4QeS1FRIpaoyajQzIWqWAfHkUWNXByOzHoA8AM74j90N48MwpBZMqa/LccwkPjqpjpZPGv52hY+qDVMzmWcVbX7RZs7MAssh4oME8+CwCfW10tqFDW9/4lFOkKwN8VerKGBt3eECdwC7ny/k= 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)(346002)(396003)(366004)(136003)(39860400002)(376002)(4326008)(38100700002)(316002)(54906003)(36756003)(9746002)(9786002)(186003)(478600001)(26005)(2616005)(7416002)(6916009)(426003)(2906002)(66556008)(66476007)(66946007)(86362001)(33656002)(5660300002)(1076003)(4744005)(8676002)(8936002)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Bnx59wnAYKirujN5yfZ5GSI9f3M39jU3aJGopIEnd1MPhXi63w8fkO4v3in9?= =?us-ascii?Q?27G7QPo0PXGHMg4aSjsiFgNSFSjNSrkAuIZhtthGURCCmaFswus5TLW5Fn4B?= =?us-ascii?Q?A3HyXUwlMeLq7r06K3iJKljEy2nDzCNPiAeUYyn60DipO8d2DgvHnFUMt7jm?= =?us-ascii?Q?Gc2N7qqnbafIbfZpBYn0FvXG6j8II7BXMlDM4+d+YozY0BqJNnFKolWAxdjK?= =?us-ascii?Q?34YwMX59SEtDx3HjFr0w955Ljmb9SbFXfir8I8MxzO2awgiN+ocnMKslceBf?= =?us-asc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tNHoWH?= =?us-ascii?Q?fYwAnAFUU7s98GINl5lKB0Ayk/+stjeC29ZAd/ASEA6Dxhv3fux/yqFHmwHq?= =?us-ascii?Q?WjiWq7W9ncqfVY2ufOP0AImYUrjRYfkfKECN4UluRmv9zIq0lVHyNePgnbHm?= =?us-ascii?Q?1V5+2iE7hYfDiDGRAiM13iyJ?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 313389b8-1ec0-4593-c0ca-08d937071c66 X-MS-Exchange-CrossTenant-AuthSource: BL0PR12MB5506.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2021 11:56:33.2601 (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: DLvR/S3XZldb3qHXS2dtvXhKo6xnjLrn424w1oVwC2ftcIarh9A26JpOZBw2/ej2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5285 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 24, 2021 at 02:29:29PM +1000, David Gibson wrote: > But as I keep saying, some forms of grouping (and DMA aliasing as Alex > mentioned) mean that changing the domain of one device can change the > domain of another device, unavoidably. It may be rare with modern > hardware, but we still can't ignore the case. > > Which means you can't DMA block until everything in the group is > managed by a vfio-like driver. We just need the same restriction as today, the group fd will attach a domain under quite a wide range of conditions, and we can copy that. IIRC is not a requirement today that every device in the group have a vfio driver bound to it? Jason