From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id B383C7803CE for ; Mon, 30 Oct 2023 02:26:09 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Wy57wasTnjJq2qLpkoiLl8aegEODSP56VcBA9Tvs9tU=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1698632768; v=1; b=lYYwc484TF5LWMELt6CcWc6ghtEL6GHdMyJC+C0mhQzo8lN5Qy5tc2dVGQqJsDvcn58Ieo4n bDlxd6nrQyWWsbCk0ii5mVJzit1WV0DYVnPHtdf7KVGMuq+AADsDItDjC3SRA4mCRsmFGsXjFMw XtIINjduBYYeku6z9kAp9wrE= X-Received: by 127.0.0.2 with SMTP id HALrYY7687511xZz4k3f5Eno; Sun, 29 Oct 2023 19:26:08 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web10.140973.1698632767405678981 for ; Sun, 29 Oct 2023 19:26:07 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10878"; a="367345053" X-IronPort-AV: E=Sophos;i="6.03,262,1694761200"; d="scan'208";a="367345053" X-Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2023 19:26:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10878"; a="1091484064" X-IronPort-AV: E=Sophos;i="6.03,262,1694761200"; d="scan'208";a="1091484064" X-Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga005.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 29 Oct 2023 19:26:06 -0700 X-Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) 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; Sun, 29 Oct 2023 19:26:06 -0700 X-Received: from orsedg603.ED.cps.intel.com (10.7.248.4) 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 via Frontend Transport; Sun, 29 Oct 2023 19:26:06 -0700 X-Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.100) 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; Sun, 29 Oct 2023 19:26:05 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fGdC96JXHE9ONK9+EJyb2Mb2AqEnMUMVJ/U0zIGC6wJ0nG93GhPS5A9cdn6diQg/tadeTW++yrkIDaZW2o0zkCcK3Oi26eA8tyMbphk1C4KEch5A5LmeArfWqV3XqNvF0eisCyr5bk+cD1YUt2jUOmCcak03DACS8pUJc5e5fGmYBaAO5KxshMUia9ucZ9r6pOjkdhGfYGPKf9Aao34GTBfbY2i46TaBk1wYVmzZB9oA0AKazA+cBr39doJ18ffBmNTMqQmagL+7ozXTKA+2RL3m7i71AHoj269GksLPi5Am+wPRtm5xkJt02xrskt16hHqV1CO3oVbNqP82ng2UWw== 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=s4+GMbxpNEJ5HS8vnMatIqlGRaQJccXtD5JbB3hBbTc=; b=mq7/zWK1wENyJVGzKXFIeJbouj5Sn+d99iRMLfjW6sBGWQsZ8H0Hx065R3UAyMds4QbIHkKyz+nlkgZTnkTMoYJsl/jxbALfwN+YLmVW2c5J1Eg3uaw4F/JU16R3KAvT3LrVguxpNQAUq9Fd5f1ZuCS2T8Rc6HzQXqm9IPWcCl16UJv7txGTVoWyHMTqNUY5qZDqdnclJekjhBBhfQxgkM7nNvYXZ/JqU96d9W+Cu11TDaPua+BaxHC7PSPPAIJUYJIHwi7XviA8kNoZGwYPHO7agceXx0J/KseAn07mK0F5WvJDWlY6thQXKN8Qu6+ebnex3RwQBSM7WPGQEFt1HA== 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 X-Received: from SN6PR11MB2783.namprd11.prod.outlook.com (2603:10b6:805:5a::30) by BL1PR11MB5414.namprd11.prod.outlook.com (2603:10b6:208:31e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.27; Mon, 30 Oct 2023 02:26:02 +0000 X-Received: from SN6PR11MB2783.namprd11.prod.outlook.com ([fe80::aeeb:7dd0:422c:8a73]) by SN6PR11MB2783.namprd11.prod.outlook.com ([fe80::aeeb:7dd0:422c:8a73%6]) with mapi id 15.20.6907.032; Mon, 30 Oct 2023 02:26:02 +0000 From: "sunceping" To: Gerd Hoffmann CC: "devel@edk2.groups.io" , "Aktas, Erdem" , James Bottomley , "Yao, Jiewen" , "Xu, Min M" , Tom Lendacky , Michael Roth Subject: Re: [edk2-devel] [PATCH V1 2/2] OvmfPkg/BaseMemEncryptTdxLib: Handle retry result of MapGPA Thread-Topic: [PATCH V1 2/2] OvmfPkg/BaseMemEncryptTdxLib: Handle retry result of MapGPA Thread-Index: AQHaCHCtntFUZEkjV0SfJo63wIKy2LBdeeEAgAQlLXA= Date: Mon, 30 Oct 2023 02:26:02 +0000 Message-ID: References: <20231027005738.371-1-cepingx.sun@intel.com> <20231027005738.371-3-cepingx.sun@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SN6PR11MB2783:EE_|BL1PR11MB5414:EE_ x-ms-office365-filtering-correlation-id: 364eeb32-7e4e-4cdd-ecbe-08dbd8ef8fb7 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: nNSwDFV3hdPw+u9dydJCUugJGqAd9zv3sSIV3wG6feXXuu7uOY9kD2Ds/fTWG40FIMVF2tIDZoguDjPCepKPXirYjLYFBwx46i8ERQ/17NKgbTHot5dk0wqWmf32J1zJ9DR8MLPRlHiNALKE1g0f74lBofgXSUjcEh068eOcqwH9GE7Zh1Eec9f5g0lz7QQ4UKvcCrH3pPKQeFDvD88r1tFJ66Hk1yVhwjbpRfqCtwXkupGpo2b6+6zyRQnHTpnlYxa4/KnmmkijDRXUPDLUXwupeklL0q/TgN9Wh1RrWDdR9S1JpgTq4mt+XpCB+hiE2ZpkIUlyoGI6R+PUUtEn8nkWlyWwX1mtmfP+skThhpudqfLCEr1uxHbD91WlDQcqLYSxLy2XUf2GtgE05LFV+74GrwNacDy5JemNDT5EGie0deCfUh/SVl/s4NH2dujR+e8UwlI/BdX3wZmKwUS/UyNKsQBJgEkf8vJLFy9a9Th+wXXFOU+BVsSPXFD7f0q8vEG8hxFa1bvetfw6aWIgQLANUFYvmVnAgCLVlosFl3NOlSo639hCGuV6DDIIJOcksivpsqLuf1QPymwD+dTKR2TjZ22NdHRqDSFApcvj6DfdT70/6xTIfF8UzI+7Suz4vxzUJyBzNbt89ws46QYS+A== x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?dJyAbk+/7IXqM6FlWiczgKJ6NrDB7HDacV+CbVXraFBqFiwonjqeWsBrllfS?= =?us-ascii?Q?hP7V34VBnIE3KZyOHCUdTVQGUKj8TzVyqw89pU9uq8jRVkaaM5zOM4vxMMNr?= =?us-ascii?Q?JDbgkdmP+dDpH4q9bgyvYiYd3cpt1H8B9h3MlXILDaKBTm8TVBTfgjxuMjjJ?= =?us-ascii?Q?1RU6FY22OGFg8tmQ9WkLJZkHnN1tHPosI6nO76bBCwViO6W5RW+gxaIIfnKX?= =?us-ascii?Q?MUBKtZlMsBqfnl03bskR3NQlr8XAn8wcrQBMwJ+BkFdLpdOJvoQu+SWBu2U2?= =?us-ascii?Q?P1Y0pvHoct9G9UjHmzVIq4WY/5qLuy2kmkkjQRdwuL1+xejtA9mIH46qV9gs?= =?us-ascii?Q?BD71jHPebEV0jy8GMc9uaImVSYw6WG0a1ciXtskJM98j+BCWwPP0SGU+Ytnr?= =?us-ascii?Q?6Q2V3AxdRhKWt7Dg42oSoXNtEmCdYBMhne/w4y71B7Zv2chg7v2rwA/MSYPY?= =?us-ascii?Q?6PvJmqGL6cFvNA07AwZN3xtVyGW1DtBp+XSXNyo+q8Z8J5EIPDf3da/ZLgPe?= =?us-ascii?Q?sq4Z+boCkkVcY6h3qCcRJH68rtmGFe+lMaMhY6CXevgGjzk3s+LMcCfFKP9F?= =?us-ascii?Q?o7bmpOFonCswRYmWEjgbw1X2i9xdsz4bT6pTce+7fC4w+rp7/faaz91ZYpPb?= =?us-ascii?Q?0KLGg9G524RAu4pJD57TivehGplWq/mT5sZzjWM6aAsDsqU+owfmFbf8R25Y?= =?us-ascii?Q?LMu4/xvwnGnzw1/3IG6UvkzYp+ZrxqjFoWcZfA5OQ66kSioBWZ6vdPFJhl+x?= =?us-ascii?Q?cMgbQFknORD/MN336SC5F21D2gQ2gX0hE7czV/24Treex2SI9FtEUPNNTcDJ?= =?us-ascii?Q?cY8pkkCSu57EXD5F8kMLa3PuNrBKPj01Hdoo2PAfxpwVr1JW7d4+dCuxCdg9?= =?us-ascii?Q?sAr055P1pASh1lUqvv/ujGzYc3yE6QtU7C5EPHZB6szGLdp9kLx9gusQV2cn?= =?us-ascii?Q?QyFOMByGDIehAsofaWDMj41WT8h4x+oEZRY+gKbMcXaXtHkXO6B53MqJJPs8?= =?us-ascii?Q?ItjyoJPfhuhLiIMz4TnyKdLpuzMf4cqKpbnWG8w2c1AcoVgqis2gu+r/ZF20?= =?us-ascii?Q?INfVaDfeCj1EGL1auv7YnBz1M6zJr4RE2+2DSldyHyKHI7KA5VkVlOxcY/Lk?= =?us-ascii?Q?hViWTnSriHFVuCfTG5e5Pkxw6S3sfkF22SuHvFkZRchqL0DcEzrjfuhZ4bjg?= =?us-ascii?Q?w7fj1puwlQ/fKckEJvwLbTek4y47Dp43XDfzx2NpRP+7mAH8TNDoZvqego0J?= =?us-ascii?Q?Je8ljmgodxWDY1THoRfR2fssziwd5cEMHpiDQpt4IXYDQw/5wKZTpxqzUtU+?= =?us-ascii?Q?lXXDmcpm1DhK1pY9m7OAAn8WYmlknxlsRW/8/Xvv316sVufFicDvpUplU7/8?= =?us-ascii?Q?nTAd9RSEBLxJO997zT6lwLak6LHSGTCt7I//T1qFQRa51U2MsGRaM+dSf9//?= =?us-ascii?Q?gcXfHf3R6NDK4zcAnDgHph8ipKqAzOq11ePE6OVCvdGxGsJKYLzNIp6tOyg9?= =?us-ascii?Q?zNumMYxTRrSkjWcC9P6Y2mzc1dTFqFAGnYjLrl+P8WyUkCrSkqE2PTkbqJtL?= =?us-ascii?Q?tkf46VCnQJZcD5x/e5oEDBWUO//QvKJUGHJe6vK1?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2783.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 364eeb32-7e4e-4cdd-ecbe-08dbd8ef8fb7 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Oct 2023 02:26:02.2807 (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: t6P0lEQ3yWUXVp+ySUAyxiESwKUtoZ4Tfe+A9bcpNtmCKzAfucwSzVyvAIN7f7LXv35Ql5BlBwaM5vmHrrUBRQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR11MB5414 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,cepingx.sun@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: aHT4TlnpeSJtU7320oBd0HlJx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=lYYwc484; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On Friday, October 27, 2023 7:05 PM, Gerd Hoffmann wrote: > > + while (RetryCount < MAX_RETRIES_PER_PAGE) { > > + TdStatus =3D TdVmCallMapGPA (PhysicalAddress, Length, > &MapGpaRetryaddr); > > + if (TdStatus !=3D TDVMCALL_STATUS_RETRY) { > > + break; > > + } > > + > > + DEBUG ((DEBUG_VERBOSE, "%a: TdVmcall(MAPGPA) Retry > > + PhysicalAddress is %llx, MapGpaRetryaddr is %llx\n", __func__, > > + PhysicalAddress, MapGpaRetryaddr)); > > + > > + EndAddress =3D PhysicalAddress + Length; >=20 > The end address doesn't change, you can move that out of the loop. It would be updated in next version. >=20 > > + if ((MapGpaRetryaddr < PhysicalAddress) || (MapGpaRetryaddr > > EndAddress)) { > > + DEBUG ((DEBUG_ERROR, "%a: TdVmcall(MAPGPA) failed Retry > PhysicalAddress is %llx, MapGpaRetryaddr is %llx\n", __func__, > PhysicalAddress, MapGpaRetryaddr)); > > + break; > > + } >=20 > The error message is misleading. The actual problem is that the > 'PhysicalAddress <=3D MapGpaRetryaddr <=3D EndAddress' sanity check faile= d. The error message would be updated in next version. >=20 Thanks=20 Ceping -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#110283): https://edk2.groups.io/g/devel/message/110283 Mute This Topic: https://groups.io/mt/102212640/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-