Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5556741pxj; Wed, 26 May 2021 13:30:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6RurUPGVBKD6b+Oet7FIPMYI7FbA9MXO8TLpHqTCWEEWlbdahQ7adZZ6VczTarl32QJ2k X-Received: by 2002:a05:6402:22fa:: with SMTP id dn26mr61616edb.5.1622061027720; Wed, 26 May 2021 13:30:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1622061027; cv=pass; d=google.com; s=arc-20160816; b=v17VdOuDoXFEDnZbrRAzol0ZLSwsx+QzYBYuAMlVwwJYspjSfp7R8irAcyziulTVku ahSbgdprSf6m2etf6o9iuAN4viIiayFKRzA4QUTkfAX1stxma4IhdH9MafxvnQmZyZDq sTteduIDJ/I0eOC7Iwd9wqdCBfumLuoskGw47m+Q2rCbSomlCI/ofA3cRtgdjb6o0qIq wh6sdRfQ5sRBMHlR/IR9jIrmCPHzfwFoWpRhoTXoh5YMlYYI8oR6MLUYXqFSECZmuSTp pTDvagZyFXY8FmYbO23nc8KDK4MFdSWeyDl88auhXZBhFkqcJHVIJajFBv3ZAdVwfTKc MBOw== 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=SWuO9e9xT6uCDc51InbjAXoSqaQdVWoQ3GqsT4SVE+I=; b=EDY7XV2zDCnl+iP1DmdmQxB3opE/PkNLvuaGkesRV13LmlnoRubGHp/ivZyAWfnGjV 3QWkzWPbyHnIVN0E+Y8EvVtKuuC3wMrwvvfjeWJ4CVMJS2jxNN6lhzyd4eJRf1yyDyL5 MlWYZ7woceKgKMAEppC/uVpxLrzr/XneF3MwgfIH0EvUg0HDiYRGCarVyG24pmbSssGR 9W4q3Ev0EiLXUIW5rYr6VpKbyDSnG9l3rACAfapbBPFqpenY+L3Xevk7BvvYopQgOQKv LdS0xhMcYtTWhkXUcS45hrthLBawSdGFMezY32uxms8E0HbSulgySk369gMEQCW+kzUq SPFw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b="mC8Vk/BZ"; 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 f8si71660ejw.475.2021.05.26.13.30.00; Wed, 26 May 2021 13:30:27 -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="mC8Vk/BZ"; 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 S233669AbhEZTO6 (ORCPT + 99 others); Wed, 26 May 2021 15:14:58 -0400 Received: from mail-bn7nam10on2076.outbound.protection.outlook.com ([40.107.92.76]:62689 "EHLO NAM10-BN7-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232133AbhEZTO5 (ORCPT ); Wed, 26 May 2021 15:14:57 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h5EaASX5k0eg+8+S/XOzt17c6M790r/ecjjFcGeYGwESDn1XRsnk8R+bCRvYsmwT+a3IjP3DYyNn24UtFZKv8dgtvu92a7AuThkQHb1ht7o+gHzI17M85FWXEDzrVEfHksUMtpjoUk6gPqQTpUk+Hy9WezaG/8I/IgxfMafICCZ7dqSwVcq0PoCGmGMBeQilDlAmlIFNwNxluoLfin5wra2E+nZUmcsg5sKNK9KtP1pCagwGx/EVwGo4KjIg03N5v6w/np/oRL3NvEtygxWh+38V+B+zaSYK9cH/qnVKAOTvdL1suWixHqBcTQWWjKoR7qZLlLP9dZqtZDUfluDuMQ== 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=SWuO9e9xT6uCDc51InbjAXoSqaQdVWoQ3GqsT4SVE+I=; b=UWW9Oz7c0gw6uVJAZH1XDqGo+OU/64PLNXSshyhvXhUgIn01SfKqk5YvPBOV7HI2FNOMCmJZ+Z8EfE0eSyAmWBgczI6swzvMxrws0BgSCn9P5vo8Ga8d197Do439cH3qL4ZkQ4n/svdribJAtWcBR7hdetzNxoFvwloZg3knmCgxoGlL3nG+LpNTSRaGS8/xO1fSyv7Zvx/pjsYhcsPaKmel4qM6CrBk6l7hCDOf695X88+NzKZPqNnEEbdHyQ9fZxXX1W+kvDuI01agLgGkBCay3DqE2yE8CRM+a3ImbYW6MGhIj6mF8B0w7/ADTI3HDfQLfY5i3qHiaWY41dKYtA== 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=SWuO9e9xT6uCDc51InbjAXoSqaQdVWoQ3GqsT4SVE+I=; b=mC8Vk/BZMuGQ9+dcKC5CDBQPUR3rAIEcSdoIlDqhxH3QcefGTHvP2JwdDyk1Vr0LR/8yhPCaj8c1EyH8mD8k9YsowGQRXQhYSUd4RrDoTtpIIB3LT4/sXNUJpOc5T0nDtDA/wIPZ2suXtpzJ27edmulW7B24RLIBI/gQZsVJnmo+C11BnFZiGZIQo5ILYspY7j4/whNet1uRlWvwojzy2iSgUaD4OdRg283oeiaKz5o1ZOE5VaV1ct6cspZq/nAhgS1oKM/Ut4kerzrQsdSIo75+IdV0so16xphObhkQdJxo3W2FtEUHi9ips9nnYNO8xGoFQEGSceDUTkZYwDNItQ== Authentication-Results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=nvidia.com; Received: from BL0PR12MB5506.namprd12.prod.outlook.com (2603:10b6:208:1cb::22) by BL1PR12MB5378.namprd12.prod.outlook.com (2603:10b6:208:31d::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.26; Wed, 26 May 2021 19:13:24 +0000 Received: from BL0PR12MB5506.namprd12.prod.outlook.com ([fe80::3d51:a3b9:8611:684e]) by BL0PR12MB5506.namprd12.prod.outlook.com ([fe80::3d51:a3b9:8611:684e%7]) with mapi id 15.20.4173.020; Wed, 26 May 2021 19:13:23 +0000 Date: Wed, 26 May 2021 16:13:22 -0300 From: Jason Gunthorpe To: Alex Williamson Cc: Kirti Wankhede , David Gibson , Jean-Philippe Brucker , "Tian, Kevin" , "Jiang, Dave" , "Raj, Ashok" , Jonathan Corbet , Jean-Philippe Brucker , Li Zefan , LKML , "iommu@lists.linux-foundation.org" , Johannes Weiner , Tejun Heo , "cgroups@vger.kernel.org" , "Wu, Hao" , David Woodhouse Subject: Re: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs Message-ID: <20210526191322.GQ1002214@nvidia.com> References: <20210503161518.GM1370958@nvidia.com> <20210513135938.GG1002214@nvidia.com> <20210524233744.GT1002214@nvidia.com> <20210525165252.6959d9da.alex.williamson@redhat.com> <6f9dad1a-4e15-1703-d6f4-1b51b7fde15a@nvidia.com> <20210526125905.61e00a18.alex.williamson@redhat.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210526125905.61e00a18.alex.williamson@redhat.com> X-Originating-IP: [206.223.160.26] X-ClientProxiedBy: YT1PR01CA0062.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:2e::31) 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 YT1PR01CA0062.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:2e::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.27 via Frontend Transport; Wed, 26 May 2021 19:13:23 +0000 Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1llyy2-00FHoE-AU; Wed, 26 May 2021 16:13:22 -0300 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 279d8b3b-c87a-4bdc-2edb-08d9207a5535 X-MS-TrafficTypeDiagnostic: BL1PR12MB5378: 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: /3uyMzckQYysMCaXhLe3SPUG95Sb7XiEVRMnHhEFrAcklWn2GXoeBmBUEpv6J1TAXCSSUPmAB0U7sMG/bZR889jCTFGptVpYvW4SMztlg7tq/P0cO/ETn7Pqzh34HrvlDI+lWtSpgd2vNTai0bfYLqZc8Xuwn5ZEizpw1W5Or3yu+6rnl8JzB/YOM0wrsI5vShYKDWaFLqaQT/hjlk7tP/67wcwNyXBcfKYACWmdWxSPmcosmBCWYGSI2VxYjAGDK8G/mOxJk9nrJl62jayyfzX0ZS5sAG2Mo9S3WpV/b4a+YTPqElkdmx1gvHpvME/WBop8FBTFYIPNuoDv7avZJo2qr3pGp0QnwOQ4xy5VHIN8fL5fHugT73/+nnWh/ZPhEScymCfZDC4hVnOw2a9/VJvMkn0Nsi/9bEqtYgjGT9oGZMPMEv5yAm5VUyDmPEd0yT8565IWdFsPaHiB7PMZJz7x//l45xMa1/ae2X9TDYlYri8Lzvwggg7A8yk0+5idVho5w7ahKGsd+XN4SFzRc4ZOSroXm2IhvsBPtOOFzmT4EPZXkanc/J2340Nsp4FoOL5xr6I40epcDY9SLkpSuOMV0lTUbKLNV5URCynAEh4= 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)(39860400002)(136003)(376002)(366004)(346002)(478600001)(8676002)(6916009)(54906003)(8936002)(9786002)(4326008)(66476007)(316002)(9746002)(26005)(66946007)(66556008)(186003)(2616005)(5660300002)(4744005)(2906002)(1076003)(426003)(7416002)(86362001)(38100700002)(33656002)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?JJrAlqwRkxgLHKBIi9a9pVMlGZ5eUJSTHZP8V+1o/wvW9C2XGbRXdLIhc4HR?= =?us-ascii?Q?WDuuj0QxpHMDwknLZ5K8BsmaxALE0dJUg0DjNdeRkcYL2xfFvoNk/2npmcn4?= =?us-ascii?Q?aWozB6ccg9N5eDYlZx1Q5+mTN4daXWGWOlmnxzTZMiqFLKVdWuyq671wXPGd?= =?us-ascii?Q?AT5kr1xaU30m7doZxUrFK1QNY7we+cFBXO6+aOcR+cM7sz4tOCPVGRBqiCSX?= =?us-ascii?Q?0zyQZUk5MsS3aW/mgFbE7iBQ4u+YlxzLP3egMg/t5C5Iz4kJoMeLlv6ljL/T?= =?us-ascii?Q?Qq1E35LTDdz/NEIMKHW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ii?Q?9Iyf/VI60vYu7AStWEUSXxbNX2WprfpRLjWTpuPzhWFE0jHLe4/4Tsp59UOJ?= =?us-ascii?Q?v5nGhwQ+8mW37GX8Zf7Jy3F4L9hoPncqc/tMV+NtVE44tDdpO2/X1tBn7Mia?= =?us-ascii?Q?JxCNetIUIPi4+TEDWgTG/kkk?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 279d8b3b-c87a-4bdc-2edb-08d9207a5535 X-MS-Exchange-CrossTenant-AuthSource: BL0PR12MB5506.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 May 2021 19:13:23.9045 (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: mDgfjLoMDn3USYzpsMNjZompRGH9tZ2nSsPZzIaJWN+g50A0jUqvjiZPi4sl0EEp X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5378 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 26, 2021 at 12:59:05PM -0600, Alex Williamson wrote: > A driver provided sysfs attribute would obviously fill the short > term gap, long term maybe this would be standardized via netlink. It > seems a bit analogous to setting the MAC address for a VF on an SR-IOV > NIC or VF namespace configuration for an SR-IOV NVMe device. Thanks, We have been doing a lot of work in netlink/devlink to program the VF settings before starting the VF driver I've long thought it would be good to standardize a VF lifecycle in Linux eg VFs start their life in some 'unconfigured' state and drivers don't bind, then userspace can use the PF to perform configuration, finally the driver can start on a configured VF We are already doing this model for the mlx5 'sub function' interfaces which have alot of analogs to both VFs and Intel's SIOV ADIs. It seems to be working. Jason