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.web11.969.1662446436313986231 for ; Mon, 05 Sep 2022 23:40:37 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=X1AwOhQi; spf=permerror, err=too many SPF records (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=1662446436; x=1693982436; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=XmDDJw00C4adh2JnX7Hj+OzsbfKppwzEuZvSgD0bsyw=; b=X1AwOhQiZjt73TrQ+nu02ita9O6jpbCaURQHtInYWpazTSzHBQO3qGYs D+Kmduhq/M8ow2bC9Vq3MVDEPmIKb7zALq+/gW/74r9GuoS5eVKfIxLCt XOx8FjsHtVf4uQn9Kjp4CiFY+Go7NOxqEkZxe1EAQitJ38D8QSE0a43G3 ua0vcZxttbXJ4tITmM3g6a1ur0RdaWj6TqX6lHq0jIh+fjEqO3NWaGMRB ObQiI8N1lnWduCNgdUoAEK95AZxOPmPvmKfaHZIWz4Na/RdKb7Pc2tQ7G W60DLXEGRONfy7QyGGC4B7Q3m2Pf7agY4cq6xdcauP5uuihRFpEPrC+0r A==; X-IronPort-AV: E=McAfee;i="6500,9779,10461"; a="295252656" X-IronPort-AV: E=Sophos;i="5.93,293,1654585200"; d="scan'208";a="295252656" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Sep 2022 23:40:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,293,1654585200"; d="scan'208";a="739792961" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga004.jf.intel.com with ESMTP; 05 Sep 2022 23:40:35 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 5 Sep 2022 23:40:34 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Mon, 5 Sep 2022 23:40:34 -0700 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.175) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Mon, 5 Sep 2022 23:40:34 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G+1gt/upHe/n7/GtxVg7BAu3539kBvvSgfqXRWjnXXezHjxXkesQflJ80aoNK/E+C9wabFsZdo6xGAnquJUfLSudL5wPM2CfCjjsZMkwGqscsnfTrciMQUittM3eIGnuvn+OhdOgly004Q1SF0V9YOJ+ZYlVLa2WzfJh3ap/7JoXUygnGmr/yHWvFepj3ynhINwIPsLRrfgPZyuHqvEIAHQAn+wv+gUMm/k+gFVfIp5liP+lnCtvFNYm8TTSrhPIvPt9M5kfvh2SiQhMeWoWuuCtVHnolIEEuTaEUndycvo+/MgzyY2MOQXtV4nKUmdEzOhGKpquNrL3xmz9Aa04/A== 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=WNU11TdT6x6WesyZl0b/kyVdyQr+ngIGFdF6/a/EwnQ=; b=OE/NyDzpAAEqSva/+Vikbg8ZabYkSVPtmIjFRyjy+YCZV5IAuhGMT06ukVBlbxKpCyv4Zewo1QkQ9zrJz+rYBlU7Om9podghnMws6ztby9LWjfd5Pi9GcF5IeaSRfiehw+al8piXvL/YBzoN+VjyUa8MDv4ZmdvkCUOejqPgYH8MKyYIkQt37gi+sV5cWmkS9cywRA5eS/QNgrQg2asp2u1doBqShAo4J+CcOytSQMyFl32Z2MhXEaSiswxSXcElLs6nYtn+R9JkZOceaV5ekIRMzCymIecjiUi189WLfmuFx5zL6pgakpU4QMPthuOFGUOmshnqOYtrMbV7Gqypcw== 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 DM5PR11MB1450.namprd11.prod.outlook.com (2603:10b6:4:f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.10; Tue, 6 Sep 2022 06:40:32 +0000 Received: from MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::2080:d65f:9c32:7749]) by MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::2080:d65f:9c32:7749%6]) with mapi id 15.20.5588.011; Tue, 6 Sep 2022 06:40:32 +0000 From: "Yao, Jiewen" To: "Xu, Min M" , "devel@edk2.groups.io" CC: "Aktas, Erdem" , James Bottomley , Gerd Hoffmann , Tom Lendacky Subject: Re: [PATCH 1/1] OvmfPkg: Set default Pci PCDs in Tdx guest Thread-Topic: [PATCH 1/1] OvmfPkg: Set default Pci PCDs in Tdx guest Thread-Index: AQHYuOSY1KELeBpysU257Da890rZJa3SBVRQ Date: Tue, 6 Sep 2022 06:40:32 +0000 Message-ID: References: <20220826004109.1245-1-min.m.xu@intel.com> In-Reply-To: <20220826004109.1245-1-min.m.xu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.500.17 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: 6f72c297-c52c-4879-8e18-08da8fd2b291 x-ms-traffictypediagnostic: DM5PR11MB1450:EE_ 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: PvIg8Lt1KNY5vqBEpx4isInr3b0szNEpOtmD7vAWOyJ8LVB8mFnGbeyz8mjlkWSKtVynHNIqSqS4rr60qLysd9WJOlm8boNtEndnvr0DGKoTOC35nsu4aCSX9/nueV8EIZgFsMWBb4Tn8XKUGg8yq6ZfcSb494PCTn9WB72eKLQ+lWtEp/bf6/azEo4bokZQ/SHUzwRS77/ExXicxCAfSYK37OTO5pFop3PAqc1LoG+V2dao0k6YKFeS0xdrAVpNlNQlSVvPT6xVWhBiNtkY3g/pngWfiYSdHZAZiysb9lvCUKqO1MKM2WdK/eInmgb1Qsr6Zi8qP+mlYfgo8xRQ2i9m6JKoX1jj8Tn52oXiWvqis35Ui0bweUNXyvZ/KWCtW5SsW0RXu3iCZPrFluHPwyU9DiLK9W+2NPwLlTTwp26cz+ihfRAuUiIJ0LzT+ieTaIcaUSuRpYskRuYNslt+ivl0Kw+el0k5ZtjFs/sQf2Tp0vVnBfEoeaZwdT9SvtrXaisSdFdY0KIL8wFRPR3gfdDrZBtDhVQ9jSw2te7a0JJO8h3vJBKaorJEjaETOgUqqgiMwKTyXe52MOy1U9ijEEW/HQbqHhQfMHkC9crUT+AUKJ8xgw2Rw3DsCbw8kzGXDGeMkAhxgKSaedbiqYtxw+dPLj7X1AurvRNrLzkKQ35MRjQ7z9t28Sf8t2I/UF1nEC2h+tmgswDuqvYUmrXkgrg0P/fZt1Twtbdx/ufS5RWF9xNQiRLj215RHParvRvM3l49FGfZqCwYttdJzG5ZYTdkx1AQuGaSPA8qO8z1WKM= 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:(13230016)(346002)(376002)(396003)(366004)(39860400002)(136003)(7696005)(71200400001)(966005)(53546011)(478600001)(41300700001)(6506007)(83380400001)(9686003)(2906002)(26005)(52536014)(5660300002)(8936002)(186003)(55016003)(110136005)(54906003)(122000001)(66946007)(64756008)(66556008)(66476007)(76116006)(66446008)(4326008)(8676002)(33656002)(38100700002)(38070700005)(316002)(82960400001)(86362001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?0T5DUBiqlYiWSRVh7bKQAwdPD0CcDePYZCfCsvl8j2DLLpQ5GzvFpBAjBbMu?= =?us-ascii?Q?aR5NRmIFLpmwJr3Os+9bSXXuhaC++uJldwp2rfcU0aq+ZfuyT1KDlLmxJnK1?= =?us-ascii?Q?WW60h+Qs+BpN1blvaqL6czTr78x1JHXiqez3Mo3sG5upm6wh/qVH7oV0t4+D?= =?us-ascii?Q?O8+rjYo9J7WYKL0BzDFtIkegoWHMHvzYHmo3jkHIrazqNTuFzrUrC8TFIA5J?= =?us-ascii?Q?HX+rA2y+O+eWK25ZmbgfEZH7w5lC66/g/71h4bMeTumzvtGqm6m0DUNNhCZ5?= =?us-ascii?Q?shvx7WsjpRoPWW2GnR4WkAj70Qb0ydvl4/4DxVYjiR31LlFXJPDQo5uFrz93?= =?us-ascii?Q?JrPYsa8MlO7gP2Q158e4kkNPgSO+pMrq+oXiNz6JIhOs2kpGZTB2HKGWT7K5?= =?us-ascii?Q?TIey0GD2wJ9ySFhv+IkGPSSnulaCqRlPxZXSSi6yBp2bn9mYqdLMZ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lIa83vW0Iyi55Hf/hoc/rr/prR?= =?us-ascii?Q?Mf8v9Q+zuS02efbbf/Xir6p3SjOKfcedxwvEzoTyWaFRMc0oCE2GXIVBCQID?= =?us-ascii?Q?vzZsZptBmbVhi8NjJ10pEu2TPlRF5A/9uBsiHZHYklrIIIcSiIRiusXIHu1E?= =?us-ascii?Q?4mt14XXY3Gk/4L4Q7iM5+IIH69W6QaRUJ40IKtT/kKRwu3kOVGEYNKTJKueV?= =?us-ascii?Q?YwRPLTFXAWfPXD2P6JUU4YWfuPNaZxKfAT6Tdv4q?= 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: 6f72c297-c52c-4879-8e18-08da8fd2b291 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Sep 2022 06:40:32.7509 (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: c6zA5dsM2wib6u5t3rEQZwP9mVgVzceHc8ozIwgcDPVJuAXJimZj2XH/6eYXmKDiRspPlQ/fpLIzXrkxgSFCxQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1450 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 Reviewed-by: Jiewen Yao Merged https://github.com/tianocore/edk2/pull/3291 > -----Original Message----- > From: Xu, Min M > Sent: Friday, August 26, 2022 8:41 AM > To: devel@edk2.groups.io > Cc: Xu, Min M ; Aktas, Erdem > ; James Bottomley ; Yao, > Jiewen ; Gerd Hoffmann ; > Tom Lendacky > Subject: [PATCH 1/1] OvmfPkg: Set default Pci PCDs in Tdx guest >=20 > From: Min M Xu >=20 > In previous implementation below Pci related PCDs were set based on the > ResourceDescriptor passed in TdHob. > - PcdPciMmio64Base / PcdPciMmio64Size > - PcdPciMmio32Base / PcdPciMmio32Size > - PcdPciIoBase / PcdPciIoSize >=20 > The PCDs will not be set if TdHob doesn't include these information. This > patch set the PCDs with the information initialized in PlatformInitLib > by default. Then TdxDxe will check the ResourceDescriptor in TdHob and > reset them if they're included. >=20 > Cc: Erdem Aktas > Cc: James Bottomley > Cc: Jiewen Yao > Cc: Gerd Hoffmann > Cc: Tom Lendacky > Signed-off-by: Min Xu > --- > OvmfPkg/TdxDxe/TdxDxe.c | 26 +++++++++++++------------- > 1 file changed, 13 insertions(+), 13 deletions(-) >=20 > diff --git a/OvmfPkg/TdxDxe/TdxDxe.c b/OvmfPkg/TdxDxe/TdxDxe.c > index 2318db989792..bfdaef59dd58 100644 > --- a/OvmfPkg/TdxDxe/TdxDxe.c > +++ b/OvmfPkg/TdxDxe/TdxDxe.c > @@ -68,20 +68,20 @@ SetPcdSettings ( > PcdStatus =3D PcdSet64S (PcdTdxSharedBitMask, TdSharedPageMask ()); > ASSERT_RETURN_ERROR (PcdStatus); > DEBUG ((DEBUG_INFO, "TdxSharedBitMask=3D0x%llx\n", PcdGet64 > (PcdTdxSharedBitMask))); > - } else { > - PcdStatus =3D PcdSet64S (PcdPciMmio64Base, PlatformInfoHob- > >PcdPciMmio64Base); > - ASSERT_RETURN_ERROR (PcdStatus); > - PcdStatus =3D PcdSet64S (PcdPciMmio64Size, PlatformInfoHob- > >PcdPciMmio64Size); > - ASSERT_RETURN_ERROR (PcdStatus); > - PcdStatus =3D PcdSet64S (PcdPciMmio32Base, PlatformInfoHob- > >PcdPciMmio32Base); > - ASSERT_RETURN_ERROR (PcdStatus); > - PcdStatus =3D PcdSet64S (PcdPciMmio32Size, PlatformInfoHob- > >PcdPciMmio32Size); > - ASSERT_RETURN_ERROR (PcdStatus); > - PcdStatus =3D PcdSet64S (PcdPciIoBase, PlatformInfoHob->PcdPciIoBase= ); > - ASSERT_RETURN_ERROR (PcdStatus); > - PcdStatus =3D PcdSet64S (PcdPciIoSize, PlatformInfoHob->PcdPciIoSize= ); > - ASSERT_RETURN_ERROR (PcdStatus); > } > + > + PcdStatus =3D PcdSet64S (PcdPciMmio64Base, PlatformInfoHob- > >PcdPciMmio64Base); > + ASSERT_RETURN_ERROR (PcdStatus); > + PcdStatus =3D PcdSet64S (PcdPciMmio64Size, PlatformInfoHob- > >PcdPciMmio64Size); > + ASSERT_RETURN_ERROR (PcdStatus); > + PcdStatus =3D PcdSet64S (PcdPciMmio32Base, PlatformInfoHob- > >PcdPciMmio32Base); > + ASSERT_RETURN_ERROR (PcdStatus); > + PcdStatus =3D PcdSet64S (PcdPciMmio32Size, PlatformInfoHob- > >PcdPciMmio32Size); > + ASSERT_RETURN_ERROR (PcdStatus); > + PcdStatus =3D PcdSet64S (PcdPciIoBase, PlatformInfoHob->PcdPciIoBase); > + ASSERT_RETURN_ERROR (PcdStatus); > + PcdStatus =3D PcdSet64S (PcdPciIoSize, PlatformInfoHob->PcdPciIoSize); > + ASSERT_RETURN_ERROR (PcdStatus); > } >=20 > /** > -- > 2.29.2.windows.2