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 33D04AC0D8D for ; Wed, 8 Nov 2023 08:40:36 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=9+/2U9KZy5+AJjFcWGEz1wZKtD+Na7eheWicO97JrMY=; 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=1699432834; v=1; b=BiO4WS6KYUO5TfS03iSaumAZcIv+KOS9Ie0tHa5+oC0I+AP1Yrzoa5VTm/0p/8heX/ilo+p5 3xck7ogiVsasR2Ea5mtEhCGvcmPskOuA+rZFy/j772Kzr/+mtdvhyRcy+/rcNERmXhjyen+QGCM fhLtPgCg6mwF8t4x0w7An28A= X-Received: by 127.0.0.2 with SMTP id RbBhYY7687511xH6kDMA7AFQ; Wed, 08 Nov 2023 00:40:34 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by mx.groups.io with SMTP id smtpd.web11.9404.1699432834253496652 for ; Wed, 08 Nov 2023 00:40:34 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10887"; a="11272056" X-IronPort-AV: E=Sophos;i="6.03,285,1694761200"; d="scan'208";a="11272056" X-Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Nov 2023 00:40:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10887"; a="906703843" X-IronPort-AV: E=Sophos;i="6.03,285,1694761200"; d="scan'208";a="906703843" X-Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga001.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 08 Nov 2023 00:40:33 -0800 X-Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Wed, 8 Nov 2023 00:40:33 -0800 X-Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34 via Frontend Transport; Wed, 8 Nov 2023 00:40:33 -0800 X-Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.168) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.34; Wed, 8 Nov 2023 00:40:32 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ENcS41DAOdMGJZpnj4ZffVSZeZwEV+6aQ4LGlvogpxwpkWoQrn6xJB0sqC+WGoKrjedyWu4t5cYUV2jEVda1k95iUfbxKCy+asHVZP7n8Ux3nujQtQr2DLtQcW36rhe7W1gh2ev25Ou8seRo5KqI46DTMOWA5+5Wy9VD6lF8arjNPUjqw25sZHMmh585+WBdOCKDKHj4C8dQujtbYnHrm10jn4Gn/hiBwbPTGc2GX52CvZxFNL8oMb1enmddrQYX2Wzji+wgwCgNwk1+fPerZkQr3THbldq6t6GYLXz/iUtzl2KQNlGW6NoHkGqUbIgP1nOO1MhWE1rRJp2Z7DoA5A== 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=1WJrnaOcFNB97x1qR/aOwLhHXWDWFzNLYAmaAR0VlGo=; b=lMYDK8YGhF/BZ6z0tOlO4Y2wDLhvIg5HXTyDL8loebGBjrNMu2vtVUK8kgCKFKFXBPqbwqHDsG4eW4qq15HYT8JK+V7s1rh5f9RifWJsxAvDjn4cppakVW/NrpSyxCgR58df53GqgDmCn9XlCQpdCGsRO1YV8MLriKAlBG2BC7zfc+DvcRx87+fmh+cEKWW7MBbwmDDVh/yZEyt0PdsHZcaEwcXS1oNHkpIurSJBI4aeBC+R7SnhITgUOUd8ehgigemXzzhNSFD6nyoOTxaJRXE79jDKZEYi46SUUeIG5z5MAzDMthBhv7FaNO4wYfkbm8olfbLqzOh83NbPNmhPcA== 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 PH0PR11MB5064.namprd11.prod.outlook.com (2603:10b6:510:3b::15) by SA0PR11MB4592.namprd11.prod.outlook.com (2603:10b6:806:98::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Wed, 8 Nov 2023 08:40:31 +0000 X-Received: from PH0PR11MB5064.namprd11.prod.outlook.com ([fe80::bce8:e78d:1f56:2f4b]) by PH0PR11MB5064.namprd11.prod.outlook.com ([fe80::bce8:e78d:1f56:2f4b%6]) with mapi id 15.20.6977.018; Wed, 8 Nov 2023 08:40:31 +0000 From: "Min Xu" To: "Gao, Liming" , "Kinney, Michael D" CC: "Aktas, Erdem" , James Bottomley , Tom Lendacky , Michael Roth , Gerd Hoffmann , "Yao, Jiewen" , "Sun, CepingX" , "devel@edk2.groups.io" , "Xu, Min M" Subject: Re: [edk2-devel] [PATCH V3 1/2] MdePkg/BaseLib: Update TdVmcall to always output the value in R11 Thread-Topic: [PATCH V3 1/2] MdePkg/BaseLib: Update TdVmcall to always output the value in R11 Thread-Index: AQHaEh653mvxN9vM3EijEcwmfgkRp7BwGakg Date: Wed, 8 Nov 2023 08:40:31 +0000 Message-ID: References: <20231108083203.1417-1-cepingx.sun@intel.com> <20231108083203.1417-2-cepingx.sun@intel.com> In-Reply-To: <20231108083203.1417-2-cepingx.sun@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH0PR11MB5064:EE_|SA0PR11MB4592:EE_ x-ms-office365-filtering-correlation-id: a411643f-5676-45a2-3208-08dbe0365ddd 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: wYrpL/ZjJRKeLd24D7J8g869VgY5+9j27qqfMZ65j4BKQc43anPZSyZrCyIiH4TppIOpgiRctGaa4S4OXYBPto7KRpX4HYezyJrje4tYFlX8HQgwI9vJcNgnVpe/u94AJXmFmnAgSHjePaWCooAcUgg870F17mL2JOW5QJR4u8UETTF4RgfA2htbC7+J+VjCGKQqvu5r9zMQaVZfmeyGYvlfLOAP3PZ+eSU9Blbnn7k3mzyYHv3pOmiDHSq1lGMKoi1AB8H9isRW2VA/yDLcH9UsCshdBasrBzvBrgh+hXieVKkgRkHOjT3+V68aVjQIbp4Uf7us7JLIvNLtWHUnM/uFusZzOuDcLjtet+CHNJkAjKshw29l31DBQIPbQuhs4R5YtJZiI5K3VkhMxao7tA5qR5YgC2EPvnwttADEOGdjDm08LH6MqdGhfdUFfAiY0SMEF4whSRzVEN1Tfj6v/8dx0HLjHPuCFA+aedPmPHM33ImBswooBeOmcLH/Xln1q4lrHQMcOpBoDQNCL7lNx61vsjR/7LNmAyeTGcIJrN0twAtK2FMlgi6s4Q5bGpzhqzRT/1onDL/+To0TqjXLNDqwB6zYB4EVtI5oOPvXcab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ascii?Q?vhRQ1bhnXeu4dz/JpDtBq1oVNP+C42j6K3pIJGAA3t2FnbZDrABUTPM/Fg7W?= =?us-ascii?Q?CSjFqQCvQz8MChXdzOY/N48S2WEBRjYyJ8XmaLnzQvQwyMHPGjMoN/e5weGx?= =?us-ascii?Q?+qNMIueOhaLnTNGU2dqVv8bXC8UY32D0v6x8wVgyuxO5Vb7yA2f8QMrwaLlS?= =?us-ascii?Q?Y0L+A58nQBO5TNyw18rOt9uz4o8LP/6sbvkymdcTN2rLKY/1QO/AE6C/UgVc?= =?us-ascii?Q?gMNGBxl4Xq58lTqu5tJW25lMRDXWVuXZAzLUA1D1RRLVj1hMGkKuTHr6KOog?= =?us-ascii?Q?aIxhrAlz4zSnjfpLcswsTy0RlLF+IlEMcknkkjYRiBpUQev/f7tE9piAklry?= =?us-ascii?Q?xVgCN/JvuuuZqsRN886VxsvrOn/z5AibJMkcXNbjAwE+lIXKkzPlREufxg84?= =?us-ascii?Q?xp6W6ftEygeB8l8S7+K37eH08TGSQj4DrYDYqbh1qm/0xuDBZZBiJDSTdioZ?= =?us-ascii?Q?qMRhBh38pHmuKlZoqgfPjPkP83A5J9IirDwLCAeKe0P8K5ScIhSq1Qd15sos?= =?us-ascii?Q?TQ8E7luLFDwG60se2OUaET+cHpO9lEz/Fov2gURAjZoe2V0S0e3Vm22pNT7I?= =?us-ascii?Q?81IvhZHTeKb+BsR9txcJuupvL6r2bzzsGX1Wn/e7QuEQhiwIacNRX0W3xyVO?= =?us-ascii?Q?0WiABX29wjRtZKa8nir2HaYJmp6dohujJ1Vt5KNziOcc3A8V9jdhFPAKpvkM?= =?us-ascii?Q?7l2kmq2fUCAbjZpc3pQfRIWDODTPtw51xRHXnCgjXCeETk0OEuYPQf3vX4GO?= =?us-ascii?Q?af6f4LL6muqAm+h5dBI=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5064.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a411643f-5676-45a2-3208-08dbe0365ddd X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Nov 2023 08:40:31.0681 (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: reDXMtmUtAgr9UG2SCDVSglLEh0y1DhYmVdYe/Q+bP7r/6jsUYyvdFIhMPqxJpU0hURgvJjol3jMF0qAEJneVw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR11MB4592 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,min.m.xu@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: bv30IZ5HRmatpvUeEW44edPZx7686176AA= 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=BiO4WS6K; 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 Hi, Liming & Miachel Can you help to review this patch (because it is changed in MdePkg)? Thanks! Min > -----Original Message----- > From: Sun, CepingX > Sent: Wednesday, November 8, 2023 4:32 PM > To: devel@edk2.groups.io > Cc: Sun, CepingX ; Gao, Liming > ; Kinney, Michael D > ; Aktas, Erdem ; > James Bottomley ; Xu, Min M ; > Tom Lendacky ; Michael Roth > ; Gerd Hoffmann ; Yao, > Jiewen > Subject: [PATCH V3 1/2] MdePkg/BaseLib: Update TdVmcall to always output > the value in R11 >=20 > From: Ceping Sun >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4572 >=20 > According to section 3.2 of the [GHCI] spec, if the return status of MapG= PA is > "TDG.VP.VMCALL_RETRY", TD must retry this operation for the pages in the > region starting at the GPA specified in R11. >=20 > Currently, TDVF has not handled the retry results and always clears the R= 11 > on unsuccessful return status. For this, the TdVmcall needs to output the > value of R11 on unsuccessful return status to handle the retry results of > MapGPA. >=20 > Reference: > [GHCI]: TDX Guest-Host-Communication Interface v1.0 > https://cdrdv2.intel.com/v1/dl/getContent/726790 >=20 > Cc: Liming Gao > Cc: Michael D Kinney > Cc: Erdem Aktas > Cc: James Bottomley > Cc: Min Xu > Cc: Tom Lendacky > Cc: Michael Roth > Acked-by: Gerd Hoffmann > Reviewed-by: Jiewen Yao > Signed-off-by: Ceping Sun > --- > MdePkg/Library/BaseLib/X64/TdVmcall.nasm | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) >=20 > diff --git a/MdePkg/Library/BaseLib/X64/TdVmcall.nasm > b/MdePkg/Library/BaseLib/X64/TdVmcall.nasm > index 5ecc10b17193..8dd9bfcbfa14 100644 > --- a/MdePkg/Library/BaseLib/X64/TdVmcall.nasm > +++ b/MdePkg/Library/BaseLib/X64/TdVmcall.nasm > @@ -133,9 +133,7 @@ ASM_PFX(TdVmCall): > test r9, r9 > jz .no_return_data >=20 > - ; On success, propagate TDVMCALL output value to output param > - test rax, rax > - jnz .no_return_data > + ; Propagate TDVMCALL output value to output param > mov [r9], r11 > .no_return_data: > tdcall_regs_postamble > -- > 2.34.1 -=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 (#110906): https://edk2.groups.io/g/devel/message/110906 Mute This Topic: https://groups.io/mt/102460272/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-