Received: by 2002:a05:7412:bc1a:b0:d7:7d3a:4fe2 with SMTP id ki26csp477234rdb; Sat, 19 Aug 2023 09:11:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHPiivXAweBVtnn4eb3yFq/Pf2tMfkj1AgrvYM1FT+OVCTYGVR8PBzd++f6DgnHKkV2z/Fb X-Received: by 2002:a17:902:dacd:b0:1bc:496c:8eda with SMTP id q13-20020a170902dacd00b001bc496c8edamr2769041plx.4.1692461472854; Sat, 19 Aug 2023 09:11:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1692461472; cv=pass; d=google.com; s=arc-20160816; b=I3MgbpWSoW6YwI1vhSgb+i2+eF7eUWrxkwpfiFRJCT019QNy11T4xTL08jRScxzgdm RekRyM5cb461FmAcTeDdOvJxlWdWticr+Pq5JTvgLT1GNJo6/DJalPOtsq6WTWmFe1xw /K8lB94LOBo5T5n5OWKgoQ1P0d0Z7B0zR791V98lcDK5Eq/IloKLTnMeLdhC5o0+xShw /QiZhzGLPz/IhMpknvsZGtyfwWvAkRQg/tuvbfBiryYLhoEvdR/7omRHqIQG+VIoep2K EZeSMU/Rm8QWLUuUcUbOi70hQNBLg0bM20GOjqT3EDtffq6mMCS/8pAOYDJ4vRFvQKOE jJkg== 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=BX3wc+WFwWbFGcxhW4+aWoJPJma26gO3eOloFJQuV9U=; fh=uQYxKZfFu6aadjmlRJfPF098ZKQmk58RvPWm3cjlXCk=; b=GG/s9m+XzZNEFnbW75DOZJ8PELYvT8vzykP74lZRQ+E/tifJ+sEopO2h2lmmMu8eo1 ocS9W0bixuOe6JOxZH7lbZ4vGjk6JytH9g03+9s0FUwy3LAYo2gJ62Z0cb2dS0QaOaxo 7GWGxlUqi//pWtlibZzCK3joqxzHnQH3rtihkVvm0f/Yd/THzggIl8n3T5MsqNtOmiZh GE832irV39JW9Mz14xIr/FoMMBXjJqCDh9Vn6f2z3cFQN2g6CNhxx0IAL6YgDyiuBx/A J9PgFQHKuQLY1s9VmgAHr9fXkJXKgAnqMi7qu+F2rV+gcuvEyOm8nefXpVkX1O1FkPiG Wi0A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=o5QR0W+g; 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 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id lf16-20020a170902fb5000b001b886d36bf6si3561773plb.226.2023.08.19.09.11.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Aug 2023 09:11:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=o5QR0W+g; 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 2620:137:e000::1:18 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4153A101E62; Sat, 19 Aug 2023 01:50:11 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357537AbjHRS02 (ORCPT + 99 others); Fri, 18 Aug 2023 14:26:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379479AbjHRS0M (ORCPT ); Fri, 18 Aug 2023 14:26:12 -0400 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on20601.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e8a::601]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 119D930E6; Fri, 18 Aug 2023 11:26:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Fh3sCToGqRWvMsXxebzs7IkYSXU8lTDBdcsDsRqiXn0y4puVqVIvfnp64AkTFZbE0bqa7r459A59twgDbpG37H7ISNBm0NJLkQoer4JzsFL5X+O6wGcfjDI1JClKJU2aFroOTyfAvapNWoq3OuYgmY2Dx0kPPplveBqXx+maJz5QAf2L1WlSLgqpniZ27F2uMOqdc+1ZelNXXC0EdSuNRkDFR4dvD60gUV1TG7z8+kn3EMTJsHAzPLdgEDDmKsWJBcqwBLNu7YH4/HIyYMb/BlgzMFZktLlsDKeNCewbzcmB4aBuuPNNrfA5+YJxbr/uhgWi9CumEuOZ/fCXKEzIew== 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=BX3wc+WFwWbFGcxhW4+aWoJPJma26gO3eOloFJQuV9U=; b=G+D34DXOZt1FCNjEiry22MNPG7C2YRfNPJl/KcW7nnjUrlhh1ukKr37YBUU3ZZhwSE21B2fJPkP5j5zSkZriV9OEarc8pwOARfsMpQ9ok+f6CC24WWarABGDTqOVuvXKDS0Pa13ZCgQ8Ua3cB8kfPzr013cHfuq4BiRIH3hsuAr4J62XS9sUX1/tuPqB43pFaPade2jNFjWFSP21uK0rugq/U9uO+Et7uDvKmYxulav+RjK4+amux3/2YfvmHqtfefUJQOQP6iquHMdCuV11hY9Y8i6lL+MQPoBCZ+4y3sFSwxnWn9nFzImJuPRbm41k8akqhWbG31Sa6IeH+KuZkw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) smtp.rcpttodomain=vger.kernel.org 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 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=BX3wc+WFwWbFGcxhW4+aWoJPJma26gO3eOloFJQuV9U=; b=o5QR0W+g2Jrk0H+BixIe19F1Bp2idZjpwbFVNu2E6iv1UCvwPtZVJ5BeuGpyYHo1QxegVZu2Agvk369bQYx2WGYmvbtzvxNLCVcSmm6fcFnrtN69oiCOwbsKXkqdEEO9+fbgHihkje+EttnQa31Dlfpt7z5WlK4q1bRLy5s7r9/mBiHazBeipx8iQco2gdV5LB/ScZLEznH3nguQiwta/G1mkVjoBJeI00I/nugXENMgbexeQgzLC/P+TEYU3uOwmWiPDUZ9xZgn0NxullI2RZQU7tia7dSMYrmNNpngKfveIFT9sgkrEkD7/01cKkPdNhuj6yTUDmOs2WIApIVgIg== Received: from CYXPR02CA0083.namprd02.prod.outlook.com (2603:10b6:930:ce::18) by IA1PR12MB6481.namprd12.prod.outlook.com (2603:10b6:208:3aa::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.26; Fri, 18 Aug 2023 18:26:07 +0000 Received: from CY4PEPF0000EDD2.namprd03.prod.outlook.com (2603:10b6:930:ce:cafe::e5) by CYXPR02CA0083.outlook.office365.com (2603:10b6:930:ce::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.20 via Frontend Transport; Fri, 18 Aug 2023 18:26:07 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) 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.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by CY4PEPF0000EDD2.mail.protection.outlook.com (10.167.241.206) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.14 via Frontend Transport; Fri, 18 Aug 2023 18:26:07 +0000 Received: from drhqmail202.nvidia.com (10.126.190.181) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Fri, 18 Aug 2023 11:25:57 -0700 Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail202.nvidia.com (10.126.190.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Fri, 18 Aug 2023 11:25:57 -0700 Received: from Asurada-Nvidia (10.127.8.10) by mail.nvidia.com (10.126.190.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37 via Frontend Transport; Fri, 18 Aug 2023 11:25:56 -0700 Date: Fri, 18 Aug 2023 11:25:54 -0700 From: Nicolin Chen To: Jason Gunthorpe CC: "Liu, Yi L" , "Tian, Kevin" , "joro@8bytes.org" , "alex.williamson@redhat.com" , "robin.murphy@arm.com" , "baolu.lu@linux.intel.com" , "cohuck@redhat.com" , "eric.auger@redhat.com" , "kvm@vger.kernel.org" , "mjrosato@linux.ibm.com" , "chao.p.peng@linux.intel.com" , "yi.y.sun@linux.intel.com" , "peterx@redhat.com" , "jasowang@redhat.com" , "shameerali.kolothum.thodi@huawei.com" , "lulu@redhat.com" , "suravee.suthikulpanit@amd.com" , "iommu@lists.linux.dev" , "linux-kernel@vger.kernel.org" , "linux-kselftest@vger.kernel.org" , "Duan, Zhenzhong" Subject: Re: [PATCH v4 09/12] iommu/vt-d: Add iotlb flush for nested domain Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EDD2:EE_|IA1PR12MB6481:EE_ X-MS-Office365-Filtering-Correlation-Id: d283e4ff-a1b7-4fdf-50d4-08dba01896bb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: f78JlCcgbamYaiP684t9nsjVx4/Xg+2q/+ZuMi2ApFiCpQnwHUS6lmbU+LKXyBFSu8hj8GwKhPK+wI+QmivpcN0LLg6joUqtOJqgyNg/mQ0R+gqDTUqzTfx+s/plIZLLa/ZZ193DoLmuSeKnUnxmGRD7Nfjs+8dDCtMbopL2vwFjPtc7X/CBBt7lhaU7ex+w1Xcs56/GrLsgozTJinfQXr3kBVEv/WadirTFHWLTxVLFvjNN/vH0iI5lGX97XEPkSkBWLv8SNFtgWFwjJov6TjVd0kuaIES3PCtQJ8XxpmdzH10Ze+xYCTZJeyyvFACxGefaGghYOJjeGKcqxwQVoSBTDruFMKbDxCwhEphJUIW/EBlFQ0tTG2InKxU7VY8JxPYh7jQGils6ho/qbDQNdQCYb9PEMjqu3jOHaFYqcwps40GhXqor9EqVh6vBxvlKbMMYrUyBr7TTJLwrV/qBrExQFoAjFR2USM9/2OZbGWjCeV6mPhMpd8GCWpNbOVfgCfvlgKdfrUq0RBcVGs0tMNrRc7P9FAImMm36J5lNY945JcqJ9FM8N7Exj1HmgOZ/BmIZzRMm/3driEbH4QwPA0RbiqeY5T/uwx4TDy07AtigQW/TE19nZNbtSe9OxniFGtK5jyZzIx7R2UDUD4O9MPPuDIb0Xp+yRnD//gqiOHgAof+fODDOECU0vxoNXdajjvcK7lrceK4ZOT+qWsM3kvrE+0wSzNJkKg7lbCi6AdvNGxuJUxZlHw+tZhqvLTO2 X-Forefront-Antispam-Report: CIP:216.228.118.233;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc7edge2.nvidia.com;CAT:NONE;SFS:(13230031)(4636009)(376002)(346002)(39860400002)(396003)(136003)(451199024)(186009)(82310400011)(1800799009)(46966006)(40470700004)(36840700001)(54906003)(82740400003)(7636003)(356005)(316002)(70206006)(6636002)(70586007)(5660300002)(41300700001)(36860700001)(47076005)(4326008)(8676002)(6862004)(8936002)(33716001)(26005)(40460700003)(2906002)(4744005)(55016003)(40480700001)(336012)(478600001)(426003)(7416002)(86362001)(9686003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Aug 2023 18:26:07.0637 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d283e4ff-a1b7-4fdf-50d4-08dba01896bb X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.233];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000EDD2.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6481 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_BLOCKED,SPF_HELO_PASS,SPF_NONE,URIBL_BLOCKED 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 18, 2023 at 03:20:55PM -0300, Jason Gunthorpe wrote: > On Fri, Aug 18, 2023 at 10:56:45AM -0700, Nicolin Chen wrote: > > > > The highest array index sounds generic, the error code maybe is too > > > > We could do in its and report the error code in its raw form: > > __u32 out_array_index; > > /* number of bits used to report error code in the returned array_index */ > > __u32 out_array_index_error_code_bits; > > Or just: > > __u32 out_array_index; > > __u32 out_error_code; > > > > Do we have to define a list of generic error code? > > out_driver_error_code may be OK Ack. Will implement the array in that way. Thanks! Nic