Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp750630pxj; Wed, 2 Jun 2021 10:27:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvqlgFSeR8qtXGa88VQL5QmwR9MOa7YCPDDRhH8NZQq4MsKMyvv/djkDVIbJm0ay2CqqVl X-Received: by 2002:a05:6402:44:: with SMTP id f4mr40085116edu.364.1622654823899; Wed, 02 Jun 2021 10:27:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1622654823; cv=pass; d=google.com; s=arc-20160816; b=AXjlu1Kskt22CK7IhZyDrfApEKR14d+o2SvzcVBUi4c0zDvkbGlXyku8+4sdQUADfk qdLx1dNySkrlkZKu3CSYphtY9/4vd8W53ih/ZKp8YLsHOEoKebHmk9mz4UCdCpa+HaYl R7+riwekA60Rjn+xCVZFxXlQWFZWN6rPiwVkPYtjGLQy+bANe7U+YEJox3Cmfowk5mUi A49P0C+cCSdnEiYdU2gob3LZ9swMbxAKPnWild6KD/LEkh8X0KkTyl1ns8oZcYNQvRT1 uHTG1cKW6Z96W3dCfVQ8UmhA3e+/ZpUIX92/smamBC4VTMtlH9bS2qG/0xZRPF1VE25R kBsQ== 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=d3x1nNBzCTZjUDqYHusKdAA4tvAw2jrZNM53lnaLmwY=; b=G441x3p+mwMnX2ryEFxsPPx/OKratLF/gR/B5+KqEV6oDdlFFeGfgcRNwBrQV4Wzns D3drlhy6hd/uxWp6GXPNewwyLVD7FLCbaBmBXTOwNw+TqeTPCS2kaptRa5tXsK0c1zLL 70CTFaQnpltJY4qSOJR9Di3/Oyh1cY1ib8T7xb2HNoPfG0dYHI712v08SogD/nwcPmC9 m3X3hBfpWn5OiDrgxzvNKVlyHRw4vNA4E46MVhU/RvaWY9XYbT/msKAAu/H7WHr60Tcu Y3qtajZ0/Fklk8Sz9gycWU22ybqtfCbwyxTPzGiWVvPWHTRAnVzegilZ2Cdg9TVBQTiy YAOg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b="Ie/HVgEK"; 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 hr2si334216ejc.274.2021.06.02.10.26.39; Wed, 02 Jun 2021 10:27:03 -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="Ie/HVgEK"; 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 S229934AbhFBR0N (ORCPT + 99 others); Wed, 2 Jun 2021 13:26:13 -0400 Received: from mail-co1nam11on2080.outbound.protection.outlook.com ([40.107.220.80]:57241 "EHLO NAM11-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230054AbhFBR0L (ORCPT ); Wed, 2 Jun 2021 13:26:11 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dKh/Q88dkP7kHNh5Vb5E3l8ncleTq4+3qdBMoAybdRAErouPlOr+A95pVJ5oy8c7E9WSwD6d5dPXzPUJ+lgBkiDkcieZpnt7zTRO1PDuXpum/Hgjwb/Dl6GJpiJYek9QqWWuA8sBGS/KokusEFZQGXolFLhajR46AXxEIPsktJXLOMR9Pqk38+vsbHk1qGgFLc65zeAbcpVT7bEgt80CnKBS7YB0iarELcOcVzjD0cn9wXekt7vo7pKVPcmOBGjDZ4/anotaazCGIuobNrDOIOg7uVM6Uu4olDicM1dqPt4gw/tzN48mHD+ubEjLHX7SqlZ+90pBLtqypShSeUBlGA== 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=d3x1nNBzCTZjUDqYHusKdAA4tvAw2jrZNM53lnaLmwY=; b=ngUc18zDaVPMrnJpGcRZn2gitZmhex+LBbx7JF3Zex7JThR8gH5R049fw1wulQ2NqQjvisQlF84BxtlAuYK2Mz8KIdbTQHqO5F7tpqqGkBvOOmYaND23XgT1WaC5ubOn08TJFr1az5Yf1xJd4o2w/xAA44LSGe2P+1OC4DHfA6zRbr+4LRPGJZwpa957V0a3oCQ30J4v8QVNVgSMV+CWuWuGEzhSxAYhfpYlT39XIZpPwtUne3sBErLql9YDmWG5SYpxg7GkGKpVsGsku9Jomcgo+i+0bEBavcEwFmbNW0RxoI7DnCxQjZf/UwzEKXGWn7NbOGPbOK8wD/C8pIOQ0A== 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=d3x1nNBzCTZjUDqYHusKdAA4tvAw2jrZNM53lnaLmwY=; b=Ie/HVgEKLr28bP7fsUWJG6k7yFnPG+n7BUUtmyr6U2dhdTA6vCzu+8ePIyL4AQzqir1twmltT/GH1TbaAnv5uAtoS66+gHqjwdxzaSZ7wRcrahKmn5Ol4DLxp503NrpSFr7JCTxwZGIr38FEc8YTOb82ddJK/LwYO4H8U/ORRIvKIjhR6c5Mtd3Yld25fzMapXY774bdSi170rfmyJgh90r37F/ZRxdhETeDpxyGBSS8SmlmDeyKZe2j9THgylsMxBQ4L4qy5hPOEN08rAb/kNLB2ajrzcclcQzRElaV/ortVTah8K6N9hnPBwTCFCw22s93i+5GIrmyeHDzXBd6Nw== Authentication-Results: metux.net; dkim=none (message not signed) header.d=none;metux.net; dmarc=none action=none header.from=nvidia.com; Received: from BL0PR12MB5506.namprd12.prod.outlook.com (2603:10b6:208:1cb::22) by BL1PR12MB5030.namprd12.prod.outlook.com (2603:10b6:208:313::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4195.20; Wed, 2 Jun 2021 17:24: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.020; Wed, 2 Jun 2021 17:24:25 +0000 Date: Wed, 2 Jun 2021 14:24:24 -0300 From: Jason Gunthorpe To: "Enrico Weigelt, metux IT consult" Cc: "Tian, Kevin" , 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 , David Gibson , Kirti Wankhede , Robin Murphy Subject: Re: [RFC] /dev/ioasid uAPI proposal Message-ID: <20210602172424.GD1002214@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: MN2PR10CA0013.namprd10.prod.outlook.com (2603:10b6:208:120::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 MN2PR10CA0013.namprd10.prod.outlook.com (2603:10b6:208:120::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4195.21 via Frontend Transport; Wed, 2 Jun 2021 17:24:25 +0000 Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1loUbQ-000ITu-62; Wed, 02 Jun 2021 14:24:24 -0300 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: adeaf6b4-fa56-41ef-8eab-08d925eb44f7 X-MS-TrafficTypeDiagnostic: BL1PR12MB5030: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2089; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: J2BG3dsZE9bUowKUO2UUxTzWWNRbfshDmda+7pdZ5+mE6IqhvStL0faLffADPXAwRCtCLeauPjakfoxOTDWFWQIlSHP+OFgcu1y29OVhzVQHmpmAXwApUnizdk2Te3RFrpW6bobEQ176l3rV8d61cpyyW85HJ2pFQcTksvb+OXrO7xrBKv0DhYwRg65QlfOehwkDYXUoBoN8JiwBWSwZuaaJgm9iFpgPequE5PAlVMoK5NlKLWgnnAea4VUuPxdm3Nk2+/wlDu7NPdRKp3akpcL8jVTUr7lxI4DFi+8s845+mD2m6kjxmi1ZMZufKYpmcO/zvlqg7s3HPBO2K5lAWsJQFijcBEjNJ8CqeOvWVcB4ZPDdyrXT2Brmm/BTBeXO6SoYfO1wsWDhKWkVW/n+mJTKKKdDjsrB4shfB38zsV83kqbw4XG/y/9C6KP/TvT/Y2tOmBAdEYNngv0pbjXdR+eBnHINYOjsM+Z3ZZ+SqBeVrRVIV+CCfzzdDc4qMqICHvGhg/nsVvrlrBoArV7WDF9Bje7lWyzM0bCg/X6jY0YH+3/ovwPKtRkVB2NjwFeL+pTqAheNwkoouaYMSE30tTuqLJb+pkbGhYW7852+z3E= 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)(366004)(346002)(376002)(136003)(39860400002)(186003)(8676002)(478600001)(26005)(4744005)(36756003)(6916009)(426003)(2616005)(316002)(2906002)(86362001)(1076003)(66556008)(9786002)(5660300002)(7416002)(4326008)(66476007)(9746002)(66946007)(54906003)(8936002)(38100700002)(33656002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?PG0Qjf4leool65OrVS8TJL6U92s3pIuHv8MudeuTMnFMMhlDLCVCU5PxB0bQ?= =?us-ascii?Q?50uxTsphtVR/GKTXnNVKPtlLJsTLrJ+VEe6duylLa0zcj8Hx+OE+XFE9uBBa?= =?us-ascii?Q?8TP6xX2ELkVUDC3ZUYLVm8i/SBqIeLEnFdhTt9QHYNM00L7Irr5hhKh9Hlb4?= =?us-ascii?Q?q3VvL8rula/cXfp2OfpYAbo+2PioYDqGjPQDs7JzKhQprHIKUHfXFmxRP0XE?= =?us-ascii?Q?8+bbRi/7Q0uZ+GZAfvfI/9YrhNmbGdh5o0ApU51/V4JrhxUQwovTmxolZqOJ?= =?us-ascii?Q?8FTTMoIGdWd6KIuQ3yC4xTr+ANJL77/GOACLthBQSvnL7oiJ9qOI8gCzxuK/?= =?us-ascii?Q?X2PbTbD0KoiMTQ3f2Jh++PdmynMOBy017wZsNeJJ4fHKw0XJ/xNAHnkTIcAh?= =?us-ascii?Q?01hMcdKno4wxiRxgyl1hWINlDJ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?us-ascii?Q?MrSvbMrxR4UZRDjTARizIOSG?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: adeaf6b4-fa56-41ef-8eab-08d925eb44f7 X-MS-Exchange-CrossTenant-AuthSource: BL0PR12MB5506.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2021 17:24:25.5855 (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: qXvqPqCKBUGvN2TVfi52atQD5Au7MTLBgdTQFRcC38Mscyrk0xymRkBtyRjKwrr0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5030 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 02, 2021 at 10:56:48AM +0200, Enrico Weigelt, metux IT consult wrote: > If I understand this correctly, /dev/ioasid is a kind of "common supplier" > to other APIs / devices. Why can't the fd be acquired by the > consumer APIs (eg. kvm, vfio, etc) ? /dev/ioasid would be similar to /dev/vfio, and everything already deals with exposing /dev/vfio and /dev/vfio/N together I don't see it as a problem, just more work. Having FDs spawn other FDs is pretty ugly, it defeats the "everything is a file" model of UNIX. Jason