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.web09.6730.1652791645758294848 for ; Tue, 17 May 2022 05:47:26 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=gjciR/P3; 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=1652791645; x=1684327645; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=rOlk0cnnp/CfBH48B8xCdJuIIGsyYNl2HfOvMzWUzuw=; b=gjciR/P3uxSJfameswrB8kyaGCGYaSKSpmQJKg5ve35siXZ1Gg4ogeax LA0EvhPtFwSZm+7EnsKEnT+Kb6a1MdGkDUuZtLUC90lQfxNhYWFLSN/UH jD1jqG6W6xFfLN6lbCSPHjAKVZvs4jV310urmeFsXeqelA/aXpAWmV1S5 cM1Z2Wh9ZRQc9KqVZ/CrS7qVA9kaQwUO+6RmLW8bwQJkRPxjmDgH28B9C +Ki7yATIAz7UmKPm0Ocn36c30oojc4y58B32a0JpOK607iD2MY+UjPPmb wIqu1cY9lyQmxLD+JhmyD8BhqMVOuojPkNvkonQP/0mrJlJ8BpN539WBQ A==; X-IronPort-AV: E=McAfee;i="6400,9594,10349"; a="251065840" X-IronPort-AV: E=Sophos;i="5.91,232,1647327600"; d="scan'208";a="251065840" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2022 05:47:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,232,1647327600"; d="scan'208";a="626464285" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by fmsmga008.fm.intel.com with ESMTP; 17 May 2022 05:47:24 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Tue, 17 May 2022 05:47:24 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Tue, 17 May 2022 05:47:24 -0700 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.44) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Tue, 17 May 2022 05:47:24 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Daa63xyvZj4q1G+GajQAc1ynSCjNZb87/s7Zz8JOrv3J7b78n8BGTHM3IVDts+YBoD8fD70oHYwihIUGJs/BnuCQSmKvNC8QIMRGLnphDC5LzNxuYDRorVuS2fSPFF4ylbsf0VtpifHQkLBmW1Zl3qRc5niBGL5yvjuBhrUWM0HGZJm+wjGVNghLAFM0+D6RIKAEv3NauBzAUAaeDVNtKejGYowTz66uRC58pOtYMvZcpWsKCiGQ7RTPb3+lmS59jHxetqGySnxdaUM95morGHUrtIursXqXWc9DB/+wjNsxBmrxvI21Yz7WHpsK0CEHS/kvrqN/jEamjLltNtDzFQ== 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=8ir8rCKhCW0DD5KgWTlnEvC3rnEeAqNYIkASTX+/caE=; b=QZ7+Qyyl9r8pRG9voQZASz2g8UHcfydw0oOIzypLCF65E74+iOgKhZrl0Hl3Ik1tX/G2Alcrrl6EI7F59Wa4bYHauV0tPS4KUoqhspgDTceybgK3EeFrrJLm6/TBgzR6KZzWp7LxnTvpdGzqLcJTdJvreAdz2YsFo6c+7wwlgE3aBRjE+cvMxshkx34+L7yco08D9Nd6NrP/4xNLNJHuz7Ekcu5plM9vDs1VAAvnJ3PBjFPT1wc/1E0NVhgcpi9YoSWFa1OB6pnmy7wHmur0AI6D5bcAzNv3SdIsRSDPdr5lIgC4zvH+1f0oXsHy8IWrTpG0QG6GoxqqVPat+X6hIw== 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 DM6PR11MB4012.namprd11.prod.outlook.com (2603:10b6:5:6::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.13; Tue, 17 May 2022 12:47:21 +0000 Received: from MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::d55d:28c1:bfab:3dd]) by MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::d55d:28c1:bfab:3dd%5]) with mapi id 15.20.5250.018; Tue, 17 May 2022 12:47:21 +0000 From: "Yao, Jiewen" To: "Xu, Min M" , "devel@edk2.groups.io" CC: dann frazier , "Aktas, Erdem" , James Bottomley , Tom Lendacky Subject: Re: [PATCH] OvmfPkg/OvmfPkgX64: Use different CcProbeLib when SMM is on or off Thread-Topic: [PATCH] OvmfPkg/OvmfPkgX64: Use different CcProbeLib when SMM is on or off Thread-Index: AQHYaevTqYZI48T+1k28C7BWLhdzXq0jBHZQ Date: Tue, 17 May 2022 12:47:21 +0000 Message-ID: References: <20220517124314.1021-1-min.m.xu@intel.com> In-Reply-To: <20220517124314.1021-1-min.m.xu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.401.20 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e8fe088c-e03b-4424-a1fc-08da38036247 x-ms-traffictypediagnostic: DM6PR11MB4012:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: WGj9kdKpYxVXNK1jqr5WmpMQ8KGK0W4wHBglBIczAQGFor5lZYlJ158HQWp0Qt3NHLSPDXqwvS7i30eeL2tPf2rafhHlPmoQ4MuZWtS4+6phLlh0tHb61NHsLfCP5UEU+5WtnfaKvIFuAR8q9LWyuTh57rKqWcxNYer0FVeGgHVCv05KWg9d8vXZlGCNG9zmgSaWUz+5zc5wLwtwyO5Bp0b42s/hbmOuz9xQw8S7HCMN6giaIwOtGqnRqkGP416VRyuewnFbIjbFkSO71nJG0bfk++YcRRBR5gtzAPzBxMrTzreH46cIsVhf99p5Sqs9Xwzv2sBK541axSIDyQH1DlaopdaFkPVBCpViW5Pz9Gldf4si+lMqCc5GzLr9qwFban7Zc9Fdlz0lUmqcINRNaTYO1flvDdilU9YuxBLOK2HnIR6hLVFpxKHuriowkHwRJn4iyIZvRfUFGRSw/fpOBaLvVNFCF7mrxha8UBRq7AhqiQJdtEfm5xiWAY3+kvibYEsIOAu5zKpdQ4iAaWigzx1BBoB8p4ZElhNnP4MiNLiY8QlTKskqm8LjLs+9b/V8lE8Ayil/g7lNpgxLXVUyAfGg+c8CN6UqA78Jelggsuv/tYje8mYxUB47z3rr020T+cODaFxR6iTaakTN9oak8J+xuZ34ipYizqCTi6XzOuzUr1Vdxrd9cO+jO3T9I8aW5lc2OfNQHAo9uYYydJQK7A== 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:(13230001)(6029001)(366004)(55016003)(7696005)(186003)(2906002)(316002)(19627235002)(38070700005)(38100700002)(122000001)(54906003)(110136005)(82960400001)(8936002)(52536014)(71200400001)(86362001)(26005)(9686003)(4326008)(8676002)(76116006)(83380400001)(66446008)(66476007)(66556008)(66946007)(64756008)(6506007)(53546011)(508600001)(33656002)(5660300002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?cYQr2cGL8MWNRdrCd78mGKUvwHxqznrHJzFf1JACbjRcXsXUef89yznAyGUR?= =?us-ascii?Q?hsKPy44JNrnwgNDZKecGJmglypuqnbXuOEakfxbOuDPFu/jL+u/yt+sFYXIY?= =?us-ascii?Q?AMhmsTLUiLQpw7tupORQQ0pAHUmz/2j85Wi4OgvbyQSfuUHLuSTXkZ2mDJYv?= =?us-ascii?Q?SEilweNrCpy7B6C+b36/LBFrwYHBEbS8TyRKs6KKFdBpNmC06kEijEsULLGr?= =?us-ascii?Q?569W6L1m8GGfCSgu/Kfccam0leUgHqmKLN0zt9vCd3tiZ7Gq2g0toY4By84V?= =?us-ascii?Q?0Bx0fUPX4yAWfneM1ojWZMvNgAGVeUATDUwIHcp316eK1+IhOZML6qjFUwvm?= =?us-ascii?Q?5ZIEnkkSSBrUAa4pL+rbdo76jVf7SaKSHJZL79VC2Fvq2XW4Fje78QXYCmD0?= =?us-ascii?Q?QqiCKsr8pohE8aWRcoX1NE70iO6h6NQqxKM6MJfzC5N0La7XPTy+oF1qqtHx?= =?us-ascii?Q?T28zx3ygX/MD2X1/u3Y2ba3WSH3OApleSWTK4Sde5i30sWsH5g7u33BaQCst?= =?us-ascii?Q?WgVY+1r6qhHVVvFMk5NaLNdaa0BRmmr08p7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8HjjR7KrL/SOD86ZTd8MObvhZHSKGVkC9U1amwTxhZbji7oiK1Mb?= =?us-ascii?Q?5nahdp1a+iVb098iVoJXmRDbsXI1adxTkvun9u9ClpjlhWd5IAXEvWScTIO8?= =?us-ascii?Q?khPTXqNE6PEJernwSJxBQ1DhqvucvnhyV/kqy5cu+hcDcYmr8nuLJuwZeMU+?= =?us-ascii?Q?f+SSSvoqL8flSoREa3d0V9JI3WfcDhurMTJ5b8Q9GHkKakh2Nxhd1hqH34Uh?= =?us-ascii?Q?ZR+RFR0bX23VI+nXTJUAi51c+m0g2MYltJmdn9uMi+lqcM/xxapg/1/l+u4q?= =?us-ascii?Q?GUI/+YmYMA=3D=3D?= 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: e8fe088c-e03b-4424-a1fc-08da38036247 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 May 2022 12:47:21.0953 (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: keEDdhg4i6ZnzrO8bQNEx+Fkuy8yXvNGTCIxB1+OT8DkbJT7hu6nFME6ZT3/ett9nzXID1JI2RBeF82nnjag+A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4012 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 Question: Does this patch need catch release 202205 release? > -----Original Message----- > From: Xu, Min M > Sent: Tuesday, May 17, 2022 8:43 PM > To: devel@edk2.groups.io > Cc: Xu, Min M ; dann frazier > ; Aktas, Erdem ; > James Bottomley ; Yao, Jiewen ; > Tom Lendacky > Subject: [PATCH] OvmfPkg/OvmfPkgX64: Use different CcProbeLib when SMM is > on or off >=20 > CcProbeLib is designed to check the vm guest type. The OvmfPkg/CcProbeLib > reads the OvmfWorkArea (0x80B000) to get the vm guest type which is > written by each guest (SEV or TDX guest). But in SMM drivers the access > to OvmfWorkArea is illegal. PiSmmCpuDxeSmm.inf is an example. It uses > IoLib which in OvmfPkgX64 BaseIoLibIntrinsicSev.inf is included. The > IoLib probes if the working guest is td guest by calling CcProbe(). >=20 > So CcProbeLibNull will be included when SMM_REQUIRE is set. Currently > only TDVF uses CcProbe to check the guest type, and TDVF doesn't > support SMM, so this fix has no side-effect. >=20 > Cc: dann frazier > Cc: Erdem Aktas > Cc: James Bottomley > Cc: Jiewen Yao > Cc: Tom Lendacky > Signed-off-by: Min Xu > --- > OvmfPkg/OvmfPkgX64.dsc | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >=20 > diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc > index 71526bba31..db7f4def7a 100644 > --- a/OvmfPkg/OvmfPkgX64.dsc > +++ b/OvmfPkg/OvmfPkgX64.dsc > @@ -171,7 +171,6 @@ > PciCapLib|OvmfPkg/Library/BasePciCapLib/BasePciCapLib.inf >=20 > PciCapPciSegmentLib|OvmfPkg/Library/BasePciCapPciSegmentLib/BasePciCapP > ciSegmentLib.inf > PciCapPciIoLib|OvmfPkg/Library/UefiPciCapPciIoLib/UefiPciCapPciIoLib.i= nf > - CcProbeLib|OvmfPkg/Library/CcProbeLib/CcProbeLib.inf > IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicSev.inf >=20 > OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/ > OemHookStatusCodeLibNull.inf > SerialPortLib|PcAtChipsetPkg/Library/SerialIoLib/SerialIoLib.inf > @@ -198,6 +197,9 @@ >=20 > !if $(SMM_REQUIRE) =3D=3D FALSE > LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxBaseLib.inf > + CcProbeLib|OvmfPkg/Library/CcProbeLib/CcProbeLib.inf > +!else > + CcProbeLib|MdePkg/Library/CcProbeLibNull/CcProbeLibNull.inf > !endif >=20 > CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/Customize > dDisplayLib.inf >=20 > FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLi > b.inf > -- > 2.29.2.windows.2