From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web11.9360.1682518953682953850 for ; Wed, 26 Apr 2023 07:22:33 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=ZFnMN2Tj; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: jiewen.yao@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1682518953; x=1714054953; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=LarQd1nOQECYyPomBk2M8Lp1yMWiiMW3ZQpYuO5sBt8=; b=ZFnMN2Tj51BmGKwvsTsXDdN22ZUs3+n/wIZ9Crt6tyXjJSXJ9eyWSTDV +vkP7fis1nQJh+xdRCqLYrcVQzrpNXw365xJcTzPIGhZn1//WLdFSrFJC WvzBwCbYAfGnIFe++KFMdfKYjpFWMJXWXBr9ro4QQMPOCmQWhs7t3K5z/ XM4ci0v4+abwbCqViFlgjJ8yo95hRKiFaslIh4ilkPNHgdAcE7rErxzGC mPEU4lECgxBP1MC99bnnjfEwC0PcHjEjX64P/tsQR2RFV2K2Zgvounnov gJ0pbAFlZsHDgsGFZ1dYouJCnjK6XcbWiY1I5twVmSPuX9Z9PCdEx1gWv Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10691"; a="326722628" X-IronPort-AV: E=Sophos;i="5.99,228,1677571200"; d="scan'208";a="326722628" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Apr 2023 07:22:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10691"; a="1023642755" X-IronPort-AV: E=Sophos;i="5.99,228,1677571200"; d="scan'208";a="1023642755" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga005.fm.intel.com with ESMTP; 26 Apr 2023 07:22:32 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Wed, 26 Apr 2023 07:22:32 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Wed, 26 Apr 2023 07:22:32 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.172) 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.2507.23; Wed, 26 Apr 2023 07:22:32 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AWun4z8aVnAHM4XTPvDh0omxpEuWzPxa/jzZLl4InyBDTK8+/CRiJW4Xd9zcdKIqqePeZKxY0jHfxH7tqOnVYwkkI//8qrBNGG2CsKhJ9ZstaDlr9AiTR/n9MrMV1eGIFfkEmg1ngetIgieTqV3GkY5NXAuCCm33G3qFM/3uj4wKZfu9SG1EoVXJW2q4o6Nk9kLF1BiaSIMnmAcbAcFqWuqxsZZt5xj4R1KUBA2MJe/OV1lgLRUR9QTqiC8E8Q64JIPGO6VPFkOyIS0sQZy+B5lmRPsL+F9CJRP6xr9hd2JG2YXrpNFc5Tf6IYD7RqEsadrjeRQcvCljelBT92hUQw== 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=7MXgucJacOgpjB5B1QkzHeSMKUM3WtWraIZG9zAyrzk=; b=kwvRvJWZ+gVYkvjQU57ATjg+ZvAqqNhNCkBQLsRoJ2aabp4sJ7VCkE8EcaYSwTswTV3fl2Qdo8c+yaDOXON6rvEGQgbmqyMAXbGCerNRkXJVvaKL3cEfnqMGxfFr+q1/halxA63iEjExjHEruEhU4mpfiyzG1Rl5pPCIjMHONruZxTyMKqUQEnEDgdjVZNkr9CfXNCXobBbdrpzm9fdyu4BoeSUq2+FfsQjpE0xA7mDfocu5JokSLnqci+GeIiDdfAwZEEr8eq03MdfEQ1by7dSlEy10LI2llmf9fhfYop8stsakY72jvAqAYBbmfMdXg3ub1oJH0eKEIP59Ct2/8w== 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 MW4PR11MB5872.namprd11.prod.outlook.com (2603:10b6:303:169::14) by SA2PR11MB5210.namprd11.prod.outlook.com (2603:10b6:806:fa::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.21; Wed, 26 Apr 2023 14:22:29 +0000 Received: from MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::48e9:aeb0:c365:388]) by MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::48e9:aeb0:c365:388%6]) with mapi id 15.20.6319.022; Wed, 26 Apr 2023 14:22:28 +0000 From: "Yao, Jiewen" To: Michael Roth , "devel@edk2.groups.io" CC: Ard Biesheuvel , Tom Lendacky , "Ni, Ray" , Gerd Hoffmann , "Aktas, Erdem" , James Bottomley , "Xu, Min M" Subject: Re: [PATCH v2 0/4] Fixes for SEV-SNP CC blob and CPUID table handling Thread-Topic: [PATCH v2 0/4] Fixes for SEV-SNP CC blob and CPUID table handling Thread-Index: AQHZd7VBNP8UG+am10iKChKh5H+7+689pZ2Q Date: Wed, 26 Apr 2023 14:22:28 +0000 Message-ID: References: <20230425203258.255583-1-michael.roth@amd.com> In-Reply-To: <20230425203258.255583-1-michael.roth@amd.com> Accept-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: MW4PR11MB5872:EE_|SA2PR11MB5210:EE_ x-ms-office365-filtering-correlation-id: b477da54-ed03-4a33-87bf-08db4661aa67 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: lT2kBJ+PUWwlPlioVt1kFxYITNUKd2MviwXDFjaYl3eSN3M19I/owV1F5i/MIyjwVf45N3s7kKebUch55VwCGkuiWzdrjeU5EXR3+89+CRdN36obOXXuIh5K+J3KhLItoegfVEU7tJx/ZSlIy6Ur2l0p003tSYu/YtvO/zR5w9KzZiiN0G4rHgImA7xqbaoyn8zPDcWEKtzhd1eGy1kwT+nBegm4tpMxfGkrSPHyu7Tz8gxdSx1695O4IzRM0SpIF+YBCAO0evonNiPYEsb4zN77Q5FOz/ITU+EoCS8HucsiW6aDIdOvmAxwwslrcB1O8jgJ3sZK7vBGSs9o2UHLS/jnI/Q2YR92xuWzxdMldeghXz3Wz1OcHiD5aNGBzHkcpBOTjkXoFRqzE1KJgSezgbnGtsVbcG3vdCPRf3IWIyqHwnYj1vCiA1XtGqfRypar09rOJqcKeq5AhIhTTcQu4WGlZfpF1tNVfjCbk6TuKjQZsqnDtw4MrYCA2Tf2Sxab/f8Zx2T8Y6U1yuoOitVTbZn7yrQohDRnppVsOeSF7N20DzHaLoA7+uY2is3++nCWWUWlvPrioZWPGDBCFQNKFsWcEDBpnDYG+mM6aMxfdiA= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR11MB5872.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(346002)(366004)(39860400002)(136003)(376002)(396003)(451199021)(54906003)(83380400001)(478600001)(7696005)(71200400001)(55016003)(26005)(6506007)(9686003)(966005)(107886003)(66476007)(66446008)(66556008)(64756008)(41300700001)(4326008)(110136005)(316002)(82960400001)(186003)(53546011)(76116006)(66946007)(5660300002)(8936002)(52536014)(2906002)(38070700005)(122000001)(38100700002)(33656002)(86362001)(8676002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?YFtjySVRE+4R2N4lY6H0K6f57fsvbL0G7dOj9gK4OCMnhK54yigCUvsRSja6?= =?us-ascii?Q?TPlayCe/qwz2IoDc+r0hy2UWUo6cB/6xMwKTjLYNmWH6dUua4qayMvQBLNF2?= =?us-ascii?Q?abnQ3T0hPTAXNiFHigTdKKPrp3gK6upfOCuLotAcdAOBI0Q07Ow72v4T5EO/?= =?us-ascii?Q?+4UPfehwlTvjH1An5//rXq+8+JrkN0ezetvh17tsaCy44BFm0M7qS5ybqm36?= =?us-ascii?Q?RSNaUSfWmAeqE1evoivuJ/0r2OH50OAaYG59YKNsiJUlLVjyhyop6QVdm5HN?= =?us-ascii?Q?biF87kvNO9NERNGmTi8t+1LAH+yYPwAZ9X1QvedPzq8VBguSvdCh/wB44fie?= =?us-ascii?Q?yR3U5G/UTyBCg/i/ehg09Pio97T0iwk8NKNFet9LnxC22EuG4Ca70fAnJjX5?= =?us-ascii?Q?qxoHKo3lO+yJgeUnL9D76PMSZUvQJT0L4FEd+bbyglumRY1GnVFfv5GxrM8+?= =?us-ascii?Q?x3ausc5fvEX49IaI/gIPSvUv9HGYtXfGQlqWnngLEvPW3tgUd7YRs+nMMVj1?= =?us-ascii?Q?DVz4/a2Lt5k84RFp+ZXKxpfbUF87YlsZcBw5ZvcE5EuBOvUssMMNf06W5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T9duV2FAW6qWsFEZtz+0pI4N?= =?us-ascii?Q?pkhtRTHR4SZdk4wMzToEmexEu3I44qKDsAbz5AJDwwhWL5JpDf4frIqlvTQv?= =?us-ascii?Q?7sUSDGCiXKjiNdR5wAGClaJu0x156HkbqFuu5AkR?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5872.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b477da54-ed03-4a33-87bf-08db4661aa67 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Apr 2023 14:22:28.7487 (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: 1E6VJTeaa5lkAcbJLbCKbgAuN/HEg8GGkgwHFNeh0MyHQHZw5VBUXbyxjztaayqimleVtk/+JHRzYfLja0AzCw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB5210 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 Merged https://github.com/tianocore/edk2/pull/4313 > -----Original Message----- > From: Michael Roth > Sent: Wednesday, April 26, 2023 4:33 AM > To: devel@edk2.groups.io > Cc: Ard Biesheuvel ; Tom Lendacky > ; Yao, Jiewen ; Ni, > Ray ; Gerd Hoffmann ; Aktas, > Erdem ; James Bottomley ; > Xu, Min M > Subject: [PATCH v2 0/4] Fixes for SEV-SNP CC blob and CPUID table handlin= g >=20 > (Mainly a resend of v1, but rolled in Gerd's Acked-by's, addressed > new coding style check in the CI, and updated Cc list) >=20 > Here are a number of fixes related to OVMF handling of the SEV-SNP > Confidential Computing blob and CPUID table. >=20 > Patch #1 is a fix for recently-reported issue that can cause > significant problems with some SEV-SNP guest operating systems. > Please consider applying this patch directly if the other > patches in this series are held up for any reason. >=20 > Patches 2-4 are minor changes for things that aren't currently > triggered in practice, but make OVMF's SEV-SNP implementation more > robust for different build/hypervisor environments in the future. > Patch #2 was submitted previously, but refreshed here to apply > cleanly on top of Patch #1, with no other functional changes since > the initial review. >=20 > v2: > - rebased/retested on latest master > - replaced usage of __FUNCTION__ with __func__ to comply with new CI > test cases >=20 > ---------------------------------------------------------------- > Michael Roth (4): > OvmfPkg/AmdSevDxe: Allocate SEV-SNP CC blob as > EfiACPIReclaimMemory > OvmfPkg/AmdSevDxe: Update ConfidentialComputing blob struct > definition > OvmfPkg/CcExitLib: Fix SEV-SNP XSave area size calculation > OvmfPkg/CcExitLib: Use documented XSave area base size for SEV-SNP >=20 > OvmfPkg/AmdSevDxe/AmdSevDxe.c | 64 > ++++++++++++++++++++++++++++++++++++++++++++++++++-------------- > OvmfPkg/Include/Guid/ConfidentialComputingSevSnpBlob.h | 6 ++++-- > OvmfPkg/Library/CcExitLib/CcExitVcHandler.c | 13 +++++-------= - > 3 files changed, 59 insertions(+), 24 deletions(-) >=20