Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp462013rwe; Fri, 26 Aug 2022 08:09:04 -0700 (PDT) X-Google-Smtp-Source: AA6agR5Z7AW9y5UJ+MMr0hU3w/jL34RJboW/xVUOHLLEmpSA1a0C7q0TsfiODGbQawLzRJxEyOjL X-Received: by 2002:a05:6a00:244a:b0:52b:e9a8:cb14 with SMTP id d10-20020a056a00244a00b0052be9a8cb14mr4349610pfj.32.1661526544319; Fri, 26 Aug 2022 08:09:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1661526544; cv=pass; d=google.com; s=arc-20160816; b=atkBqRduXr3FBHD4SATUFrBRI7cP3lCi2+8/AikGWNKuzA7dNbI5MTHvRSFuLbv0Pe Q8QtxG73rA6eGDurPHtwYwE6ovueAiFQGr+16PMzzVLH9llRKXm1YjBLhJMsLf0qGpip aVghbsS5gV4S3xJnZ7GBTXYdntaxYaAe+9JVjbQCHRmjqHvk26qbGVCpB+QovuYO2JLe JCVNdNv/JUpwRNf9CQ4moFbj6nHJEBN3krvZJKHlf2lRYkSA7KcMG9958bgxeb3VXz/i WdeuUEv7V2HxLO0ASJ6ZyoqTtof4oBwJqSNUJtW+ZPr1oAjB3A4KSGamWM5+aDkRF7Eh 6qew== 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=BOMPgAD5EWh57y/LPbyjTP4xVJ0pzda2lhjutvFuDRU=; b=k9JL1j7QdPqiy0zmcb3VtB6+3NWfdQIwMKOqZtHYz8HjgUIsKQ0LGPKtUM7EvfOyne V0PubVPqwoL516zVNuGvhiC0Pf3nRCtZTVmUjkIDuM+x717utW8zlC8vjL+k+nqvCPK1 3N7KmFsA0KxFljz3FtVZqVqShHX+RUH7mcChsgdOQ1eXNgb5w363nC146euz2fvzNmPQ cMBFQQ1Y6DBbZ1TXTtcGZYntqo6MINFlIefEtEZkM+C7oSOK14DSi9byXWV7NBuJzGyP 5jnp9eq1RXKipdBrLb70eFCvexFEUUDJ73VN8nJyiZOujzN9JkwoyPZgTcRWiXYxam09 AKDw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b="Vjz21/oR"; 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 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nv14-20020a17090b1b4e00b001fb29d5d2easi2362478pjb.67.2022.08.26.08.08.22; Fri, 26 Aug 2022 08:09:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b="Vjz21/oR"; 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 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240426AbiHZO4t (ORCPT + 99 others); Fri, 26 Aug 2022 10:56:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237173AbiHZO4q (ORCPT ); Fri, 26 Aug 2022 10:56:46 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2075.outbound.protection.outlook.com [40.107.93.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE024D8B3F; Fri, 26 Aug 2022 07:56:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VWaTLazr9aZafhrarLQIktASzP/5Dln/x7bZnguJe9NQS5IjM2v2XrlyEEr/De+RmFTdpAalBd9f//E4aSYpd9fyM8bMrNRcUDHyMxEODStRzXRpOC1cEEQKM76gW3mNoQrwu9JNag3SYH6xn5P5d9eQq4+aVWpWeAQfkwtX0D37ydMOSYYIk/ALIETwhf0QSR2Mn3Q2GDlGmnF1BsrKlphoCtqYCY1bffCdO3rO1ngo8eoli2mtf+YmvHAdTkzASl7xqbVaQ1s79bDeh37tDaqIX2swejVkrdpthjeTWDo66LiRMThZ//KEDqMQ1lKqyRYyg3fQ8Nw+vvhj6QEMHg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=BOMPgAD5EWh57y/LPbyjTP4xVJ0pzda2lhjutvFuDRU=; b=cJcNjR3Cc7dUeIVhBX0iQFugskeRfJ8d8nePZNWi2RNcWZVBLUfVnbKRezgRGGcvJqdQ1H+hYCnuCpMITo3eF0rogHVLxXxdA8BB0ilMJieadjr4o6RPYb5iH2VdqX1UWiKNgtshNZfLOhCjB+WXrCHA8xAZiTns2CihmILA6HSQ9IaZjGo3g0lgRXJcYNkNnY0Q3ZabbPwVxeSCVpaA+rB3MI7PSUsI+H9C57LhfINClEYVk5pEjdq02WQrUBNSWgxV31G7OFkA7HOJYUovPPhnJexn0xzuGl6EjK4KHm3kndgoELC/87vGl+NaRFv8Ja/BCoxyIzZIeCv7HDfDPg== 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=BOMPgAD5EWh57y/LPbyjTP4xVJ0pzda2lhjutvFuDRU=; b=Vjz21/oRVT2ZsCQ7OQxMAAmvfShnFJQGoMAaVmVShRDBddUayTR90jFFS0WSTcZHizzU/T6Aw5lf7Yr9porYZqdNDrFrnbt87gh6+lI2WEpgi/A07lzLtM9Q2Hh9qcHPX9E9HJPTeLLl1d0m847VtoMs9wnkWL24dFxzHJJIzDInQBhTXFvWEGo9uqsiFm7WydVGLI8wLzrpJD/qKPeNY68Pu69n2OkpaTSxxbCrkZVCbb+GTK1pwEaiEdKt7/1vJ4QXCFFoKTGrSHC/ZzSwU1uXWKjGTONu4oQdFhMWf2GzMu/htTGi6kvRJc3bIqUM1KIdVy6zeV8eyapYhboE2Q== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from MN2PR12MB4192.namprd12.prod.outlook.com (2603:10b6:208:1d5::15) by DM6PR12MB4138.namprd12.prod.outlook.com (2603:10b6:5:220::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.15; Fri, 26 Aug 2022 14:56:43 +0000 Received: from MN2PR12MB4192.namprd12.prod.outlook.com ([fe80::462:7fe:f04f:d0d5]) by MN2PR12MB4192.namprd12.prod.outlook.com ([fe80::462:7fe:f04f:d0d5%8]) with mapi id 15.20.5566.016; Fri, 26 Aug 2022 14:56:43 +0000 Date: Fri, 26 Aug 2022 11:56:42 -0300 From: Jason Gunthorpe To: Lu Baolu Cc: Joerg Roedel , Christoph Hellwig , Bjorn Helgaas , Kevin Tian , Ashok Raj , Will Deacon , Robin Murphy , Jean-Philippe Brucker , Dave Jiang , Fenghua Yu , Vinod Koul , Eric Auger , Liu Yi L , Jacob jun Pan , Zhangfei Gao , Zhu Tony , iommu@lists.linux.dev, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Jean-Philippe Brucker Subject: Re: [PATCH v12 12/17] arm-smmu-v3/sva: Add SVA domain support Message-ID: References: <20220826121141.50743-1-baolu.lu@linux.intel.com> <20220826121141.50743-13-baolu.lu@linux.intel.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220826121141.50743-13-baolu.lu@linux.intel.com> X-ClientProxiedBy: BL0PR1501CA0021.namprd15.prod.outlook.com (2603:10b6:207:17::34) To MN2PR12MB4192.namprd12.prod.outlook.com (2603:10b6:208:1d5::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a153b5e1-1f7b-4acf-c2c5-08da87733087 X-MS-TrafficTypeDiagnostic: DM6PR12MB4138:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3+ZJDENMG8WoVwc5iJdMi8brqDgBVqll7Hdujnm+Gb5sslLrLh2UEgGLCfUVrl0y6mhMkZqdXjtojLsX7ITHincYY3793f/0z0xvhAPdZivz0/tviFFAO3jyt7he4Sap3ujPUXZ54lnqeof+y79/zKQrPRWwYQBsZym36NnJrrEbkHFowC8p6TzHZFL0JutX3B67urpkYCqnMWN9CwWGTwZx3rbC9hZMMDbyvWfR1IJbIJeuTgYyBdj3jd3tSP6kfvSvfLPG9mCBbzoMfL3jNaM4fGMWs69pjoNxpKrgbjjt66JumJ88SGyrWImgWs7xW1PT2bNVzNBVS6c73wRrWTdpwOK1spRDXTPWr12yQr3Hk9LEb/1knnzFJnjv2sTznSVlCwKHJaWbxk5YaeDad1j9xlQ2GpLJRga7BGwo/UkBeBcyciu1KvR2SofhzQdFveViNSKv8LaI4l+Uj9ajUb91xG4UBfb9E8W/n7x7gtQyXDJFS0dBKSmJwcn/4VeXnozq+REo2BxsfAMNxlQUEgdoya799vlA+wjU/GNgoxuIKiHXS5zWv1aoloFkOpB2bY1XA3d1vnQMYxQvuEpvOdJRoIBJVWwFLlIh4xTlRLojKT3Lwzi2fAPUJN5voEIblQfivjKhBvfqg2PNwuEvhO/36mRwRVm87H0HTrvMf3n0ej/8fSF9YzHeGRT6E/R3R/1tZ9iX85tHaY5gKBUzYw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB4192.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(396003)(366004)(39860400002)(136003)(376002)(346002)(86362001)(38100700002)(316002)(54906003)(6916009)(2906002)(8936002)(5660300002)(7416002)(66946007)(66556008)(66476007)(4326008)(8676002)(2616005)(478600001)(186003)(6486002)(41300700001)(26005)(6512007)(36756003)(6506007)(558084003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?RCu1vzO6I/1tA25bSqSAU3oElN65Y6iYD+bZYeI7/Y9JlzCst56fTq9KR9wI?= =?us-ascii?Q?N6xixsAKt3CaUYIq3MuMT5rEDLlo896FUiZxnwmh+2hA7f08goh++gkCC7//?= =?us-ascii?Q?hvdW32t8Q3CZpp2WuT3ITgYfAG6xiTruXPseGApf4rqZB4ScDjL7n9P2aGeX?= =?us-ascii?Q?deDcL1hCiyUkUi4rH2+BIfvVT96njYx7H/W/TV4iKp1SeJtbEOgfPEY71zK9?= =?us-ascii?Q?Teh1y6Xa+qBvaQE5sdYSllBJsoPTUQkDS0ZWV2nAt7aBFr/yAXawhDyFc8EV?= =?us-ascii?Q?SvF6a06466GT+0BS0YQF3fdEUyP5qc3MFguF+Z/mUCySx1/MjhIGiQqA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07ES2w0EK7ncoy0IHzAXah4LXpbg?= =?us-ascii?Q?qWU9iGRYoS3HSYV2He3ia07ykOlxfVCS2Qsa6nRIHzNX4AYxI5ma+B9yANVX?= =?us-ascii?Q?BQugMFEn+FOnC3LaeDm3YU3tQJGxQE+aPwCFt1AhJqjNHLxobjPCAT3mVeiT?= =?us-ascii?Q?zr78IFhzsLrTmSlTJVaP5vtFLSdzqucBUzLNa8vSuJjjrrh9jc4ezu3GX/oV?= =?us-ascii?Q?JUoFVva90TwTtbVVmdHZ7915Dd8b9C+xUwE7muz3ZEaazu7b9ez7c58ENXR0?= =?us-ascii?Q?f217m8Z20EUjlTF5p8rJngsrAW6j6MxYGQQ+0cs/DNCdMTEMC8lGW5U8e2qV?= =?us-ascii?Q?WO79obEvvaTK2G117q+RZP8JEXCRmO1CK83P8q9x?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: a153b5e1-1f7b-4acf-c2c5-08da87733087 X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB4192.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Aug 2022 14:56:43.3725 (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: 0ECE7U0Ktcll9mpjCpZzbEIt8gi8La9co9dc0OQlvezCav2pFegBXs+J3M3Xg5He X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4138 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 26, 2022 at 08:11:36PM +0800, Lu Baolu wrote: > +static const struct iommu_domain_ops arm_smmu_sva_domain_ops = { > + .set_dev_pasid = arm_smmu_sva_set_dev_pasid, Do we want to permit drivers to not allow a SVA domain to be set on a RID? It seems like a weird restriction to me Jason