Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp247831pxj; Thu, 3 Jun 2021 05:51:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8ldKJAE+0OKb+8+Fe0VhGIP4LZhGFS8iNSeA7Nt5u5wT6ZYzLufEUOzU71sz3D2M5uSna X-Received: by 2002:a05:6402:2714:: with SMTP id y20mr43475061edd.348.1622724677482; Thu, 03 Jun 2021 05:51:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1622724677; cv=pass; d=google.com; s=arc-20160816; b=cVVDudGrcESW5ZdNumRsE7QwDYMDB+qc8D2HKVeeowbX30IlEGXGwAZ2wZHiMt+4FI 8taz9OJqZ4v7kpNtyo+wHz0hqRAksdojpe8/vNXqw1HvPIi5pODAOOtkSX4DClvtbIuo dsbOCrnoDwT/PCufuvyT7QSJeMsa8JSgfj/WJIk/K/dF5Ko94W9ftkjPUcZ4Su1/J5pe Wt0xdZdSk7REW9w0zPsZMFIRseBH4Ls4d0TV+DkBsYrdkhbgS1BQEKjSz4xsBSStFEFy 69lfeontXw27Xlsq+KckWCqr2qpGUtSyc2wsXH1dAY1LO9a2eGHmEe920rx5IY7vGU2/ 7SQg== 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=Zifp6LGBMcahPPa1/hfQc+nZIll8c0K6BEy0x3TQ0dg=; b=OAOSQyWoUoMcDnt7slyyvX8VYyWDWXIYJjYoHvYosQU7o7hMcyFP3SVNGZghN8Ruvc kqnV9cHXPNhyn68W9PR4tZ912C5zn9kK1+aS4B6zfD8Ca5ONxnmfX9zI6j85iGWinfPp 6RHXrNT2KtmSKpdTSU9YUMkwdDlYA9hahJK9R7+yVbnNUksqYuJLdmDTlJShvtruoqgW HnBSESivbzXw2d6yOWfDQWGluIBXXS7VpFCX/5I/rg5MkIkK/mdUjjgNZT7EV43Aqlc/ 2ANxlo3W8+yxzMarR+TWmJDwBvMKowhPEncVAZLqaeFJwFrun7e5iS0h0O4WaxloEMbU EVdg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=eOfTLePv; 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 hp35si981492ejc.369.2021.06.03.05.50.55; Thu, 03 Jun 2021 05:51:17 -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=eOfTLePv; 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 S230131AbhFCMvM (ORCPT + 99 others); Thu, 3 Jun 2021 08:51:12 -0400 Received: from mail-co1nam11on2077.outbound.protection.outlook.com ([40.107.220.77]:50144 "EHLO NAM11-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229801AbhFCMvM (ORCPT ); Thu, 3 Jun 2021 08:51:12 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n5HHb4edAGYN8hZT5iiIEbCzRtOoeRg4rBtLrOxqkAqgJiKNYSX/Xv4OOLfTH7GM23OZLJzUrBhSrhG6b+ZNxrRR5lABrEr8U+krbHDQCd0yA6WvTLsn5E7QUdftsvI1rU+3ELAPO0xJcQ0MF7rAKLQtsO3IktxJB7s/8NmsJBCR5fM7Tu7i7Is4Ts8+O+1YD0EWZH/PO/R1Vb1VEW+p9aqxEZz9ZP6wXBjopep3LVtB6wdoygB55qovJHon3fN/gkOYGHSi9mMtVH94d1/S6x+AVZnkNjqJ11f7d1ARAQpUfxjKFCJJSihq7ryNuDTw1YMD40yzNcALZUfkZ0IYcg== 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=Zifp6LGBMcahPPa1/hfQc+nZIll8c0K6BEy0x3TQ0dg=; b=bg+EISICkZx4i6o6QC3b2YWdkzxFzHnEle9WvMSldNPq2/fBigaVuf5Ho4Unn6ly58nHB9eSANY+swa1v0akYadI1hNvjpn7zvCwHDU3A+cbbD4vkYri1bXAJGbvFddQXo4psqaYmfOQcKNCD6iKbhX2jjxMJvH6zPUEqX67KdgMXlBMmO25GAJmjy9hyMl6FphlzNoHvSdfei616jucnP6jKTE/iY9fvorhLdPet+q/onPICNHKzPPWMhq1AMzN58cRJdgzuqrHVxbbkzgXIDgWCvRBUSg2zJKMpSG3M6J45af8OyzEEIt8B9glGTn0+hboUyS9HI3sk/RfCy+F7Q== 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=Zifp6LGBMcahPPa1/hfQc+nZIll8c0K6BEy0x3TQ0dg=; b=eOfTLePvhwunsxPBiy1hspGckjWsVMCG0RJy+sT08SKoK24OZhTMWaBWk+lPwVc8YZZDRluy2OJBx2A0ZMahiY4bW0nI7Z6juhHlEkfY+WtJQlHNT/ip/zF8sBsR+sxyMe37cDuMGv3esk/dI2tBEPCpOsOIu/0slOJcD4qlnDSl9QBZcXI79Beg0UDAWdPy6SvVsr6BJ9Io3qL/cegl17QvdghVYu8QfHLt3Al9JMd9d6SvmHniMZGrA9PSg99nvB3bA1eKYCedQ9sxAFNxXH1iytgAvo1yzgENmozxd5Mayye3ySjHy0Q+MXI4gA/3Oxmadpldla0gJ7IO6kzIhA== 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 BL0PR12MB5521.namprd12.prod.outlook.com (2603:10b6:208:1c7::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4195.23; Thu, 3 Jun 2021 12:49:25 +0000 Received: from BL0PR12MB5506.namprd12.prod.outlook.com ([fe80::3d51:a3b9:8611:684e]) by BL0PR12MB5506.namprd12.prod.outlook.com ([fe80::3d51:a3b9:8611:684e%6]) with mapi id 15.20.4195.024; Thu, 3 Jun 2021 12:49:25 +0000 Date: Thu, 3 Jun 2021 09:49:23 -0300 From: Jason Gunthorpe To: "Tian, Kevin" Cc: David Gibson , LKML , Joerg Roedel , Lu Baolu , David Woodhouse , "iommu@lists.linux-foundation.org" , "kvm@vger.kernel.org" , "Alex Williamson (alex.williamson@redhat.com)" , Jason Wang , Eric Auger , Jonathan Corbet , "Raj, Ashok" , "Liu, Yi L" , "Wu, Hao" , "Jiang, Dave" , Jacob Pan , Jean-Philippe Brucker , Kirti Wankhede , Robin Murphy Subject: Re: [RFC] /dev/ioasid uAPI proposal Message-ID: <20210603124923.GW1002214@nvidia.com> References: Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Originating-IP: [47.55.113.94] X-ClientProxiedBy: BL0PR02CA0045.namprd02.prod.outlook.com (2603:10b6:207:3d::22) 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 BL0PR02CA0045.namprd02.prod.outlook.com (2603:10b6:207:3d::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4195.15 via Frontend Transport; Thu, 3 Jun 2021 12:49:24 +0000 Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1lommp-001534-Gv; Thu, 03 Jun 2021 09:49:23 -0300 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d936492c-efa5-43cc-6250-08d9268e0446 X-MS-TrafficTypeDiagnostic: BL0PR12MB5521: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GJOFTSgxEN6R2cJdd4nFUL0LYbHVZPifvHI7A6foUYDtVwucT4g7+Tvlf5HV0MNxPd3fu/CSgBrz+RxPj3n2gm8WiUYvq0NCNXQTMo5L7YBQOKSPiYOcdam4l8JZU6gOyKP1Yap1sVCLGBcaodHzfxKQJ0WNXR7TTlJrHkVJFVf1UTQa9E4BdgUSLgrjTt6pGEd6VJyfauuJWyepiHmrDrnnUEaQQfaVK2OXazHkWUl6Cqm8QtPBPZTBDGClzkpqxe2HDIfkXHZ16VqTJL2QkuqwOFIViCzaZ6vWlIJe6y6br83I0wjhxy2rra8/AgRSWYsRw0Le5NKwdns2OSmV9ZX16/71/46eGqWeeVM3yCknv+lNUmtAgEpWLe65L3R6oPNOP1ECiBZ0Ipr9PZHws2YyrO9Tm8lsJNyCqzW0qxPQNNEawXQ3PSLMGywLvfwN1xe8nlIGObCiFNmOiLMCBEULOMwmV34tuQLFpYTiyfPWK9kMdkfDW9rAi6tAjYZO7cv03w+SQg60QZ91ZBS4cmy2AIZ2Vn3b5cebiyBTbtGSZ+Qmz1M0pGKEPkI4Qoe5USgtI6fqYmQfCnCTAyZmfDDc5b6qrGMOl+EXc+QTldY= 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)(396003)(136003)(346002)(39860400002)(376002)(366004)(1076003)(54906003)(316002)(7416002)(9746002)(9786002)(6916009)(8936002)(2906002)(8676002)(86362001)(36756003)(5660300002)(26005)(426003)(2616005)(38100700002)(66476007)(66946007)(33656002)(478600001)(66556008)(186003)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?NeXT+MO5lRSio/byZYGwc7jgC9OykFWmYgRPXBi2w5W74Fu2+unOwb05nIef?= =?us-ascii?Q?lYW6MwUDDB2p8Jp258PSluY0xIEk/r9/+xq1VLNxatkTWnkF5mF6t7Ol4Yvs?= =?us-ascii?Q?wcj/ysUnJdkYr9Mcx0wD6AjykNQeD7aZtCD7mcxU6eepzbiVZQzFMLdI1Igl?= =?us-ascii?Q?slL7FdSgVV0GTlkXzvoW68d2TXJ50NXhQkQ5vRt9pJ7VpEOBuHrt3R61DLRa?= =?us-ascii?Q?tSOjsoDGciBVKDwOtSjhW3BbKGZ0SO3NMNtL1DDXorAAYt7iNYXO+V9yF5ZA?= =?us-ascii?Q?mr7YpuJ+lDE6+owK7n/izt4MAnKzEbNECZMISFxdEKZpCglGbJfe7ExlLoG7?= =?us-ascii?Q?no7iG6IZ8LvbRG7mniU1SNR/zADfKMZkpbg0r4RhWIkfUer7sC61V+yBt9eM?= =?us-ascii?Q?OdAgusjZyf14M0xGlV2Dk2W3lH8L2YT66W+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Q?Av9m8CUMF3MWZeyBjeeHA+3K?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: d936492c-efa5-43cc-6250-08d9268e0446 X-MS-Exchange-CrossTenant-AuthSource: BL0PR12MB5506.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jun 2021 12:49:25.0351 (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: 9eyye7yD39Q/gehwOZuTI1CvalSvseCzzA/B6dZk0y2q8nq3W1NkUbd1jBtITeuy X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB5521 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 03, 2021 at 07:17:23AM +0000, Tian, Kevin wrote: > > From: David Gibson > > Sent: Wednesday, June 2, 2021 2:15 PM > > > [...] > > > An I/O address space takes effect in the IOMMU only after it is attached > > > to a device. The device in the /dev/ioasid context always refers to a > > > physical one or 'pdev' (PF or VF). > > > > What you mean by "physical" device here isn't really clear - VFs > > aren't really physical devices, and the PF/VF terminology also doesn't > > extent to non-PCI devices (which I think we want to consider for the > > API, even if we're not implemenenting it any time soon). > > Yes, it's not very clear, and more in PCI context to simplify the > description. A "physical" one here means an PCI endpoint function > which has a unique RID. It's more to differentiate with later mdev/ > subdevice which uses both RID+PASID. Naming is always a hard > exercise to me... Possibly I'll just use device vs. subdevice in future > versions. Using PCI words: A "physical" device is RID matching. A "subdevice" is (RID, PASID) matching. A "SW mdev" is performing DMA isolation in a device specific way - all DMA's from the device are routed to the hypervisor's IOMMU page tables. Jason