Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1183417rdb; Wed, 6 Dec 2023 10:44:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IGWXar+3txg7kHgyzIXZI9U7HzqQjaKgygLBX4my7v2dac2Lg9/LTEGykY1q8EP1Xdzeoe3 X-Received: by 2002:a05:6a00:27ac:b0:6ce:1001:2eeb with SMTP id bd44-20020a056a0027ac00b006ce10012eebmr1049885pfb.17.1701888265391; Wed, 06 Dec 2023 10:44:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701888265; cv=pass; d=google.com; s=arc-20160816; b=IRO/qXRJxiTnHQhiuEo1r91Z0wbELrYacrnEFM4Dj9ZqhSYrmMXnN+97KuvZmphIxt uy7oUQdjThZh/GemseOAy/SqN5Q36RtNhSTo01hwnx224dAclHOTLUm833ilY7NLHdp4 A32TahYBUCQjpBaBO7NpBW4YAGsZOcD5ACKTcdAYZo8YKYSR2h3B0qLBHmjMek5KfFUy jXkDVLKqQ52xoCHHNMXx2fRmY50ocBf+TZSTmubyHcvU2pzksz8FPZqEoobWlXtlVOUk EGgXZlYw5hEW3LMWrCAjJYaRXj1o03qagGG/xO9qeZeE6y2p6EOPgRvFbtxp6dmLwqS8 yxDA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=xNBRVZTpqs5BJWVrHkRWGJNgbQ61ipFJNMOg8ju3HTE=; fh=LZmoaZ4FOzgigtSQL6uAwTSgEYK2hStWC5ayzbW5zCc=; b=ka/Tdgghz6Fgc6GI3qrIfVlD5Ot5feO7+Rub2FUeJB3LLIyk1UOYmYrakBGF8M5uq9 BrtYGYY1jeYZjvZUUpeNoc+UqfkS6Ac5d5CbfQfV4tINHjwdZtCfeC3xp8S8wChxSBN7 eg4cU4ZwcUzpKJIxUA/mZioRg7zMYinXy7gr0fd3RE5JeiHdIci4xP7ZfdbZ8vbhIWV2 LrOk0CLrS3wqAiCCo81YAq3HBm+O1GcL9caTkLVCNVIMuqNhNwUnyk46yz789f5IQ7v/ y1hUsNlJ/+lBS9MNDtGwslUjXu+qyhEUQPcVp1JSu2DGpW41WB94uCfggzJXsLKJcgJr I0VA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b="lbt/gkRh"; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id q25-20020a056a0002b900b006cdfbccebc5si320746pfs.316.2023.12.06.10.44.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 10:44:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b="lbt/gkRh"; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 53DB8833967E; Wed, 6 Dec 2023 10:44:22 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378848AbjLFSny (ORCPT + 99 others); Wed, 6 Dec 2023 13:43:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229997AbjLFSnw (ORCPT ); Wed, 6 Dec 2023 13:43:52 -0500 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2059.outbound.protection.outlook.com [40.107.96.59]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C3C7D40; Wed, 6 Dec 2023 10:43:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=faWeVgvY4frH0iUqBBNHwh398+0kfEX9QsUIHXtkGYzFg6t6L/ii9fdmamxHhZzij7buLoyAVfVihg9v66OFln3RlEJ5/8MUlzthGKRCioeeTuSVc5n3ycXHCO8ppNmoJ7YVIrxb6Inky9skWdzip0sNNVqJ2YPDKlweII+EKYBiIzWblIwcxwWp/2HBNl3zOepRxktFqtPkQBOwyjWkClLq1VeQ6brgTtLefd58wrNAiVwgnSmLl4mpaQXRFZeNH4rMVGAG/6B5f/vihjvt7G+TPeQq+mhyHvxX9y13VdD+T6Bwr7xVkd9PA2xhE/ad/JQE0xUuTqjn6Uuqfaf5nQ== 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=xNBRVZTpqs5BJWVrHkRWGJNgbQ61ipFJNMOg8ju3HTE=; b=laa4SqfjGBRMvCuuyCqJZkdWZimoiA0onaH0ZxTZqph1FcDXR/qoj95HevyL3NPRrVR7ChYtiGJBr5lkF95+sHzQYTYAjlvG0gVX0WXnPHacsc6WDKhTx/wfku+lsuS6oGHi+IgfeogNajwAD0k7ae2OTvcSUOSGDTfmgDEwUs4ahJU4Bn1qGY5mlo9oqqSvqKsU74KYBzknlMYUBiLVhtJ0AUyf622qo7Ui+180k8RU1gB1WlAT2oSPrINqsRg9/NE4D1ANqx1jkUFPgUFQne32zsXi7pmEt+gNdTORqrKPjFADmtxDruJwIXMFVK4dFBkkJSczOqNYZxNI5xVhnw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=oracle.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) 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=xNBRVZTpqs5BJWVrHkRWGJNgbQ61ipFJNMOg8ju3HTE=; b=lbt/gkRhrzrsqdaGRpBB6hh68Sjmj+0BdLugnxQYzXr9d5PegP7RE8g3oxrI1eELwHiTLs9jLvQoPHKBbOKk6wJpdMmQxyqDSHdl6vGbsgayFkgAFD+NnRd/IzCOiq9CVmNamnPVu8Nm8VOrelwfpzMs8aNqEnpMfbqQ4A+3aQ6pyTU9jbtBTgcZUIebQ6RaWXRsZe/lfaJhwMawKY4CnBpLdFPMGeHrNTbCFr/ZbM+UDjLYEYIGT2WWFZd2oySSmGv0zeu1f0tTpJ713wGCLvucWsFHfKn8fdpRpMNhB64t5mNf9YTfl1HSM55P5zWcac91VPis0UZauv+Di5YQhg== Received: from CH5P220CA0008.NAMP220.PROD.OUTLOOK.COM (2603:10b6:610:1ef::12) by PH7PR12MB6906.namprd12.prod.outlook.com (2603:10b6:510:1b8::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.34; Wed, 6 Dec 2023 18:43:53 +0000 Received: from DS2PEPF00003441.namprd04.prod.outlook.com (2603:10b6:610:1ef:cafe::73) by CH5P220CA0008.outlook.office365.com (2603:10b6:610:1ef::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.25 via Frontend Transport; Wed, 6 Dec 2023 18:43:53 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by DS2PEPF00003441.mail.protection.outlook.com (10.167.17.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.20 via Frontend Transport; Wed, 6 Dec 2023 18:43:53 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Wed, 6 Dec 2023 10:43:38 -0800 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Wed, 6 Dec 2023 10:43:38 -0800 Received: from Asurada-Nvidia (10.127.8.11) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41 via Frontend Transport; Wed, 6 Dec 2023 10:43:35 -0800 Date: Wed, 6 Dec 2023 10:43:34 -0800 From: Nicolin Chen To: Jason Gunthorpe CC: Yi Liu , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v6 1/6] iommu: Add cache_invalidate_user op Message-ID: References: <20231117130717.19875-1-yi.l.liu@intel.com> <20231117130717.19875-2-yi.l.liu@intel.com> <20231206183209.GZ2692119@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20231206183209.GZ2692119@nvidia.com> X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS2PEPF00003441:EE_|PH7PR12MB6906:EE_ X-MS-Office365-Filtering-Correlation-Id: 9589f116-762a-48f4-8ae2-08dbf68b4bb2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0LYVTZKJZz5eh3kE8tbA8M3XX52dGX3ra6x0XKKydWzNe2lIz/E886e8/l8QvPyPraLQ/9SjJYDjVB8oFpRmrbL3R4pMyvxlGEO39W9e4lDCm4zUyUKcMulcrnW4L4N/g8EoU5HXdNexctpIxIUmRfVdtNwMs5eMJCkldgL4uRBO+bY9JXvd94GWFMLmn7XSvvSMJCp6sQ8SgdkwFAuOhBA3Z122KSuzhXQ/7WUwuDU++Cv48080AZPNYeoYGwyzfizXji7UFhR4mrqNP1VozeNGNhv0/yWmt1BKlg6z/PoUW3n0f1LaRWkDH4xwarH31GOrAJQgDHc9yAhqsUEbPii6YhFMigIJB8k6CkWx3arJg4YiBSzsMfsgLZpkJaOiSqQmn9PGR+Kzq276c0DSNMc1fjP3jU8tFejV+VUndKTCqmu8W4HbzUxYhQg3Kc+NY8Q+6UmGm9R7BU6GuOL7luFxt9rdcL4OrVkLR/qr4U3zUOgi4dvmyJN1BfuaNDGx7nUCYeud9vXDHQgCDp9vVCDe20YCR3KYC536eaPj7ZOFD7EazQPNmmtiAnMiJLyr1B8roirXqCpeR6Jd0BwEpsG/XdObKusTcV0L4KRyyws1eNwF0l4XhOcTqpLfVTqbrUsrzXfRgz5Gsm8ogRLLrNdOelcC6oZyo2ht0L2/wU9CZHnzd9Kww0ua60B/fIBAa+Al7ACU7gXQhC0Let70PQAstN1DCNgJz9jN6g/c5vfxuxASmhTfqJYJqVlKCL9y X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230031)(4636009)(136003)(346002)(396003)(376002)(39860400002)(230922051799003)(1800799012)(451199024)(186009)(64100799003)(82310400011)(36840700001)(46966006)(40470700004)(40460700003)(426003)(83380400001)(478600001)(9686003)(26005)(336012)(316002)(7636003)(6862004)(54906003)(6636002)(55016003)(86362001)(41300700001)(8936002)(70586007)(70206006)(8676002)(4326008)(36860700001)(40480700001)(7416002)(4744005)(2906002)(5660300002)(356005)(82740400003)(47076005)(33716001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Dec 2023 18:43:53.2373 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9589f116-762a-48f4-8ae2-08dbf68b4bb2 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS2PEPF00003441.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6906 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 06 Dec 2023 10:44:22 -0800 (PST) On Wed, Dec 06, 2023 at 02:32:09PM -0400, Jason Gunthorpe wrote: > On Fri, Nov 17, 2023 at 05:07:12AM -0800, Yi Liu wrote: > > @@ -465,6 +492,9 @@ struct iommu_domain_ops { > > size_t size); > > void (*iotlb_sync)(struct iommu_domain *domain, > > struct iommu_iotlb_gather *iotlb_gather); > > + int (*cache_invalidate_user)(struct iommu_domain *domain, > > + struct iommu_user_data_array *array, > > + u32 *error_code); > > Regarding the other conversation I worry a u32 error_code is too small. > > Unfortunately there is no obvious place to put something better so if > we reach it we will have to add more error_code space via normal > extension. > > Maybe expand this to u64? That is 64 bits of error register data and > the consumer index. It should do for SMMUv3 at least? I think Yi is moving the error_code to the entry data structure, where we can even define a list of error_codes as a driver data needs. So, I assume this u32 pointer would be gone too. Thanks Nicolin