Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1364264pxf; Fri, 19 Mar 2021 05:48:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+a9A/juCXrbuTGoSdOCO9qusC7dalc0Bg6s0QYv904ruTCE/ne3lvMH9E4zpsCy4AzENE X-Received: by 2002:a50:82c5:: with SMTP id 63mr9168419edg.97.1616158111013; Fri, 19 Mar 2021 05:48:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1616158111; cv=pass; d=google.com; s=arc-20160816; b=o+hfbW4AxO34i/DzTnNRmwzaLqW5GelnnU+0NWLo7R0LhxX8bnoaFnjltudatqg1fM QN996ZixWRVeLTzMhz2aLdGGJOE5z8oBYSmbEoWH+wmw5JSaxiYzHCQKQ1YEXDEnkYxT Uq4p+Q/ZSDa0goUItfNPcdZYkfmG1XF67EeApgEP9Ed7QUS/8T0RKs1OdYAW7Og3lHMF 6KHastxPqbTwsVKcSvBFkeo4wSupVhcNjM7j3Ix6u6cSlai3jy0yhwn9ww7DgaGPOw4p qDjF26tWCBzvosgOK1e/9klPKewbPKJ1XE3d8pr4eWrHKck6e2PJFS7UJ9KWrMehCnAV k9Aw== 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=u/nsU6ATM1M8lSjy/TMu9GVYVVA4i5cKPjws1WsiPcE=; b=nCHH71qGEtxJe04LA7LRl0WFQ79Oh7dXmVs08CMCLPZl2CP3tLVRD9RLMtUxpqgmTw mn+VS0vBN7H6yyVNMOULjTNRmmgvz+go8MqYU2UErmUu8E14wfktyZNekDn8mwI53EHa VT2sFB4UJ3xYnt1lHUVlCEwjlE0C/rdisyimOmi/FXECHrXkhN44m+gXPdLYfuD18nk0 q02OdmJb5uhCsErq+w//ncFu+JYHoO/CIniD6qPKevx3nb6J7yM+KJjSQWeXyhMj1mGl t8vSGKqC5JcISAI8ULc9ry2tUORm4TVN5mwPLOSwj4HhPbvhZk1FERrVcN0Xvg/ukyP8 HrZQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=uEritXAN; 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 t3si4213906ejy.142.2021.03.19.05.48.08; Fri, 19 Mar 2021 05:48:31 -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=uEritXAN; 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 S229941AbhCSMrE (ORCPT + 99 others); Fri, 19 Mar 2021 08:47:04 -0400 Received: from mail-mw2nam10on2046.outbound.protection.outlook.com ([40.107.94.46]:21373 "EHLO NAM10-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230119AbhCSMqt (ORCPT ); Fri, 19 Mar 2021 08:46:49 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EePDw7d4AAQXFmEKe7vekkGKuGriUNOs0SmKRS3vJYNxZEFAcgwcMkeUy/Bbo/rb04aepgLMAY5bmwIJ/h5z9JMYbA/NFQmDFUUNrV+PupVXkBpfH8Y+kZfUpx/+ZGw9grHcfga9fTo1EajjJz5fwx3k4gxwEUiQ/Q+BpQcxETVFY+4dkNDYcSkd4QFUGwSpkGpP0e4Vw9GO/jCkGSZaYjnICzqPKLRexyeGmDDICOVz1Onc+p5BfH5s/SAxNs/F+78GYy4l7MfFPQhQZSXHTMvqwUhLH/Z713wDCM4ZYKBHa/ZI85OAGIuvF9bLCi8xdRxzkCiRdWhj8Qna8oq2dw== 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=u/nsU6ATM1M8lSjy/TMu9GVYVVA4i5cKPjws1WsiPcE=; b=f/LXl831xSOMpyIbWz6Rhp3WaDybDIlfGW2juYl/+pfgal2CDVEEXyHXosl240VncUrHWev1tb4e8dA4hnnaBo1YcZQ2s2XOngRjc0arJCBSF8S4isehG3+BfwWN3CJcaYkRklW3A/n+m+2VXZbA0fGzl5JD4dosc+A9tNGf1WU57WgOybHbjWdIuGZ3FAEcBhs81A8tBh5Vs3g3h2lvDwCEtpv8R/RDJt3966oLdxODqDpHElVAXhNqpbFQScYKYOOHaPAkZB3bdTjvedHBWS1+N+mVrWx2vvSFJjdYEScg/hAbKhtGXttqLjz3wy70fha5vSZDci07Wy6UCXLliw== 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=u/nsU6ATM1M8lSjy/TMu9GVYVVA4i5cKPjws1WsiPcE=; b=uEritXANFQG9Bn/p5GsiLsdhMB3nJCOyTybyQHux5rmSPPBo2G6ryAUzXwr++B8XxBaveDtPL64dDaB5Q3iVDRzLcT5fPyntxu1W2y0RXngGQ8hPvLx/w9j0+MzTnnaLJCYawYG/x3kjvC9gLCw5yEKGZBs2CpquGEt3I1ooO+2UEwi1Emf+O9TJpdsubfCqnK/bwcl1yRHFdi12VZv7UxAE42iQihPC/gVX7iduaCJeB6RV5UZR/RpiYwz90nmYkHCR6zTDUNHtW/xtyT1qVIApYU/Rr5geV4OZk71gQp5nkk1YE4C01mjmHvm+lMqutkbIrv9AkoHagzMm9/iB7g== 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 DM6PR12MB3738.namprd12.prod.outlook.com (2603:10b6:5:1c7::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18; Fri, 19 Mar 2021 12:46:47 +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.3955.018; Fri, 19 Mar 2021 12:46:47 +0000 Date: Fri, 19 Mar 2021 09:46:45 -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: <20210319124645.GP2356281@nvidia.com> References: <1614463286-97618-1-git-send-email-jacob.jun.pan@linux.intel.com> <1614463286-97618-6-git-send-email-jacob.jun.pan@linux.intel.com> <20210318172234.3e8c34f7@jacob-builder> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Originating-IP: [142.162.115.133] X-ClientProxiedBy: BL0PR02CA0052.namprd02.prod.outlook.com (2603:10b6:207:3d::29) 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 BL0PR02CA0052.namprd02.prod.outlook.com (2603:10b6:207:3d::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18 via Frontend Transport; Fri, 19 Mar 2021 12:46:47 +0000 Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1lNEWb-00H8g5-E4; Fri, 19 Mar 2021 09:46:45 -0300 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f48e6198-757a-4451-940c-08d8ead50ed8 X-MS-TrafficTypeDiagnostic: DM6PR12MB3738: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iqLfC8e7oBivWuk/yKFjvYtAe/RKY9kQ7fzNbeeBXeh0UTEb/H/o8DJcrh//r8VXyifMIHSLcIxN/ht7S8dTaivzgcopl2gb0mS+IH62adMHfnDENpQaSAuacJv8NmP//oK+wGLlublicY6Ld51Z5EhF1UB/RYhAhGd65ordzR/YoTlbuoVwbtel0s+rS6es3x+ysNlziLiZh+hbX26ZN/Yhp0hIa2h+CXfT2wE59lK20BMTznfjd7pS7822E2vI2AsuQoI+FlUB3lUKdudh48rUtaG0c253wQVlFfnXCb+dSlX5kis8MFU9vooyTrgv6o6uuSSTx9Yn1Fio888qhOQTD4Ac4LW/fX3pb2kGOhY1Q9rpjBGLEqy1rwDf9Fbo63o0YhC3kl/mu20T9WFjU+eVNn5ClZAtXw6caj5T0Db7QVoZ7v9kPgsb3NDgFXLU9pjdTZseJNd1DeCn/nyRWVdRV5hSmAB8Kwu7l7mLWt5qjA2a9oLLO/J5VsoeZVx//2bt2AoQlgwKOiqorMpKDOIFxP/o+AwgnCqM4fEVMWFEcVw+Jfyrzv2UTOr3cX6sX30YAphejzJ/7bXVST5G5jrpfmG64T9g0GxSRf0sURX8zrckOaySADE3oyGSCNu6pinBGKyE7ASHO7Qo7CUtEFG1fwF3a/WZjGQQIaZmGh0= 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)(39860400002)(136003)(396003)(366004)(346002)(376002)(66556008)(186003)(5660300002)(8676002)(426003)(83380400001)(2906002)(478600001)(38100700001)(316002)(7416002)(26005)(66946007)(6916009)(66476007)(54906003)(36756003)(8936002)(9746002)(9786002)(33656002)(4326008)(2616005)(86362001)(1076003)(4744005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?QH9pANrXqm9QkYjfxGmv9MhML7hmK9/NecOUlwv0PRHE2YecxDNIcHNbrb1P?= =?us-ascii?Q?d65fIDikWnCt8e8UOSr9hvWvrTMCs8I0kapH2eeLmH6xToqc5BGdUmZenSwS?= =?us-ascii?Q?G0qyqs/UQQJdz0ov/E7d0lBahVW9jUQPCjHmBzfm11VpQrlFYT2bqmQhEPQ3?= =?us-ascii?Q?yZZnCu66Mq1DEMPons2Dcr1KKflYwf4GTCMzEMpgvuoRstghkgZJTYyw95rn?= =?us-ascii?Q?Qd5tfurQ69YTkT7ExlHDBe3kMeMOJ4wRsWstYxQz1EKO3Wr5JQ8KkhKBGjKi?= =?us-ascii?Q?0um+Qnq2bIooROuOZUAu0szOQsv/BfmzF2IgMpfjWAj0gHt4c5vKZ7nzBmGS?=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hJNh2T9AUXN3LEjL4hrr?= =?us-ascii?Q?zTfQ+FaQrWn/bua6D0+8nnOlUISoco4QT1dRFyYLMKlJv/nkEehIZVncGXMw?= =?us-ascii?Q?k1oblf/1eQB8shSXtPqMRkf4?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: f48e6198-757a-4451-940c-08d8ead50ed8 X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB3834.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Mar 2021 12:46:47.4171 (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: k5pgPyulmbJeFsMIq2x0rOT9ywJazTCJ1lwQvXy7mJQ9CabDxtlxeloANrU3mcsd X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3738 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 19, 2021 at 10:58:41AM +0100, Jean-Philippe Brucker wrote: > Although there is no use for it at the moment (only two upstream users and > it looks like amdkfd always uses current too), I quite like the > client-server model where the privileged process does bind() and programs > the hardware queue on behalf of the client process. This creates a lot complexity, how do does process A get a secure reference to B? How does it access the memory in B to setup the HW? Why do we need separation anyhow? SVM devices are supposed to be secure or they shouldn't do SVM. Jason