Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2070154rdb; Mon, 20 Nov 2023 00:32:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IFlgUiWPEQqiyKEOn2GbgwdrhKwzR/JeDpIE/duVDO2y2rtW/KcK2ExgsMvKbZopWjwOI5/ X-Received: by 2002:a05:6a20:429f:b0:187:a99c:b1b9 with SMTP id o31-20020a056a20429f00b00187a99cb1b9mr5250694pzj.48.1700469155663; Mon, 20 Nov 2023 00:32:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700469155; cv=pass; d=google.com; s=arc-20160816; b=dgn3ZiX61a/qf6j+A4Vt7ZzbdVNL9uYA8/BudPe7h7VG4OVr03hcCKdmAPfnY/x1bd i5vXcLjJEr1vgY31nBWZXHvMNnrjN71ANkYdqMuaCK/sG7ABUEgIJDfiEa4SVgQUfc0S 3bLOWLLbt97S2+VlJOttgpaoGm5w1JwoAmRbIbhqZrKf2yofypEKWvEegLN7CyXo8FAg Nk7e0zGrCXCYC2Evb1vvBdgD3fRKhdwiiCzuqL8jSSNxfcphrIWd35W2yW5rv7OJ0abq Kjp5HGfjaE6KABBG5ONwGljdUly9X2HpoAoBsDxp1T0bsczCNAW7Xowc0/mvvPBLB2sG QuFA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=rfWjqgG/RWud1IYd4kszlowYT9VF0OBsVoEEKdCNuvQ=; fh=l1dP6ssMhBZoArSVVdHnqBGNZzBtrgn+ywH3tS9eyBM=; b=XYXrtdLWUXCVDof9graTEqFUG614j0uutMzdVEEW551bwUx/kBBeGgNv6jTjaxlFUV Qa5luyXpvIDfiuhcUOSScB4w4KSBOv3dD6zz4fnIdrXpBtbIPnMqWROYtCf7u8vLDBbZ ot7I2odxVOjxW/iSMLQr/QsBtU1i+6wt8cNKEcICM67Tn61BCIymCrLkB8qKx2joT2ZK V/lX1qLUEeGwbsH25+FufCq0H7P2HWS4UsqY4oBVU6MvYUNxsc48SEcsaLoxfL17YJPG Q0dSFJ1VtIUAKzc6QJUCYczB/uNlVwCJLUO67XLuHma2LeBaysQ99qkZAntXkXuCz7dr eHLg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=B8dy7KXp; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id n9-20020aa79849000000b006cb5f680e22si4140403pfq.389.2023.11.20.00.32.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 00:32:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=B8dy7KXp; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 42AC1809B766; Mon, 20 Nov 2023 00:32:32 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232187AbjKTIc0 (ORCPT + 99 others); Mon, 20 Nov 2023 03:32:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231948AbjKTIcX (ORCPT ); Mon, 20 Nov 2023 03:32:23 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD4929E; Mon, 20 Nov 2023 00:32:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700469139; x=1732005139; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=Hu4NeYU0usREUCRf4bfLN5+gDD5KOJ5ZYh0k6h4YJsg=; b=B8dy7KXpVeCIyDwHph1lDjmThFw3P7nRkYD0hAR3uNIkpuCph5ctPBI8 zrReJeZZtFwufkSusjg16nZyhlzrTQ25iWPbrQSu1N2Ia3xySZJRrXQ35 N2Gz0uYv24urQb8+xHExgmYvqWw9VMeGqskjNaVXCKu9MzjWS2wNbnQ6r KBeKg1eJW2fwLq3xph+F7Kuc5qG0JyZHw5kku5JrajoSxBBfsVTli68gx YIK58gAeB/LydJxyrJflCflT4aniej9SAIH7oO8WUuRCa/HsEClN0BKbi 2YBG+70TUNhIDjmN/kPbKuC2vPZqWcy6rU2sdqvqphP1aC8LgxF8nn3FW A==; X-IronPort-AV: E=McAfee;i="6600,9927,10899"; a="391362555" X-IronPort-AV: E=Sophos;i="6.04,213,1695711600"; d="scan'208";a="391362555" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Nov 2023 00:32:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,213,1695711600"; d="scan'208";a="7632350" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmviesa002.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 20 Nov 2023 00:32:18 -0800 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Mon, 20 Nov 2023 00:32:18 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34 via Frontend Transport; Mon, 20 Nov 2023 00:32:17 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.40) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.34; Mon, 20 Nov 2023 00:32:17 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bm1a9Sgqc9n1pFCONuU8NlrhI4etFfO+1GEcWnlBv7YqVM9wUfbTnHhPSHi18UUciTtS6wvDrNpwvDZwDKQ5RKfjWCJoAjLJa8OKunhjRSMOJCEB1hfMhbMVv/JgICUunPfnF6IzKelcafyt4CI1qy6I7iReQ0YBGgRNIjkiag7BH9pfOoNDe330tS1IXtRFYXT/NtL6OwHHhd5nV/ABwG6RwEsGEltV/Hte8DdmM98L6aUx+H1uGLb1xrqNyEqJG+/kGMiWWn0HYiKqCq+V8plI0yXmWZrm1Y7S1Q0bRQNaQs8E61G3U7mMWeVmUysvBnSF6jvVeUN7VmKrLcyVbg== 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=rfWjqgG/RWud1IYd4kszlowYT9VF0OBsVoEEKdCNuvQ=; b=asnsqYTHsnk4sJIFh9YUQXDavZtj3IDqT6+FEg3r74INOqfJV5/5htYOlm9wEDfeRMTHDlyf4P6KQtK+jLWd+1AAsTSRYJ+g1x0kjXx1213y/zj6BVV9xscpe0lsTW4Z1MwiJq9CXLa8upSjgTPOBNKnwDKJ+hr0/ae1KIWcfF440qvNu16/vAJWkQChRs4DkvoNyVlSlh49QFlXlBcbYmTGlufJf2u3JEHUICOpvIz6HD210XgP4TYXE7YI3dyfss8xxTd/rmiImjbGoPl9zcjFggBhCIdy0SJBo5op/uBK2lI0ziAeaY5wpcOyXuCYDg+xWE5E5We65e6WGGYBEA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from BN9PR11MB5276.namprd11.prod.outlook.com (2603:10b6:408:135::18) by PH7PR11MB8549.namprd11.prod.outlook.com (2603:10b6:510:308::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.26; Mon, 20 Nov 2023 08:32:16 +0000 Received: from BN9PR11MB5276.namprd11.prod.outlook.com ([fe80::e7a4:a757:2f2e:f96a]) by BN9PR11MB5276.namprd11.prod.outlook.com ([fe80::e7a4:a757:2f2e:f96a%3]) with mapi id 15.20.7002.027; Mon, 20 Nov 2023 08:32:16 +0000 From: "Tian, Kevin" To: "Liu, Yi L" , "joro@8bytes.org" , "alex.williamson@redhat.com" , "jgg@nvidia.com" , "robin.murphy@arm.com" , "baolu.lu@linux.intel.com" CC: "cohuck@redhat.com" , "eric.auger@redhat.com" , "nicolinc@nvidia.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" , "joao.m.martins@oracle.com" , "Zeng, Xin" , "Zhao, Yan Y" Subject: RE: [PATCH v7 3/3] iommu/vt-d: Add iotlb flush for nested domain Thread-Topic: [PATCH v7 3/3] iommu/vt-d: Add iotlb flush for nested domain Thread-Index: AQHaGViRtZDYl73wL0G8DOHg0rG+PrCC5SoQ Date: Mon, 20 Nov 2023 08:32:15 +0000 Message-ID: References: <20231117131816.24359-1-yi.l.liu@intel.com> <20231117131816.24359-4-yi.l.liu@intel.com> In-Reply-To: <20231117131816.24359-4-yi.l.liu@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BN9PR11MB5276:EE_|PH7PR11MB8549:EE_ x-ms-office365-filtering-correlation-id: 985ed2ee-de31-408f-b619-08dbe9a33392 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ge96ESleZi/73rNZYfcXlUAcDK4wuMr9VSYREkfh+sqq173nMrUTOKi8cE3RMsCyeCCsF8mP3eAjNHUT3Pz7p8E8rPn5JJABQAmaP9CdOBLetSW7yJPLweLwEap28nADG8yf8tb1G9o+sycDSJktnVD1WEw5L+BO8ZRMpuvCiyVtTCwF9VMF2pcyP1geKBxDf4o1aNlByMnJt+xaJAJ77jlQK+HWvIxN4tJqEEvY4NdjivhXf10KGM7v0q8GQf14nTTopSdXeMgCktVvnO4MBClZQuWZbVaFp5g/Myr+/Jce6+8siA/GPg0wk1hUphnmZC3LO9urUx48qoRe6G8K/ZjKGUlLt2Xf29sL2nkBgXl+gKmHK1a4Esh9Z47sCkbX2Wo/BDI7a/qzbjvhs845VvshFby+uMP8rcUBYMMktvx36gs4vQGmZZAn3VQoPNLQOdezSWk9RqMM9UrHtYnH2NizRtUn+9Zudw1mWYH1e3Omo6YlBlh7i5XzXkydq4cFlmQnztkgoe0iSfyHo8EDuYLxzwmh4k59v73TqzfhfZt2soezChU8OkcO6V0is/0+rv5jiw1HN4O/IJAizY+AJCo/EqY1i8DnBmJZpgRbhQOMvJKkrGVh6n95lFQnn2nn x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN9PR11MB5276.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(39860400002)(346002)(136003)(376002)(366004)(230922051799003)(64100799003)(1800799012)(451199024)(186009)(478600001)(122000001)(7696005)(6506007)(33656002)(38100700002)(71200400001)(26005)(55016003)(9686003)(82960400001)(66556008)(66446008)(76116006)(316002)(66476007)(66946007)(64756008)(54906003)(110136005)(558084003)(86362001)(5660300002)(7416002)(2906002)(38070700009)(41300700001)(8676002)(8936002)(4326008)(52536014);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?U+0pvMT4THnhKlaID4UEkB8sYX6F2YN64wGtN7WPZjb2AnNvwzuP8Zw5isDP?= =?us-ascii?Q?X+x85N6Dvtrtp/dyccR2iiGw+3LYMxJtgwTQv+NE9S3u3fx8z4aOPL94wCbD?= =?us-ascii?Q?GobsuH+ABp4ErEljT1KlH+ai/9G3u4RMV/ZKQWE9v6yA/5S/8E5EMLEYir8K?= =?us-ascii?Q?RRzD781Cw3ccoQjtciEASM0e4jVVgpTMuvKsJIKKMCfcDzYH1D1sjoLYQPW6?= =?us-ascii?Q?Hcomzd08Mfi90TFU4qSkzUqnL63yPXKPuflIRhW7rr6v40o4L9wmdJ88ood8?=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XMoIK/VUtorQ+mTSDO9cz3tlFYVN?= =?us-ascii?Q?5Qtyat+5Jkh/8QbiMtBhYxRFsVJnR7DG35LkaKn78nsMxkdZeJJP1lRLesZE?= =?us-ascii?Q?5q+6OX0b6u0l9hjXHX2I7GaKcGzoSPmuY3zI1wMds+eeVw7GkHg8/VAB9E2T?= =?us-ascii?Q?sKHPxMrlubfYcqcHea5SxalPrA3hBKoi/TgDF0G969zY9f1wk1b/wGe++VUt?= =?us-ascii?Q?saXdAf1imH/QwA/jn10jePy1rHu7spwHm/mvpDupsLwc5SX4oUMX8ddjPN9w?= =?us-ascii?Q?n/JBnqVLRpHrq3769h/xt65FVd7v3mvkzLjLTy13U+LlVsxfrgSEk0jzpAv4?= =?us-ascii?Q?S2YYT3q14AG2vUDaApl6ibMMMt9ZPWcAtWDw/roO6CGP8jRN9QXJqn4npCUP?= =?us-ascii?Q?ZQkhdCtIq5+lgxD/GzNVGaOdES640W6aKT+A6xU9?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN9PR11MB5276.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 985ed2ee-de31-408f-b619-08dbe9a33392 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Nov 2023 08:32:15.6838 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: MfdrQzeZkafGMuy+D+hHjoufAUFk/oWR/WcasqYLYyN65h9yA7m8scdly9T1TxcMdxwY3Sxliid7g5pcMT2NGQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB8549 X-OriginatorOrg: intel.com 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 groat.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 (groat.vger.email [0.0.0.0]); Mon, 20 Nov 2023 00:32:32 -0800 (PST) > From: Liu, Yi L > Sent: Friday, November 17, 2023 9:18 PM > + > + if (inv_info.__reserved || (inv_info.flags & > ~IOMMU_VTD_INV_FLAGS_LEAF) || > + !IS_ALIGNED(inv_info.addr, VTD_PAGE_SIZE)) { > + ret =3D -EINVAL; > + break; > + } -EOPNOTSUPP for the first two checks.