Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4360810pxf; Tue, 30 Mar 2021 06:09:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyen0OgeYZPqRtHUxvUyCVhTjYqIX8F56NuxcGdwZEEmB047JVvAI8G66V8VVedTP0tO/nL X-Received: by 2002:a05:6402:1393:: with SMTP id b19mr33411714edv.333.1617109795512; Tue, 30 Mar 2021 06:09:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1617109795; cv=pass; d=google.com; s=arc-20160816; b=wKKGdNdQODriOths7NjU8IPaE7mgGSU7/YzoIAxLSP0WM3ZLcJUJH/rh1QULINAqnO tivRCjxb8wlYd8MjWHvtySRBioIryCLk5QGHJLlHItWbe7e+n63RsO2e29j3jFkKbkD3 Aseyn3x8R3RkOGNfprmo1acGAJviEnR7uLYtXeFKZlXSzQOr4wY61RhxXfRdkhjNSopc RkM9dJX/RmvmUqHlI7ENCveEsE+Gc9g8tkgrrYMrt5Cq7q6qHY8loGbFZVqtWrAiYJrr AjceeK58yLT8CS4PQL7SYnrqHSAdIVor2vWEAFAtLhGQvcgMNZTopjxK7+PJJIAfdef1 4WVA== 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=9s5RX/kaTQLG4ZYwIXZPhAg6lwL5YhEUVyeYSZvZ0hM=; b=aqeN6KXqgDFETVWjBWlzNE0jGmFZW0DGi/9Ldon2PBWDGIfb/klbat6YEVn/MQf/zV rnzZIm9bk7vVwA8BIdsO5CVMcsqgzlseEP9//I2wmhDKXD3i+pmmlm445NM2JclRIGbs gOWg3p75lZJ85xTJ59L8cuzrApOFe4Op/S4ym1ZyW5kLRAtbnZJW3BRkJ8iTzlYlqEm8 pPq5jHU26kRIZjUHtt1pzJxCbkRRRxxKLlL+2zFLDos7m/QOJyqCuw0j0j0tJwAkoyRS VzrAMq2toqDdbjr1vyl941IS0EesyuWsbexCtfrCSPy47PnOi99KyeFxztdzv6VNxrHr fJIQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=HEFVEbCB; 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 fb9si4708674ejc.138.2021.03.30.06.09.31; Tue, 30 Mar 2021 06:09:55 -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=HEFVEbCB; 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 S231945AbhC3NI3 (ORCPT + 99 others); Tue, 30 Mar 2021 09:08:29 -0400 Received: from mail-mw2nam10on2040.outbound.protection.outlook.com ([40.107.94.40]:6240 "EHLO NAM10-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231848AbhC3NH6 (ORCPT ); Tue, 30 Mar 2021 09:07:58 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UDcnhkdBAn3K/W4u1ghnXkknCC0rbO4UAd8NIAavDc3A36d0dR2LRrRrpLF69Y2UiTkccvoUPpOeRS38C1t6j61V8dxP0p92K/D+RCOyViASzolcWy34vAeASsEOUjupWkOxo9MOgEnC/9Yg5uTHMeV2va+6vqWqEij2ZGicmsYgHPgTgVbpYW0IEiJOM3MUnqPuvehErshNoMUo2BMwFUVTSd8B2hKHw3fYpzbShC06ERYaMDQmp82ikkOPq+6BR0F7U6yRcVeGEDaRutFe3RKlGEaQenAejb7KbSfgjGtg7niPec4hK2Qnyjpt23rldEERMuTZL7zwP0GWqRms6A== 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=9s5RX/kaTQLG4ZYwIXZPhAg6lwL5YhEUVyeYSZvZ0hM=; b=T3qucr7Um/mV/pybGypfvvSGTDOI1zI/jrfwJcgnGp7QK6BSooQP3Kye2bfdVqyLj81g1v/Jq4xMPWsKr8S68Tz7Fb8ABgtbQ28fW/upI89uZ7sMKqrWCSk9L9Xp3uIo1VmcoZ8htKYMMVH86bdg/IBSRwLlOp2AS/6nHd0x1YHjh9IKTQ9J/7M4rr5MU2aucXzBA2jfHh8Lbu0TRj2sMvbezP2B9NAXtmLBJXQwA5vT4xaJ5r8JZterS7aZR0HPscvkFQerGIu3BhVU7J3bBZeUh1jO8qKs7/bxNYGoCrStSSBZLjd8MoM5wPYmMIA6m2IS+sI5hrkuSGnDJvEgDQ== 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=9s5RX/kaTQLG4ZYwIXZPhAg6lwL5YhEUVyeYSZvZ0hM=; b=HEFVEbCBsqhoaugV0hOZDcCMEYzYsRClOEuU/Rpagb62BUzX+Z1C5W2D9stEcqeiaZuunva6VuWN0WvxJlMlgyUsfJMucHjrM4k/In2/yl8gbwy5KdAqQB32wYRJ9Bz/MdYHgc7BhJx/RHWIEqk29/83sZs4MTz0Yf/1MaF3YeBiypM4UvsrXPHvIUzdIrNgvdkkPLleBfLKdR4GCpqTZFJWw4nT/bysHv+3f8O3MfnBJ99Ut48FemWA5xdrPpKAs3Hle8kFhL9Hh7QxBg07pT8drwZkIPVBdPDY492qx+GkjlbNr3Hm8nrQSVY+2eZJA8g5a1CwIveiXVBne78F4g== Authentication-Results: linaro.org; dkim=none (message not signed) header.d=none;linaro.org; dmarc=none action=none header.from=nvidia.com; Received: from DM6PR12MB3834.namprd12.prod.outlook.com (2603:10b6:5:14a::12) by DM5PR12MB1147.namprd12.prod.outlook.com (2603:10b6:3:79::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.30; Tue, 30 Mar 2021 13:07:57 +0000 Received: from DM6PR12MB3834.namprd12.prod.outlook.com ([fe80::1c62:7fa3:617b:ab87]) by DM6PR12MB3834.namprd12.prod.outlook.com ([fe80::1c62:7fa3:617b:ab87%6]) with mapi id 15.20.3977.033; Tue, 30 Mar 2021 13:07:57 +0000 Date: Tue, 30 Mar 2021 10:07:55 -0300 From: Jason Gunthorpe To: Jean-Philippe Brucker Cc: Jacob Pan , 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 , Alex Williamson , Eric Auger , Jonathan Corbet , Raj Ashok , "Tian, Kevin" , Yi Liu , Wu Hao , Dave Jiang Subject: Re: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs Message-ID: <20210330130755.GN2356281@nvidia.com> References: <20210319135432.GT2356281@nvidia.com> <20210319112221.5123b984@jacob-builder> <20210324100246.4e6b8aa1@jacob-builder> <20210324170338.GM2356281@nvidia.com> <20210324151230.466fd47a@jacob-builder> <20210325100236.17241a1c@jacob-builder> <20210325171645.GF2356281@nvidia.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Originating-IP: [142.162.115.133] X-ClientProxiedBy: MN2PR15CA0014.namprd15.prod.outlook.com (2603:10b6:208:1b4::27) To DM6PR12MB3834.namprd12.prod.outlook.com (2603:10b6:5:14a::12) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from mlx.ziepe.ca (142.162.115.133) by MN2PR15CA0014.namprd15.prod.outlook.com (2603:10b6:208:1b4::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.25 via Frontend Transport; Tue, 30 Mar 2021 13:07:56 +0000 Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1lRE67-005t1R-CR; Tue, 30 Mar 2021 10:07:55 -0300 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6b7c2a20-b30c-43d5-0808-08d8f37cd62b X-MS-TrafficTypeDiagnostic: DM5PR12MB1147: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4303; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iOBCxMia08uadq2NM2IL1kUkHwZtiy2UTRVJRoGOG3r7Mhc5lnoyFIp5xsmT+vEPStKsFVyMz5o1w4ZJjWLi8oyZ2aGmK/z5+9zGp6okaCJ9mxptNSxiO8vt8UzpqAgjWyFeLCOdkRHxvgYONZgtYwVcOOlK8ccR+XgM7YWoXxZ0Z2nxI/I7G1yT/WXrf42ME2yeDv4xRK1iQkzjC4Ql3juoKLczRg+1YuO+fwwQ30Ar3kcGdu6ssq+MwZCUITZU5rq/GHZO5l5TrP4zvrelPQt/iukpFSJ9/3OcIVcfzx+53h7NjkWLieNPqMjQSb6RdolRJBbBGjH9EiycgTI1b+EHzJZI7QGJqfjdBgOwgGn05piAlrWXrlR5q451DCx9Kvim6McU6dlWgpec+QgGAKh1/X3xG1/oV+5znAOpDHALxZjttehTTMdn5qvAtGXDDyqW4Sq13r5d9xclQpaPp/ITDaoCXwvwJLKbcg6v9Ds+wIQecPE7Zogz9vcFp870ZxUXsJ76WkSmxn+KlcqwXFKvhcsICAVZtw/0iR0ebYs3bDJ9epLZ7AGSjbkTJIMi1NXJwcop1dXlblCqKjmSfz9sThDPB6GHUvprJOij0rHvr7VRKq3WESB5RQCniYHZ+5Cj+J/8QfsRr06IRKY/4hIhZzGPj34OV+7OKB36fPM= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR12MB3834.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(396003)(376002)(136003)(366004)(346002)(39860400002)(8676002)(2906002)(66946007)(86362001)(4326008)(33656002)(2616005)(26005)(6916009)(426003)(66476007)(66556008)(38100700001)(36756003)(1076003)(9786002)(5660300002)(8936002)(9746002)(316002)(186003)(7416002)(4744005)(54906003)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?fFd0BZLLgivCuM2us8Q9Gtrf4aDP+yeFY8HeSb2jNmAu9SBjVgWE/GY0o1r4?= =?us-ascii?Q?9Ir06DBaWB1IeeVzm/8jxg5aAnvkk3RyfykKo1CZmrgGZI+TIjNb82+tKmsq?= =?us-ascii?Q?UktigdbuC/1vgrY0WLQ9K6dIUpMxgb3bVpBAJzeO15CZNX4CXVrF6Hj3cTbY?= =?us-ascii?Q?MoYEFI1lnOYITawBlOBEmtnM9yKWpnoFpdlhbeVaVh12fjpayDaarUENqjo9?= =?us-ascii?Q?/H4vVjaiPrPw7Ike5BsqH4BC7/WRbZ6zADG5aUjv2MHf6DYtH4OTfPPbXzgv?= =?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KyYoPAXA7U?= =?us-ascii?Q?91Gd5ynNlOy1TfVz/4gSlOXepmfhtX3GiB/0HMpqBc3tXe4VgxGIDpkFz7of?= =?us-ascii?Q?nGqJK2Qohb5Y0SEI191Tlicc542J21iYxGc8QkayqIvqhBVmPkgyMyK553E9?= =?us-ascii?Q?lC5rLY0R3aYK3zKyyUyZssLz+fsJJNX52zBf+IyS4lxR4w=3D=3D?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6b7c2a20-b30c-43d5-0808-08d8f37cd62b X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB3834.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2021 13:07:56.9612 (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: MvEezWddZX80AoBg6BSKzponcgArJG87YiF9uZnFIrWtxH2SLTnd52i/Fsk60YxI X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1147 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 26, 2021 at 09:06:42AM +0100, Jean-Philippe Brucker wrote: > It's not inconceivable to have a control queue doing DMA tagged with > PASID. The devices I know either use untagged DMA, or have a choice to use > a PASID. I don't think we should encourage that. A PASID and all the related is so expensive compared to just doing normal untagged kernel DMA. I assume HW has these features because virtualization use cases might use them, eg by using mdev to assign a command queue - then it would need be be contained by a PASID. Jason