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.web10.7658.1674014242401433112 for ; Tue, 17 Jan 2023 19:57:22 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=iwVAF4AB; 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=1674014242; x=1705550242; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=6EKBZQtoUJ0JFfMTs41RrJReV2f3FytUfBcEOFtJunU=; b=iwVAF4ABaXgmtsWwxYWAUDoWT+FNgFrR48tGgv/DuqZlmPYJDJlS1KKP JSHtve5/ul0En6DSrdmLoq9993Nmt0H6w8K3u9U1lw4zVOH8ZOG/ihBPL u3zmIC1rl5z3FLCHgR6xHfn67wI2FfubaXImAlZTb2pKmsU3athklHuq+ rZ4LML1ldl23PiMplxmW7Ua12b7lZhi3hJOz2AD+QRceawVunp8ncI7yc 2ksf7kYePkaDH34C2FTOJGmNoJUWNq/kHiPcsS8GjX0WjYu6iD+xA33VY brz+AMRI7QgG1NlQuaUyZZUVr9JyL7EC8T4jNrB+NSayKVVtytQB7aLHc Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10593"; a="304575702" X-IronPort-AV: E=Sophos;i="5.97,224,1669104000"; d="scan'208";a="304575702" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jan 2023 19:57:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10593"; a="728019364" X-IronPort-AV: E=Sophos;i="5.97,224,1669104000"; d="scan'208";a="728019364" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga004.fm.intel.com with ESMTP; 17 Jan 2023 19:57:21 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) 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.16; Tue, 17 Jan 2023 19:57:21 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Tue, 17 Jan 2023 19:57:21 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Tue, 17 Jan 2023 19:57:21 -0800 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.169) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Tue, 17 Jan 2023 19:57:20 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RvVwJdAFKgy7P5NgYAp05RE3wMb58npOVvmI/O+Z2LMptaHf/AhYNylSLH616C2t7EWrzaRg3j8ua0miZlca0Y0QcPMkLv4ETyhYTkgluRZJI0qmVHoz4EXVByhWViioyXQsBsPD2RSEHbuXBKkuhLmlSJ1HPncz1lV9hNtU9B24J0gQdo8FzCKIJOg0cL2pi55i4lczoL3Zie563vGeEVE8OLm3xC3+Mc9JMThUpgP3KszVinR1yzvdx2ECFhQBY5CXy0/P64Ou7BCiDJac5ktWg1L3ujfeFOyQ376GYlLdIB7sifJC/kKZYCtziUk1Q8BtvMyWE42oqtwq7nS6FA== 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=koRe2C6PnsJvallGSYVQJFg6fBvnjhXpqeZWYfus0wY=; b=MmYS+ws+miGdtTHmh3AqnVMfJ4qXW9m7A+NxnZV4gfVImgnMoV1bLdJWwP6Fa33q+vv1dkIq+EDbNzQrxTRurJzR0uNYE78V2+nS+Sm3nkaQ2i5Z9cOwBAYv5PMkdB2TIHRQNsvvyEE+5PQaADafOKouv3PjwRM+3PsvYz/pP1KoIQXdXGbCahhOSzJcgQg99TbzG//uqAX8MJmq+lGjUYnTyHS0uvSsKke2HaIijiq8oL5RYnJJhetL1X04UFaH58FlIWsoqTuHCjQIZmDUKkt9Shw9o2AVceK6W+TRutpnWZsVDtnmmjmFwBN1SIIyucAyhUebe//b3tX0lV1IIw== 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 PH0PR11MB5660.namprd11.prod.outlook.com (2603:10b6:510:d5::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.23; Wed, 18 Jan 2023 03:57:12 +0000 Received: from MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::5f56:1bdc:2eae:c041]) by MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::5f56:1bdc:2eae:c041%7]) with mapi id 15.20.6002.013; Wed, 18 Jan 2023 03:57:12 +0000 From: "Yao, Jiewen" To: Michael Roth , "devel@edk2.groups.io" CC: Tom Lendacky , "Ni, Ray" , "Ard Biesheuvel" , Gerd Hoffmann , "Aktas, Erdem" , James Bottomley , "Xu, Min M" Subject: Re: [PATCH 0/4] Fixes for SEV-SNP CC blob and CPUID table handling Thread-Topic: [PATCH 0/4] Fixes for SEV-SNP CC blob and CPUID table handling Thread-Index: AQHZFWO7xJWFb8KJAEmYyf0gfPtDda6jtpWg Date: Wed, 18 Jan 2023 03:57:12 +0000 Message-ID: References: <20221221160651.182143-1-michael.roth@amd.com> <20221221174130.xbi6q3irva6kcitx@amd.com> In-Reply-To: <20221221174130.xbi6q3irva6kcitx@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_|PH0PR11MB5660:EE_ x-ms-office365-filtering-correlation-id: c5cc762f-9cb5-4e33-7772-08daf9081466 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: okFiFfEhaEgl44NHVupBfUXeMZGv8ksF0HDhS3F/r4T42fLrWX7Lk+WBagneEqV7Ck/6J2E+TYqdmD6Vb8u6VTvbdVCW5cBURNBgmnrhOx7aH7dHcoWD6ARTlYpjfEokoTFkyoqpEdJKgYMtQ563N5Mpc+zB31G20jzUmbUJzTTaju9oEuI4XtLspAQIYYR/vybfJswAM0D305e/OG/RUqpBFNu3wwqZVCpKx0vvFu+XZI2vKZPe+IrB2quyRPKutDVepf5Ci3U+BvKK62FZczborZNLnzIMvYe49Po8CGo6SRTb4WdgldikOrZMpkv3ZO6GxPaPTryleDfe5StNSr3TiKWFgQhTW+EnjK+rvBtmP+WcGLf41txjvIN7qF8IqwEMdJOofw/SnRuflRzvpQRJaHbnzM4czce2ZVlntA/DNFVfoA5sbuZZVhzvy3rrp27NcrC8JKT2Fy2sEjwHnLlHxOJxJkhrun9jZBIj4DSJ8v7uI3SYE7b91hSfuzCFHVdfbc+aUlu5FBJq78AqycE2DADkPXmmEMntby859KDeKGteaHKDKtZGIS2zRv/udwtffTbFgmZwG4FTgMGnH0FxrgjRe7Hx4yjonkny+mOhj7JMxmtyAdB8JMzJMruE1eOFuu74EVsnq8sAMymQmSKtqdjD4DwcgUGQwUyIAOST96ALRtp/zX8kfWyR61+7b3MSreA+NAaEK58aX/tPYQ== 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:(13230022)(39860400002)(346002)(136003)(376002)(366004)(396003)(451199015)(38070700005)(4326008)(2906002)(66556008)(52536014)(8676002)(66946007)(66476007)(66446008)(64756008)(8936002)(5660300002)(55016003)(76116006)(38100700002)(82960400001)(83380400001)(33656002)(122000001)(7696005)(54906003)(71200400001)(107886003)(110136005)(478600001)(316002)(86362001)(41300700001)(53546011)(9686003)(6506007)(26005)(186003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?sLIv1rtw0aSoa4J8EHW7haVTvGxh35bCWbSfz483QiMpu1VB8or/Xu2zrdGv?= =?us-ascii?Q?py58qMTb4ArzcHxU1i6qckmjFJNBgmjI5fUiBJaP6K9PDhQgtsWmFCnsDUq3?= =?us-ascii?Q?CHGpcLjrGPT3FAlBuu2nBzRWQ+bxg5uo9Ob94MAZrzrN5HdGpU9A0K5HjmkU?= =?us-ascii?Q?4s7EDhVqvNJBsGm8HOppzKpehOwRWTzz5COwaQVF2cz8ztfq540jdo4zQrh5?= =?us-ascii?Q?Qob0B92FB970OAYCnmUnNKEdosxwcsfnv11unj8eT4LcS1PpcIzOxIWOHj5w?= =?us-ascii?Q?yTtf+vocRTT/U7/Ex3nSS6eNEKkiUUltyWMYtuQx8/27UK93551XCwn46w2r?= =?us-ascii?Q?FKxEX1f2ja0lS62SiTKy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?i00Rl9Ir4oMBp0bQtuMs3b14VcqkInNRQW8q2wXBstsemfEO1lTV5X6/wDOR?= =?us-ascii?Q?jWhFpImPU6TxKY1IufOt50Fih2DOXTT6wRlHPjSj8OTGObWGIZVnz3rcaeQY?= =?us-ascii?Q?V2ZfRhfDO/8frN1QxF+WXXzEr9Y/Egc5RNPPhm8z6y4w8OdjkKSWpqT9ZQ9p?= =?us-ascii?Q?kdZYx5WlkxIFEhQJ8NE4m2dRwamW6XJ10hx8knJrE0/6UKBsP40oZCIM0z93?= =?us-ascii?Q?rmRGMv8ty587x4+LNhTrQPS2KzhLyEMiEA5q52i9y3bw1Le8DuKWtszRiFR3?= =?us-ascii?Q?h6DyX1Ejr5kDqADu7/0J6DETmEQ4MOkdnREfU7qR?= 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: c5cc762f-9cb5-4e33-7772-08daf9081466 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jan 2023 03:57:12.3348 (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: qdYj+Olv4NQAYZnyFBQqtV5yxbqAa3c5jJnWNLF+0wbfMn/4EHNO0JzpWCee3cai1BHeVKK2JPlR7NUYiOf15Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5660 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 Hi Roth I got weird merge conflict when I try to apply the patches from email. Would you please resubmit the patch based on latest code base? Once I see the new version, I will try to merge them again. Thank you Yao, Jiewen > -----Original Message----- > From: Michael Roth > Sent: Thursday, December 22, 2022 1:42 AM > To: devel@edk2.groups.io > Cc: Tom Lendacky ; Ni, Ray > ; Ard Biesheuvel ; Yao, > Jiewen ; Gerd Hoffmann ; > Aktas, Erdem ; James Bottomley > ; Xu, Min M > Subject: Re: [PATCH 0/4] Fixes for SEV-SNP CC blob and CPUID table handli= ng >=20 > On Wed, Dec 21, 2022 at 10:06:47AM -0600, Michael Roth wrote: > > Here are a number of fixes related to OVMF handling of the SEV-SNP > > Confidential Computing blob and CPUID table. > > > > 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. > > > > 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. > > > > ---------------------------------------------------------------- > > 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-SN= P >=20 > Adding some Cc's from Maintainers.txt that I should have included > originally: >=20 > Ard Biesheuvel > Jiewen Yao > Gerd Hoffmann > Erdem Aktas > James Bottomley > Min Xu >=20 > Thanks, >=20 > Mike >=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(-) > > > >