From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web12.840.1652845433892771809 for ; Tue, 17 May 2022 20:43:54 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=ca/Wl+NK; spf=pass (domain: intel.com, ip: 192.55.52.120, 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=1652845433; x=1684381433; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=ODmt2kaa025kJHr8Jan8UUS4pJ2aK7kXT/edkOHTU64=; b=ca/Wl+NKDgRnmGuZzK5lsXNyNFB/7cpRpCnroG+v+Hzio4JISi/pNttr pr9Mwn5e+HOpYuh5xcXQ270S7uaoe8m3k+6kHFK93nnG5zYU+6ZTRDr0s ed+kIt5ebSAPSDQxGSTWiEDtxNWPnOg5cAba0ysuWHPxIDFLFiUzy5kQS 8HwFcizY82AQngB3nfS+R6HUO9gWsniAf4obE/YyRQs9I3LKD1nHJfs67 ShTEgWlFTZG5p6O+6lKFMJLlh5kgkfpTEJF/w93Rhk7Z7F6V/42Qpefgn ClevA8l95Mu6DZvUMJO2kF0NSzzfCJMHtFHAV0Z4ddE0flpajIRJgLRez Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10350"; a="270282792" X-IronPort-AV: E=Sophos;i="5.91,234,1647327600"; d="scan'208";a="270282792" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2022 20:43:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,234,1647327600"; d="scan'208";a="574857964" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga007.fm.intel.com with ESMTP; 17 May 2022 20:43:32 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) 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.2308.27; Tue, 17 May 2022 20:43:32 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx601.amr.corp.intel.com (10.18.126.81) 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 20:43:32 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.174) 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.2308.27; Tue, 17 May 2022 20:43:32 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bicqhXNUBdKJXqk1Pv+nJ/Qzcj2Bw2eqJdGShKaPCtUCOH/A95WnbQpeA0HQNtd9HwKw8AEh9q/fx7v3Wyflg2kAwL8/Zoxy9op/EqToVTn+5Zm9+BfspLtCZJ1mZSgLm0hl4HJ3mTe0nypQkUw0eN6u368Cz5+D8SJRrE51XY0TY3s2ES4vk+NFSs1u3W7Lp1jSWq744aZ1Xg5zqpCphNvoHfDcjA8gRecrEY9UHZr6P2r1coffHAW+4lvdzF+W5Qx5kkRCOuy3rGbezBHZ5CXGMYjUidpnWH89NWklwjqVwBFWw3959qQgrrZQ6CBrAzp8eKEgbDhO1e7Gw2aPKg== 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=2DH6NO97B1IEbCUb868SsuraJLBKHt9VtC25e224ous=; b=UPBL6LyZjlxxXV+3xCFsFshngXgxsdQaq6B3j0Y7+Egj++30xNHCBOAcfywzZcm5Ww3J0sf2/nSO+sW5LhEtpdOmC89dla6kziERYqCfHiev50K5/1xPuroC3Dor0JqduC4buxWT/m5+wUt0nTm0wqIAFF1+mmqctd7+hxzbzIDetGb+CvKO8fGHPd2n02jiXIUXYl0hvso/wkHAK3UdGJwSawduOlqX0t88Zv7JmsrDfkbH7Xb1lavGvXNrrAYfqcljHUM8PJGDmlD0SRseTWNUV7oW7ScX+/7RCTSfcJLHa86hkDG6/KHNl0Gd0AJ971vm9Vh1nXay3efU+73s0A== 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 BYAPR11MB3559.namprd11.prod.outlook.com (2603:10b6:a03:f7::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.14; Wed, 18 May 2022 03:43:28 +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; Wed, 18 May 2022 03:43:28 +0000 From: "Yao, Jiewen" To: "Xu, Min M" , "devel@edk2.groups.io" CC: Andrew Fish , Leif Lindholm , "Kinney, Michael D" , Dann Frazier , "Aktas, Erdem" , "James Bottomley" , Tom Lendacky , "Gao, Liming" Subject: Re: [PATCH V2 1/1] [edk2-stable202205]OvmfPkg/OvmfPkgX64: Use different CcProbeLib when SMM is on or off Thread-Topic: [PATCH V2 1/1] [edk2-stable202205]OvmfPkg/OvmfPkgX64: Use different CcProbeLib when SMM is on or off Thread-Index: AQHYamiefC31CH0Bi0G+LgbRIcgDOq0j/ZfQ Date: Wed, 18 May 2022 03:43:28 +0000 Message-ID: References: <21af12a38d5cf2acc4fe2c7ee39105feecf4e91d.1652844962.git.min.m.xu@intel.com> In-Reply-To: <21af12a38d5cf2acc4fe2c7ee39105feecf4e91d.1652844962.git.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: 5337b8a8-dff0-4064-b350-08da38809210 x-ms-traffictypediagnostic: BYAPR11MB3559: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: hLYBQM9y3ReHOmvd0i9n4Y/NV781jSxyHDO5WS3DrjAMc3L9sXDBDa2l1iren0LcP962ZXkCqimBkTmWyK9elD/ik0hsa4WwWHtF9KAONfqnblDjlob43NoBZO5wzOtmCjdmWUTt5aJYCSyq2oeCvVm8RuP5J5Nndjo7JNjls0ocwWMaeUQ0yFQHKmtHXMPrPWnDivNTCIrOyL6EmPmzcL+Ap1WaunlYT/9dcTUdXabSGuBJ6Y/gMRk9dKRO6Yj7X1Cb1sat0BjlCKFl2CNfhGonSABcg+Jh911AAEz4IdRCbbwXb0ZhAsb6TN+7dNpaDSYhnACei17cbCGWBdLxa+AlF4zxeyiMTkCOUxh8XpUJ/xtZzLKIzJhfh/DJqxS+BDxvvZ42c4Mq1bpcVQiqfkJMxhy16gEchVzRRCr2DeNkhBDehjWTgtDxNmDRhaMMTZcQBhCz7NeSnxQeJP2VmwpCQJ9mfCFQqrlbQqPPevaz0jYjQIddc0uVgUZElQyScsEhJsCfHwWuiFP4m2wZIDALL04k3BC6V3s+gAsLx7ZL1Mru64DH3trEtMjo93orMsJeNUKVa43/cBYEtg8OAWZAT9Jd52Hd1gl7onFcc/6dvR3TaigFC7MuUr7InzxlxIC9vWsr7I5agN2q0xjO9tZY2OtN6jcmmths2KCwYCTyDDrXq2Yu6r+qHCEnP7Ql+Q+TT9MyQtQHHgizUV8DHaA+5R9ftW+4b8OrLxHCZxkZCVypvExCmbj5z9RqOPDCfdHHjo8ZYoF8M0v7TjlwbfjrAM/5jFTAv9j1F1Q7LTc= 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)(19627235002)(316002)(82960400001)(38100700002)(38070700005)(83380400001)(186003)(9686003)(52536014)(7696005)(966005)(33656002)(508600001)(5660300002)(2906002)(86362001)(6506007)(66476007)(110136005)(122000001)(54906003)(55016003)(64756008)(66446008)(8676002)(4326008)(71200400001)(26005)(8936002)(76116006)(66946007)(66556008)(53546011);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?g9b+HhgBFg+qaBWGnn2c+zCxGpJgEc3xXlQiKLcA6E7oUDClt2y8l/VTf0Hl?= =?us-ascii?Q?OA400XozQbyfwKkAkWGW1cy0lH+/ZB4KVMDYGXtQ21lqm7w4OGE4KvgehH2N?= =?us-ascii?Q?9dCe8lhV4GSZVyFuDwZhuAA+IBX70BQNqHYMUFCveyDnrvXIis4NYEnW3mxA?= =?us-ascii?Q?wsaI5SeyvPiH7cqBm1wa1maYXGmlxSdYqPU6Lgygx9zqGEbNZzrLhbTNoZJf?= =?us-ascii?Q?goGB+Ql/PRsXOkLClOYECECCY45jPzK+e26LxsQRxdAmY5+YFuj1qkqsbm48?= =?us-ascii?Q?3YcMczWHlrlBw3rLJbbw0YHrMDKxbk37y/5iKRcrSkrblcBpYzZaIOCzZTbt?= =?us-ascii?Q?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j9A5e7dzbY?= =?us-ascii?Q?DdZc7hG9STgpbjVDnTQYzLN2MNV/gefeGKECHTOcyyz1hbtRa8qriOwD+JaB?= =?us-ascii?Q?dU8I7trX4FmIcSyPqRCRqDU35cWhRtW3iTm1r66aZIxb8EwlgZwl5Z/cJ5Zo?= =?us-ascii?Q?3Yrz9xKt6ZJlMnulbXnRRUz9mXukVX1YAcK7btELjZnhGorx1hVgvaiRzf2M?= =?us-ascii?Q?BsOB7YWVnOCF9YjPK5hjZQ0QXeZxr4UVa2RsrBAx/e5zmRBxOg06euF1ni4O?= =?us-ascii?Q?FgLSRW+EX3ki2TlGoQpC/+6m7swUUFi+H8N94KNTurz+CdudH34ZD/SnJfjy?= =?us-ascii?Q?matqzpgNAGqR6AcA+gAKP/F3FTNDy8ICpwMat/qzNcpNgjw771QiUUpxirZo?= =?us-ascii?Q?AP+chep6xXr1NWrhkb/fUXG2L6wjk6X6gwzxArOBKXJbQmIvAeMHIe/LwDPn?= =?us-ascii?Q?3oi5Ff6U/0xDBi0nvYrkDnuZRBZqTV2zzVbGZ4Pxvk4cFqmGYh/qKhcHCVGa?= =?us-ascii?Q?bpzcBXOjbg=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: 5337b8a8-dff0-4064-b350-08da38809210 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 May 2022 03:43:28.3571 (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: CWepBP8NbZP76BF8lOOr29bK97FaYxuJzz/+Fut6Naz90o39xRDZQsjiMmF3FjJ096ZgvB/3ewkOIt3dHpB9Tg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3559 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 Steward Team I request this be in stable202205. It is a regression issue since stable202= 202. Reviewed-by: Jiewen Yao Thank you Yao Jiewen > -----Original Message----- > From: Xu, Min M > Sent: Wednesday, May 18, 2022 11:37 AM > To: devel@edk2.groups.io > Cc: Xu, Min M ; Andrew Fish ; Leif > Lindholm ; Kinney, Michael D > ; Dann Frazier ; > Aktas, Erdem ; James Bottomley > ; Yao, Jiewen ; Tom Lendacky > ; Gao, Liming ; Yao, > Jiewen > Subject: [PATCH V2 1/1] [edk2-stable202205]OvmfPkg/OvmfPkgX64: Use > different CcProbeLib when SMM is on or off >=20 > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3930 >=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: Andrew Fish > Cc: Leif Lindholm > Cc: Michael D Kinney > Cc: Dann Frazier > Cc: Erdem Aktas > Cc: James Bottomley > Cc: Jiewen Yao > Cc: Tom Lendacky > Cc: Liming Gao > Tested-by: dann frazier > Acked-by: Jiewen Yao > 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 71526bba3183..db7f4def7a24 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