Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4144267pxj; Tue, 15 Jun 2021 16:42:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+8hUyK7uoxtCIyie00/2nnpXjWbxRETkfVTwoJJVOtkBedueIS0VTVURNC+xrbCs3QyHC X-Received: by 2002:a92:2a0a:: with SMTP id r10mr1435815ile.274.1623800562041; Tue, 15 Jun 2021 16:42:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1623800562; cv=pass; d=google.com; s=arc-20160816; b=j79a5POIpH94iJgdsDiI06qjVnXO6v5JMul/486XZBur/pu+L+NHagiVV+jgtp3sj3 2FHDB+vZi0cKQ90A8hw+YLTZRt+iekXcx19Km+nvSxDxbddU1N/MyzdAxFFSv1SlrYUu uBCqQmiBAydkSicnmWZgiheIXzwp0xeDNAkTwyUJuYiXlTw5g6XUx7EcyDcYABDCqeKZ YxAVBoTF+yllBf3qMI4f9Fy0maQRFsG+doeYyTimFnYL1O12BIS1aTErl/9SEG+rEoiL pOpnnw3UCoeVAm+HPxyo5TFZvWO1BF5YgglmX4Q0DyI2MMMzBDnJZcxYf3RQVGTixLJs V5WA== 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=KgVg8AkRPI2AaozuMK1kD6UfVmueKqWmvABDpDe23DI=; b=HMRvrjhksaJhMrFS/vAedUDeOsSt8AOCqmZOcrGjZ7pjmo+RttT009jyY4sfgoIFoT HEfbZFM0m8PTO0F0mQWVqIGvZ1c0UYKEEXsm+9Xh9xof/iipPkBZsfryqYhwXcNCzVNS d/hikWPUXzNIRyHNmwwPsE9GadEE2Cp93rWPDlMIwh4mFaZ3a3Lt+OB8iUUgMICMSiHT Oo7bAl8WqaXJ6rUPOYK2qkRsVy2lC3aOdJasLj/SvnKmcAHh0+2FtGdM99MscRsx8K+m 9arO5pQdhAaV6+MLUUgALOZ+gsS4R9x3uj7nDq9cyV+8XwZcIrBQH0XdtNNL8r4RyBuF Sslw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=dZ9bRkyq; 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 v3si574372jao.58.2021.06.15.16.42.29; Tue, 15 Jun 2021 16:42:42 -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=dZ9bRkyq; 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 S231641AbhFOXnH (ORCPT + 99 others); Tue, 15 Jun 2021 19:43:07 -0400 Received: from mail-mw2nam10on2042.outbound.protection.outlook.com ([40.107.94.42]:37536 "EHLO NAM10-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230039AbhFOXnH (ORCPT ); Tue, 15 Jun 2021 19:43:07 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IBEydQY8JqitjBx302VHzfr1X5KXnml7YayNmIv5DQUJtuzLSffWW6JMFbF6b3GQFjEt6xpA/9AGZXInJqDyWfwFmzyRzZohRQ6gbR+CGnKdOgo5aSN+q5wnlh2jfyOPTr6rGs337FENBcT56ZCqYOXrz6a53BLs2Zl7uaPW5vJFwmDvfuFOkBZL0Uc6fe0F4fhCddGACk5+3bfppohW8zHNH7DYFYvmXRkJGFNT2rTS5MmQsTxUfP002UzyGxPi9KtIzWrB+WFplMT7NZjNm+QQYh4c4F7PpLxekKUMNoq/IS894iyLRVNQaA2vhRRVxvjTfFkWOFtbu8BmZHCFvQ== 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=KgVg8AkRPI2AaozuMK1kD6UfVmueKqWmvABDpDe23DI=; b=i18dU4wBpnAEc3CrK9D+Fw9PhgQqOOAefwC63S5jDg6UQHou58gwhx6YdDv7JmnTMS3cTHsuVAqGNL5We/WYBP0GxSy0aeYroeyW9NA4Jh+l4up5isgEIY+x404GY/X32ObAjymRtyuz3Igzj2WiksrTEVciQ0qHZAMAlHjrj5czVxPAq9rotdPGVpNuCnyEXCkb2uW3MgpePVH5yutr3gi43rD6pT2+/YC1ceI2JBgcc9pkF2ybZokCLR9EKWzYqe1PBIlQ6vtV+WCYCORbb5pNZwQWa7ZYInIxgfM+La1qgypz7cbZn4bJj52rN2cV6KY0ttn0P8Qy1AjaNY181Q== 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=KgVg8AkRPI2AaozuMK1kD6UfVmueKqWmvABDpDe23DI=; b=dZ9bRkyqsSYAuIh7glWWr/GJRHH802DjyiSYO47ohG1lqRB0bj7t8amH1ny92TU1iwJRtWZ7w/wnyb54hMswk+5YVTGqvZ8N67TxJKFsKgHIGbvsj9mIUTwQXatOpZE4wvq6m905JvHkEWhTpYM9uYJs4QsjDa5jI/ZaDH0BFsXZyQeytigGtpSeh7Ix2kHHjG3vj00RSj4E+lVNRwwfU1PbZCdS6ij/gdkgbjL1u3BRakSfoE8XDQVBsJE6s/eR2Yl8WYz6FlddxZH8tgtBbG4YEs7lCrvjT/RsoXPpR6KbOyQIxs79UEyVT8brcTgQqTbbwZj4WjnHq1d9G2UUJw== 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 BL1PR12MB5111.namprd12.prod.outlook.com (2603:10b6:208:31b::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.22; Tue, 15 Jun 2021 23:41:00 +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.4242.016; Tue, 15 Jun 2021 23:41:00 +0000 Date: Tue, 15 Jun 2021 20:40:57 -0300 From: Jason Gunthorpe To: "Tian, Kevin" Cc: Jean-Philippe Brucker , "Alex Williamson (alex.williamson@redhat.com)" , "Raj, Ashok" , "kvm@vger.kernel.org" , Jonathan Corbet , Robin Murphy , LKML , Kirti Wankhede , "iommu@lists.linux-foundation.org" , David Gibson , "Jiang, Dave" , David Woodhouse , Jason Wang Subject: Re: [RFC] /dev/ioasid uAPI proposal Message-ID: <20210615234057.GC1002214@nvidia.com> References: <20210528233649.GB3816344@nvidia.com> <20210603130519.GY1002214@nvidia.com> <20210615150630.GS1002214@nvidia.com> <20210615230215.GA1002214@nvidia.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Originating-IP: [206.223.160.26] X-ClientProxiedBy: BY3PR05CA0020.namprd05.prod.outlook.com (2603:10b6:a03:254::25) 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 BY3PR05CA0020.namprd05.prod.outlook.com (2603:10b6:a03:254::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.9 via Frontend Transport; Tue, 15 Jun 2021 23:41:00 +0000 Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1ltIfx-007Ghg-JY; Tue, 15 Jun 2021 20:40:57 -0300 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c3b277e8-5c6a-4530-6266-08d930570820 X-MS-TrafficTypeDiagnostic: BL1PR12MB5111: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RKp/S3C4agh19S63gTziyjUyoiZc9IVp2PuH0iBXw8sUKtcSEG2hOgqOHCw7X63+WcyehGpFMuBQJPFpek7fpIFim8xc0PNfw0ndLYgTm+Qey9H7TCLM+PJTUHIcJX6PzzDOIhGoSCXTEP0y3ULe1fvz1yxbt5d+sd4pEfaTwykcAGjjcBwUp8kO+giHhlh71SJHNvxeHTgJZAW5GKf2/O6el5xlPLMwpCW4Yh8/SBFxyzf181x2lnfB/Zsz8IKe+XccgxbYHJxr9fkXy6TrN6FwhQ/blJhtlz1jzE1XNzo9h6zlAy/Vj/QXOpws1SHpeDInEKRS4y5i/176DCTysOoTcR30KzJqsxWeyWTdgEn6YnOH5KcxzdaabafVWf7ANh0vm6FkhTWhU3V9rLKW6PNRIag+bhdT7mDLz+1WIrPwOkRs4CtpDAA7R6FUFhG8rPcLgrL4Vp2yKc7VsIwEPKq8ysxoAVGFweEMmIXFdxzcWEAOkPWRpMm4ewGRJ+ckVaT8dz6yeViQU131z2hGepS4iUM0xeLmAi5JXFcNlmRRmUpIHAA+t7x9ShUZ5Clki5DMomurKGBgyrhLSRJt04G40duh0mMBJxt9x9p1vGM= 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)(39860400002)(366004)(136003)(396003)(346002)(376002)(4326008)(4744005)(426003)(186003)(478600001)(2906002)(8936002)(26005)(86362001)(9786002)(8676002)(9746002)(33656002)(54906003)(66946007)(66556008)(6916009)(36756003)(38100700002)(7416002)(5660300002)(1076003)(316002)(66476007)(2616005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?ZtsLVhZJcnrtvUvPhwBxJKHeh7kHtwMFvqawfWyUhZNNXadwZPtRnVoQdrdS?= =?us-ascii?Q?WYMg+cDodKfcZM45nze13f6qc3uzBYxBGzeX6VQAEZTDpa9MhNO/e230boRp?= =?us-ascii?Q?8oJP+WWarSQV2fBXvKuUcdeTAAxSgpijhulS4c+CIKUIBTthoBP8eXX6wO+i?= =?us-ascii?Q?1AZ4y1feML1yFE3xFvSVYqaF26E79zFnsloTlnRY9eS2i1egVaYhmCTUCGrY?= =?us-ascii?Q?tYVcVt5viYJRTdpqmFq5O3wuuA5Bo3Zj2ZQFrjjWg7kiMHrQhjwHfu94I93T?= =?us-ascii?Q?6E2I1AGfXw8YK0AxyHyMjtU6MtqsBtY70D3hlIhCnhf3QPT8Bx0DBwdqCcNi?= =?us-ascii?Q?aBVHfqTOwGO2itZhMtuPJBn94jwAEVyaZ1cqhr4fdQHkunalMBKT8KG6qaf5?= =?us-ascii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0PKklnoIc//mW8s85Ylsv1ru5tt?= =?us-ascii?Q?ZSNEHclfngbFgRbPAmvzZsQ+?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: c3b277e8-5c6a-4530-6266-08d930570820 X-MS-Exchange-CrossTenant-AuthSource: BL0PR12MB5506.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jun 2021 23:41:00.7608 (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: 6TWGKcbx/l5ATG8V8PPlAJ69pA2y33wIHfZDK6+Q+TJ2MOXz4Wg9TE9U487x3NIx X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5111 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 15, 2021 at 11:09:37PM +0000, Tian, Kevin wrote: > which information can you elaborate? This is the area which I'm not > familiar with thus would appreciate if you can help explain how this > bus specific information is utilized within the attach function or > sometime later. This is the idea that the device driver needs to specify which bus specific protocol it uses to issue DMA's when it attaches itself to an IOASID. For PCI: - Normal RID DMA - PASID DMA - ENQCMD triggered PASID DMA - ATS/PRI enabled or not And maybe more. Eg CXL has some other operating modes, I think The device knows what it is going to do, we need to convey that to the IOMMU layer so it is prepared properly. Jason