From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web11.7798.1630070065020309003 for ; Fri, 27 Aug 2021 06:14:25 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=m2bWEhAD; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: jiewen.yao@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10088"; a="303530243" X-IronPort-AV: E=Sophos;i="5.84,356,1620716400"; d="scan'208";a="303530243" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Aug 2021 06:14:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,356,1620716400"; d="scan'208";a="538092172" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga002.fm.intel.com with ESMTP; 27 Aug 2021 06:14:23 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) 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.2242.10; Fri, 27 Aug 2021 06:14:23 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Fri, 27 Aug 2021 06:14:23 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.45) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Fri, 27 Aug 2021 06:14:23 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Hivst8KvAVrS3D9u5IQoxmQLS4h4gVElxFNh4fO4+/zPQ8pSgpLgHcfHVIyjs22bB5IbPKr/jfRoIxZLzsCAh81aoUJZBwB3GPMmMxRwLwiiCIgoY7tdwRfqk+uKqJ9KvWoJiPCtKwU3UCJD0o0u4W8HWRh+1kTNmX1QCG2/tmExhMzE4SVOYhcoSvDo3IF8vMKxu3sYj4g9fO3zHVT6ptg2FrU4luQVXpSSX5g9mkrWdtCgjhzPAtFvH3HJoCbtZPAaFbFtVZ5edV5YlulDQD6FaKbz2OT3g0D3lC9eFY9mpkP1IESAKvyvSF0rxgDsFcdSKwULKIDXh3fX3Y+UKQ== 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-SenderADCheck; bh=Fa8kTiMN/UlC5bVqOytpOu6XqhTguhBLbnJL9Wa3wqw=; b=JssOPNhlyrL4y0fYVyK45dP1MTDweR2tXO/MbXG6cS3Gm+1gRt8pAi7ld3SR9nC6ci+aLFnwVBnXcOPmfWWB9DrXXPNpT4o+tOZAZ2AL7LpnwAv7X39Ss67nDyF4brN6OTm8jeV71wEkXcV7WPMsKU+Ka6ZY9Xou4qBAmPh27rRpyYgkrf85SWLfiEhPc9XkVhcZR+Z+o14OuQqhvwP2qPAhtOSnSECdjJBSb6wF1PdXrBsSdwmXJOFR2ZcE/ly8akskBWb4C343333YArAWBfhxeInlKwqb+eV/+lcFG04ngx2oyjX9RlVwHi6hKSwoo6c8f8NAeVrHCPdT+L9TVA== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Fa8kTiMN/UlC5bVqOytpOu6XqhTguhBLbnJL9Wa3wqw=; b=m2bWEhADr0kXDALVZUpOWS3hxPCVpXqFpTsl/VI3Aq4t4FwvD2CE8QbV+ZznjG3CmiX1+tZtUd6q5HG7edGOWYhcjeS7SWEeWdrt3+Fd2HUmw4hSV8ImTIs88tbFuGvaObF41hx1CoQ69JFGZxPfQyJ63HzXzu7dYUfuUGCiIvw= Received: from PH0PR11MB4885.namprd11.prod.outlook.com (2603:10b6:510:35::14) by PH0PR11MB5095.namprd11.prod.outlook.com (2603:10b6:510:3b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.20; Fri, 27 Aug 2021 13:14:21 +0000 Received: from PH0PR11MB4885.namprd11.prod.outlook.com ([fe80::e97b:e466:268f:fb79]) by PH0PR11MB4885.namprd11.prod.outlook.com ([fe80::e97b:e466:268f:fb79%6]) with mapi id 15.20.4436.024; Fri, 27 Aug 2021 13:14:21 +0000 From: "Yao, Jiewen" To: Brijesh Singh , "devel@edk2.groups.io" CC: James Bottomley , "Xu, Min M" , Tom Lendacky , "Justen, Jordan L" , Ard Biesheuvel , Erdem Aktas , Michael Roth Subject: Re: [PATCH v3 0/3] reuse the SevEsWork area Thread-Topic: [PATCH v3 0/3] reuse the SevEsWork area Thread-Index: AQHXk25ofQHFZD4IIk+WgV9BSaX1oquHY/LQ Date: Fri, 27 Aug 2021 13:14:21 +0000 Message-ID: References: <20210817134651.20444-1-brijesh.singh@amd.com> In-Reply-To: <20210817134651.20444-1-brijesh.singh@amd.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: amd.com; dkim=none (message not signed) header.d=none;amd.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9e5d8764-6eb1-4b54-42ff-08d9695c9583 x-ms-traffictypediagnostic: PH0PR11MB5095: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: rKA/A2Ku3z3QQnZespIT3YwsBlc5LR3Hc9HBJBTykAjOaWdCv9hXexMP5UkaPEHylRMRkOGqrKMdNX6gbn3lbrwgE/SniQWni8DLVYHE8N3BJFG0x+YHQAez6F/Us29GcBm/3GKb+QU1/rUGFd8xILUdSIIptpwd7j8lys1TYQkYBw5ML8Zy3fRqO853Rel5fSQMrbqc7yzBw4EiORu4N/Ve00xVWAobL1A0J+GWJrL4K+aKBxQ0V2ZvusS0T1Rln/F07LNQ6XRkRc4IfXzmHEERiiA4zT2E4t56MGUeQwfB2OzexszHXpXZoR+msIsUFzpMcgNg0x+BQMKaprhyIK1eMAecgwnoN0tNNhpUNlLm23o5g4EX1xJOROLwK7SXh+o5seRWK1RdYFXUEAFzf7Zzb9Vr4i3ufK05etyieHxZFo2AbXzYindVc+Fsg2lut+ae9xRIAsnmB4MfbizIDiRo6dhN7sdGdipNILx54VkIEPhF9fE1PHLPsOie33x/Y0PZo62s+g5Degp4l2jxwiQE7Pgy595qV/3Bbd3ZUBRjiA6NIUExVtxzkhIsnGcgC8fK6SkvE6s9Yj2w3TkhGQyOBD4CZmjdQ5gvFi6zqcnsYyS6QTg6bNvvEvdrxXG+eAbS8ptMzQvJH7M0ttq07wqo5g6wyoBRgAWGPLTuFMWYnhMAoC1PMi4C7NgYeWJi8duMM0kQaf0h03z3gY1qHqaxab/RQrtziiQ/71et0u1lGxKIlZJGZDqzx5gLNiB3wXJNXs5z/RIpPu/kEj8GZZUdkCJrJNkz/DJcAsolgyQ= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR11MB4885.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(6029001)(4636009)(376002)(346002)(366004)(136003)(396003)(39860400002)(38100700002)(478600001)(76116006)(66476007)(8676002)(53546011)(66446008)(71200400001)(7696005)(2906002)(122000001)(83380400001)(66946007)(66556008)(186003)(6506007)(316002)(966005)(8936002)(5660300002)(26005)(110136005)(4326008)(19627235002)(9686003)(55016002)(54906003)(52536014)(33656002)(64756008)(38070700005)(86362001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?IalUabQKI9LXA4yo4uLzj+VD1jl1ShnQFuvwk4Ks/njHB1nSh29y9bKl/0Qx?= =?us-ascii?Q?Xm1NJgbkkH3KiBeKxiVbbCHiFEdyB85s5M726c1kfLJyDHQstCmGbjY7uU09?= =?us-ascii?Q?C22FTvGLebNEUbTwLvJ20SX5MAnvvMQfCsGAS/yC92v86tR+i0xgAi2zDB+w?= =?us-ascii?Q?VV67gGcBswAt8OVg/a1pMeRWI+X2FeyPsnsHHo1ZblhE5RoJarv7mknPib4t?= =?us-ascii?Q?xNoiqOxf5qUHgkwgupuOeohixyk4PVYs4hRbBxIvUaemvHvw4S4Oe/bwoX7s?= =?us-ascii?Q?X5qwMaw0jaFr421jCFp4YhCNss7EPJtEXejhSQBHQp92FQwlHLMTfAVmxtO5?= =?us-ascii?Q?HRrQkU7K3FjAX4G/GWQ+TSf8PaRbc49SJgOx/qSDUgoz7raaxyHsIaTCvhvA?= =?us-ascii?Q?KgQm71C4kxyAZD0naLUPeq1JFuo4sYcduGYH2G5fkK8gxxioUBLoe2RsJocY?= =?us-ascii?Q?Pm8uzshZG6MXBdl6dZhCb4bja4eoN+dsHMbrRilY/87f78wGDAdLoo9QCr/z?= =?us-ascii?Q?Oz4gRRAKwXo2qdRIoDHbBNEQvxdGjLDg/tKnMni82Lvuae0IeD7C1i/r0xcw?= =?us-ascii?Q?D/jBmbQjwNST5ZjBQbBqoTmj6eGGF1q5KpblSfHaBqYc6D0KuVPaEsNWHzE7?= =?us-ascii?Q?NphwhyI/0s52uNc/+f7u51ORzxZSy/tuwObHRYmP4nh/W1M6nlgyik6b1WAp?= =?us-ascii?Q?sPKoJVoj11D0mIDEvHjFM3TDdkb2Mx7KfKQkDeeDLwbiUd0hUb50mBOAo+nm?= =?us-ascii?Q?hXW4MV/IvHmrl8+1Qt6U27D+elAA5sh8H/j946kIgLrRaMPwHydXjrnVqp1e?= =?us-ascii?Q?V/wl+g9HFPcU8EH9L0iE1Eh7mDfK8vPW0ez6z7DlwAvuYv58z4LNFhJViiIW?= =?us-ascii?Q?Qezw3gh3QXSLgPDfJmXeuEWzKIrlVr8fVMypBeDw95nOvVarmdOqahPiBA/V?= =?us-ascii?Q?HomQdcNYTwMHy+nBG82MEfSPm3LRRj2mZUkIw6C13GPPxbK3NKZLK4uzxCKy?= =?us-ascii?Q?RNYtbQe+g4rZ8M0BOtbmag60Z/q1CMiZqXPeY+MORoR+h2fIg3ZYs7JVmG3m?= =?us-ascii?Q?op/7stuGwdQA2NtET11V2GHsI7lERR0BcrKrae2RfRj7itUdo1egHa9+fvlg?= =?us-ascii?Q?ML/srm5fN+n4uJ5TL6x6bXuyKmt1fIHGBrJnxvCT2Td+uulBMXw83HL1RcYZ?= =?us-ascii?Q?PUOqc7NsWqHYyFVbhV66wqmt9USB6ARQrLp18K+X61+zerhqP0wTq7/IrveM?= =?us-ascii?Q?QdT2bkV+YSCDqeQjB4XFOQuzjkdTKE3IPi6bgtcGg4K5a7EkxxNgHeZSh9RU?= =?us-ascii?Q?psIXMM3++QTxlc8S0gmQE1wI?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB4885.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9e5d8764-6eb1-4b54-42ff-08d9695c9583 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Aug 2021 13:14:21.4736 (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: o5WtKpq/0xGpz6hFEo+pwkXCCzh1/X9j3c9acn0vaZuzRMKHaTTcTKLN8CpInu7wKvez8n4tBEosOPGrb0CNaQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5095 Return-Path: jiewen.yao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Patch is pushed - 80e67af9afcac3b860384cdb1f4613f7240e1630.. b9af5037b270c4= 767b275fd5d23b942c422e742f > -----Original Message----- > From: Brijesh Singh > Sent: Tuesday, August 17, 2021 9:47 PM > To: devel@edk2.groups.io > Cc: James Bottomley ; Xu, Min M ; > Yao, Jiewen ; Tom Lendacky > ; Justen, Jordan L ; > Ard Biesheuvel ; Erdem Aktas > ; Michael Roth ; Brijesh > Singh > Subject: [PATCH v3 0/3] reuse the SevEsWork area >=20 > Based on the discussion on the mailing list, we agreed that instead > of wasting extra page in the MEMFD, we can reuse the SevEsWorkArea > buffer for the TDX. To avoid any confusion, lets introduce a OvmfWorkArea > that will contains 32 bytes of header followed by the actual workarea. >=20 > While at it, move the code to clear the GHCB page from PageTable build > to AmdSev.asm. >=20 > I have used the existing TDX BZ for it because the request came > during the TDX patch review. if anyone have concern please let me know > and I will happily create a new BZ. >=20 > Full tree is at: https://github.com/AMDESE/ovmf/tree/sev-new-work-area >=20 > Brijesh Singh (3): > OvmfPkg: introduce a common work area > OvmfPkg/ResetVector: update SEV support to use new work area format > OvmfPkg/ResetVector: move the GHCB page setup in AmdSev.asm >=20 > Cc: James Bottomley > Cc: Min Xu > Cc: Jiewen Yao > Cc: Tom Lendacky > Cc: Jordan Justen > Cc: Ard Biesheuvel > Cc: Erdem Aktas >=20 > Changes since v2: > - address Tom's feedback >=20 > Changes since v1: > - address Jiewen's feedback. >=20 > Brijesh Singh (3): > OvmfPkg: introduce a common work area > OvmfPkg/ResetVector: update SEV support to use new work area format > OvmfPkg/ResetVector: move the GHCB page setup in AmdSev.asm >=20 > OvmfPkg/OvmfPkg.dec | 12 +++ > OvmfPkg/OvmfPkgX64.fdf | 9 +- > OvmfPkg/PlatformPei/PlatformPei.inf | 4 +- > OvmfPkg/ResetVector/ResetVector.inf | 1 + > OvmfPkg/Sec/SecMain.inf | 2 + > OvmfPkg/Include/Library/MemEncryptSevLib.h | 21 +--- > OvmfPkg/Include/WorkArea.h | 67 +++++++++++++ > OvmfPkg/PlatformPei/MemDetect.c | 8 +- > OvmfPkg/Sec/SecMain.c | 36 ++++++- > OvmfPkg/OvmfPkgDefines.fdf.inc | 6 ++ > OvmfPkg/ResetVector/Ia32/AmdSev.asm | 109 +++++++++++++++++---- > OvmfPkg/ResetVector/Ia32/PageTables64.asm | 57 +++-------- > OvmfPkg/ResetVector/ResetVector.nasmb | 1 + > 13 files changed, 238 insertions(+), 95 deletions(-) > create mode 100644 OvmfPkg/Include/WorkArea.h >=20 > -- > 2.17.1