From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web10.8846.1652801867738375815 for ; Tue, 17 May 2022 08:37:48 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=irN/axtC; spf=pass (domain: intel.com, ip: 192.55.52.151, 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=1652801867; x=1684337867; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=T5mDxxe+NGAsmDnn0LDysvwUmyVoOm2YuflJgoVSbLA=; b=irN/axtCJ/v9G3MT+iDp3shdB89MSGtTS0YGp71jMxSKZHySqDbWzeon sbEO+t9JZ0UJCvlyy5x3Qyf4MEMg1HOCvAKJF/ZRXAuVjngawCOBaWi8I EQ3maV0uuyn5gDBvzUQxmtVeZklloAam7fhrINObonkPxC1SyGI+mWVYF kUBHvm8YYWeer7kElvZ6ckk2rGXiMa9BFLnAmMB7iCXcXtvdIdVn7zrw+ iwUZEzPgGdUOwAmqcq074fysGimTun2eEFsMJrwV9H5PB3/s0NKF4Vse2 /kYXHB4sEedMC+Lr4ROX14OBmtlugizOt+Cv/C2QFN6pXuBSYwDOJZ1eO A==; X-IronPort-AV: E=McAfee;i="6400,9594,10350"; a="251734143" X-IronPort-AV: E=Sophos;i="5.91,233,1647327600"; d="scan'208";a="251734143" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2022 08:37:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,233,1647327600"; d="scan'208";a="626532335" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga008.fm.intel.com with ESMTP; 17 May 2022 08:37:46 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) 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 08:37:46 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx611.amr.corp.intel.com (10.18.126.91) 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 08:37:46 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx602.amr.corp.intel.com (10.18.126.82) 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 08:37:46 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.103) 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 08:37:45 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PNk+E292aByo0kQPXXsC1jC1rNuPVwdbFX7NS5dbOXw3rzGW0VO7FuNvDF2kMcRdVBg/Ogi7JJhD7GwfPC4zEVZCTDP1+i7SmBKYeZKJcQtDq43Uh2MpvlY66zwLxyOzekKA2leRsFH19ZmnckPksiKhMfoJQM4cDg0siulby5T4gyb/t2cFhG2cytIG2ZckGHSXUwNRSSAIFQZ4+4m4jm/72qmBrI81b+r/u9CcM0Ad3H0pgPqCi4gVFtuZwjeX9hBg4nlzx/JNkty7KoMSr58zEl6bsI9m6v/mf5cX0ALr27VCtkItsuMYQ9FS0d34i76ZUUIhL/hpBzJSLweAnQ== 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=Tjp5aoPLt7294xKOJIuEb2d9U4jHEqzwDVgAV9xB0Nk=; b=ENJDIUtHDLXl9nOSxHIsyLrC4tLsVZI/uqCnKOm6Y0EVMlphsG9384ybgjCHAUA5344L8pTC1EXINnvr+XCZpU95mlhTyZsUzUPoG0EO3xEIodDihDpkMRrOdRODKtUonbQPkZQH5cfe/EU+lQfE7HPSeBs8EOPttWvvJDpr4omQbMwjncOUqc59KoAVUYasV8CWgchzTCVLtv5O+oXpAEtg9EyuYyW9M2XLEL4P2ayHBRlAfRk6RRPs7hs5iImFKcOp9QQirMdh01fRJsBs01kOlWVCtqK5iTZZ2q4HXt5CxD/PaBcpm2A/E4AP0nNsyUlPua0Dwy89302sg492sw== 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 BYAPR11MB3400.namprd11.prod.outlook.com (2603:10b6:a03:1a::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.18; Tue, 17 May 2022 15:37:42 +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 15:37:42 +0000 From: "Yao, Jiewen" To: "devel@edk2.groups.io" , "dann.frazier@canonical.com" CC: "Xu, Min M" , "Aktas, Erdem" , James Bottomley , Tom Lendacky Subject: Re: [edk2-devel] [PATCH] OvmfPkg/OvmfPkgX64: Use different CcProbeLib when SMM is on or off Thread-Topic: [edk2-devel] [PATCH] OvmfPkg/OvmfPkgX64: Use different CcProbeLib when SMM is on or off Thread-Index: AQHYaevTqYZI48T+1k28C7BWLhdzXq0jBHZQgAArb4CAAAQJ4A== Date: Tue, 17 May 2022 15:37:42 +0000 Message-ID: References: <20220517124314.1021-1-min.m.xu@intel.com> In-Reply-To: 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: 078c1e16-fdae-4907-6398-08da381b2edf x-ms-traffictypediagnostic: BYAPR11MB3400: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: +46U38GPSqLruWUmmtDPvVsa4wPG99Z3upcy1/kd8VhsWR5qRDt7nueenDbNl4/HqFI5LqMtF4wLjQyqcKv9C82wCG8+IpvEzLbfJ340b61yXV1Lb9G7J8Z3l+weT+Ot8OLsG5rprc1i+NPCISnBo2Yt3yRHcVYNAC5dPzRAWed9uGIrbVhTUwphJihD+dLakL/lBQ4ouQQWIwarUHrH4WweT2/aM2hRjRtPvszFKjR9Bkr+8d/bMUKhxaFOG0a7INzc57u0O81G0omVxYUM6woD6GtvZMttuymsfJYZyRZYaT4zCw4PLCYWTJYXmhp06T+fX3pzh7wZIK/X0/My8mbgfe5rOv8Mi7/w1v4gciXXdEoYV3BQhrn2rhf8+U1dExBD2umfvxBF2a6cABDlS5U9l+SP5zQb+dbqr9vb0uF+2cp+JskLl8TY9xVtdV3DG0bYCI1YjvPSd1mwQHRID9Luq3VvJy8gSjPd82//thvgXRhBJgezc49ANLQK72yTGkc/BrgB/Vi0cYxTKTTcXVvF3MXsefWey4N4RfrSKstwKwbqgOeI1JUXWz92sk5x1wnwE/6ihsvbPCJ/ir1RierGq9j4b0wT/RyfcBCHltsgf0QbiPyUu77MHU7+RvpsQR9BChOhGwlxmtkizHf+4K3y/pN20EQP1VKAvGXzPiY3knwMVagMTHUfzN9dsYaXGz7tlHl+2b3Iuq1JwYGVmh7VpebXBdQuu3H4u0dwtcrM5EsI4CFDAgJp/ZAOgSRKId4c3Z9apVn/Gioshb+QNtuVwRHKxEVM0xKWHIO/mwOTYA4dQN4w1/LUmSYREAjj02psJ0/944+yGxrRLOjqQg== 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)(508600001)(6506007)(110136005)(38100700002)(55016003)(54906003)(316002)(53546011)(2906002)(19627235002)(5660300002)(26005)(9686003)(66946007)(71200400001)(66476007)(64756008)(66556008)(66446008)(8676002)(4326008)(76116006)(966005)(86362001)(82960400001)(186003)(7696005)(122000001)(33656002)(38070700005)(52536014)(8936002)(83380400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?o5TXAridUdDB6aUidTAalole5tR+1YlXhFC1u0ki8QNg2ELjHDBW9Uejtg4l?= =?us-ascii?Q?46ymgWMCnK2BK6IT8j/jxqmBN2c2dJTMIRSRc5LA/LagEOwEFLIauVqTj9DD?= =?us-ascii?Q?YxF+1akINYRCew/89r4++95a6XmWjFyPLxFfNQv9nfVwD2Sj4sNYfDKvG1S7?= =?us-ascii?Q?cqmKx9cohQWc6FNi/J+f78AnPyj8rxV+AHjMqtSCyqnD2es8ST2jPNerBs3A?= =?us-ascii?Q?CoVOtK1r0eEl8x7KSoS6gAvdSTDCVGVh7lH3h+j62o/rNelZgIPRW98yaJMn?= =?us-ascii?Q?htWu7VUYLkjTbl7fWxcMmM9rlNSCi05NO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o2Bz8BhmGBQwsU8TG+qvq+1MXHpVBLD1HfPUJQ35vX8FAjMyy/Ay?= =?us-ascii?Q?XKaTINnVwD1th24AWMZN8qd5HwRqvrsi+KfGCcRqCRMczNlJY2fzW2WtLI1K?= =?us-ascii?Q?cZMrPmHNY6K+1W+0PduTQJJQLxFr2sZO+TAX9q4Js6h12XPSjNxknMqlFO8w?= =?us-ascii?Q?YLkXHgPpQ6+pWsowAS86cZOa7poxgqtIphLyBI5SyJZqNTa7BLmG5cQ9159X?= =?us-ascii?Q?JWxQQFwAcgOKXE+jskawOFz081s+Z0gjGvmfPqGPqNLU8IMZcIau3z2DM7PL?= =?us-ascii?Q?2+WCOvmWP3/o/0USbMxqh76YF/8yi21AYqTLcU2gpprqDqt2Nn5+L2xI8JsP?= =?us-ascii?Q?KRTJIBE8M4MPGNNSMzwyGlYZ0u5+4XxYQF7T6fYewthQpl3DdSLG3EKP3xA3?= =?us-ascii?Q?6i/WzVEVpreCVya8HVkVPBAkSRQsyTXw30GvUHb5DVJ/34buLO9F9dXA9vyt?= =?us-ascii?Q?VLifgnoeaDnSd8aGu8C65R5U1JKMeecllaBElvyjAqleIBmf3LzpoVFsf9hv?= =?us-ascii?Q?AZbBY8eolw=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: 078c1e16-fdae-4907-6398-08da381b2edf X-MS-Exchange-CrossTenant-originalarrivaltime: 17 May 2022 15:37:42.7542 (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: ioJJsLBiErhmZKCpmST1hVZV2uWVJdQAV8cwVl9c02G8bb/DgzeiNmdKUDRpH+/ZNePOurYwg9ez3lHY82Hf0A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3400 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 Thanks. Acked-by: Jiewen Yao Hi Min Please follow hard free process to proceed. Reviewed-by: Jiewen Yao > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of dann frazi= er > Sent: Tuesday, May 17, 2022 11:22 PM > To: Yao, Jiewen > Cc: Xu, Min M ; devel@edk2.groups.io; Aktas, Erdem > ; James Bottomley ; Tom > Lendacky > Subject: Re: [edk2-devel] [PATCH] OvmfPkg/OvmfPkgX64: Use different > CcProbeLib when SMM is on or off >=20 > On Tue, May 17, 2022 at 12:47:21PM +0000, Yao, Jiewen wrote: > > Question: Does this patch need catch release 202205 release? >=20 > It does fix a regression since 202202, so I'd hope so :) >=20 > -dann >=20 > > > > > > > -----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 > > > > > > CcProbeLib is designed to check the vm guest type. The OvmfPkg/CcProb= eLib > > > 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 acce= ss > > > 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(). > > > > > > 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. > > > > > > 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(-) > > > > > > 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 > > > > > > > PciCapPciSegmentLib|OvmfPkg/Library/BasePciCapPciSegmentLib/BasePciCapP > > > ciSegmentLib.inf > > > PciCapPciIoLib|OvmfPkg/Library/UefiPciCapPciIoLib/UefiPciCapPciIoL= ib.inf > > > - CcProbeLib|OvmfPkg/Library/CcProbeLib/CcProbeLib.inf > > > IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicSev.inf > > > > > > > OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/ > > > OemHookStatusCodeLibNull.inf > > > SerialPortLib|PcAtChipsetPkg/Library/SerialIoLib/SerialIoLib.inf > > > @@ -198,6 +197,9 @@ > > > > > > !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 > > > > > > > CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/Customize > > > dDisplayLib.inf > > > > > > > FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLi > > > b.inf > > >=20 >=20 >=20 >=20