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.33550.1634546302306074760 for ; Mon, 18 Oct 2021 01:38:23 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=FZkZHOSv; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: min.m.xu@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10140"; a="226968289" X-IronPort-AV: E=Sophos;i="5.85,381,1624345200"; d="scan'208";a="226968289" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2021 01:38:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,381,1624345200"; d="scan'208";a="443319438" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga006.jf.intel.com with ESMTP; 18 Oct 2021 01:38:21 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Mon, 18 Oct 2021 01:38:20 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Mon, 18 Oct 2021 01:38:20 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.169) 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.2242.12; Mon, 18 Oct 2021 01:38:20 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bv6P6d4LRPrFqsVYw09KmtZe5ImVNaWMZbx5TSpqqZHSOD1AzsTyK0Is8K2U7VpXq7Vrx0oJt8hbO/2ughVlg8Q9GfcaOhCgit4o/ACt553nLbRCmTcKZ9/VUSI2Am1B1KtnM9IDOVKXcXzzu+VO9+TaxIvb1utcce1KgdG26F6H4cbHfn7XPAsdRhx3TOXqfaG10uCl+OQv1v8Uh6j1SMFKvPPsCi8HAQB55SMNdH3KouDNTf112VfHDcRD8qbKLYNd07VUtQ0zS0PgVyY/WUBWvYqj7cT+2Qa2RXfgTFqUVzipEhHXfGk462ieoQ4MUu4+vF1gEcGlNbQBWJwPuQ== 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=9SCVYSOd4R/s2KzWFZDMOtNOUEc+Arx0N1cjBSpqyy8=; b=CSgIKGylqG+9ucDDmumR+iVNkDWkjd9f6/IzBoQwph326Q++VZgVWtAmlIEaQYcHYELB8HIkyqwjLvCfvhb253ZQrpwE7zxrBqOM+vU+qnM8zgkiqTdBK90MQh0EiZXzJPUZR//n/Td5qP3/J4xS9gFK2m9Javve2HBK4munJ8wt5NcW8vorC9M96ryKK7nnJxLyIbRDU/uV0f4NQLY3vzoTyrP/RAPxw34dCcvq5hrAjLq4fnc3nxm/lhvb4cW9CgeSAY+UMytKqzM9ThyBQC9Y5Y0oL/kJ3pWSNuMfL1NPIeNr33ljsyIPFJixswg9fdTVyGEf4Y+izjQCVsDA8g== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9SCVYSOd4R/s2KzWFZDMOtNOUEc+Arx0N1cjBSpqyy8=; b=FZkZHOSv//6MtaLDEVTWXvBXYSTDq5qCMIZ5OxCf2VNot89o30Z0I7ZgIY7Zh5zk303XdT3vhC2NgedQGNPC+8Mt8XEOopkIZ1LDpJCyce8JTeqKKqGmtyRfC3q6StFL8A7bnoc8TaLHd2ZI2mY0co+2s/7inKA5dG3m0PnNdic= Received: from PH0PR11MB5064.namprd11.prod.outlook.com (2603:10b6:510:3b::15) by PH0PR11MB5141.namprd11.prod.outlook.com (2603:10b6:510:3c::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16; Mon, 18 Oct 2021 08:38:18 +0000 Received: from PH0PR11MB5064.namprd11.prod.outlook.com ([fe80::7deb:6c36:73c2:f0d4]) by PH0PR11MB5064.namprd11.prod.outlook.com ([fe80::7deb:6c36:73c2:f0d4%3]) with mapi id 15.20.4608.018; Mon, 18 Oct 2021 08:38:18 +0000 From: "Min Xu" To: Gerd Hoffmann , "devel@edk2.groups.io" CC: Ard Biesheuvel , "Justen, Jordan L" , Brijesh Singh , "Erdem Aktas" , James Bottomley , "Yao, Jiewen" , Tom Lendacky Subject: Re: [edk2-devel] [PATCH V2 24/28] OvmfPkg: Add TdxDxe driver Thread-Topic: [edk2-devel] [PATCH V2 24/28] OvmfPkg: Add TdxDxe driver Thread-Index: AQHXuZrWdbvQqNCNZki9PDW84SqRe6vPS2eAgAk4L1A= Date: Mon, 18 Oct 2021 08:38:18 +0000 Message-ID: References: <20211012115009.bde5etudkkbzmfqm@sirius.home.kraxel.org> In-Reply-To: <20211012115009.bde5etudkkbzmfqm@sirius.home.kraxel.org> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 authentication-results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 97140773-99ac-446e-8eb8-08d99212a2c7 x-ms-traffictypediagnostic: PH0PR11MB5141: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Te6jFYVOAQGYwnVQ2vf6qg3CzRga3uVCORPvPMPTuZLH8yCUgUYEmH6denSovkXOqindsAmMA03D+MK2OPmC8NqGVFNFF34BIPIXu72CZCMOsS+CkHLJt5a6pmwzgUC3lMXoa05BtRXYSW9NctNpV/FCLfmfsFI4xQLGvU/6HP8kZ9cBx69cKBxrAHswwoApzAUj20k0ymiqRTQ8iPpKUwNfOaPGMsI+WZhwq1yoRs9hmKVyyof6AuWVPdAli69xB8R4yYEhap0AFK/oP7I8VPLLJhLtilVrvPfEgoAAHy24VNkgxEpVHL4tK7NmBLxiyox0Vvw0J9ZJTjvzLOpZINzZ9M1HJlOjfSB1CjYp6O8r8giRai0iXSrUupwBqLX6nCP5pgnsXrnmpnAnc4j+5+2nfV/Yw2AqfLftFYxRALWS1x0CAWv3PgWU1X/QzWakMXcjM9K3eOF5gf99G40chqmIilWLd/3JRVismWoaGhGLoCA/x4GT7wQbDod8Hcs2KSVdo+J0u1eHBlYiU2HSlA3f2J2FHJDneClT5aoytEimFpSHxDq4sU6YtI/EV63fBhXXVc2TmxpxVDGZwJvRVQe2aM4geJqKRbMlWBrWT7qlaLlbkVthsMXLJ+Ype7f6DEEmN91EFcx/KIramewqsLvMqFUi/SmQ8UL75pL2vY9sCYx5VvN7DbkO5jT9907tJjSqsSkIHtJkuALAcSOl6Q== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR11MB5064.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(66946007)(2906002)(66556008)(66446008)(38100700002)(7696005)(82960400001)(86362001)(508600001)(64756008)(4744005)(33656002)(186003)(66476007)(8676002)(76116006)(316002)(5660300002)(122000001)(6506007)(9686003)(52536014)(26005)(55016002)(4326008)(54906003)(8936002)(110136005)(38070700005)(83380400001)(71200400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?pn6usHT+zqHtBV6KXWSs81gLmS2tV2UOi9VPQv4CkDE73jh4Ed2w2dDZ/llS?= =?us-ascii?Q?PQF1qhhoJdZQSFqx9QgvYPYbltOzTzQFuVXbso5i2Res1oNL1c8YMINe7Gz5?= =?us-ascii?Q?Dw3p54gYtAYLNM4MU0QJGgoTKBapp8WF9Flmduxd9Ai8aIo0mr4JejXFY/B+?= =?us-ascii?Q?29rkCjdmP6/j1f2ioLz0D01o3eYmDw5VNF4KjeGqLxpsfGblkeVSzDDBiyOa?= =?us-ascii?Q?yHmIIk5vHvsiFVMNjeNG2bQbdt5k2Z7/hpMSBwdahXNPDasNFqcxkzpFSidw?= =?us-ascii?Q?9KrV8CWrvWFXQrb+gYY/nxhCgEZv91yWVsfTlHcK66PUaDYIrPwz+CcdsJwD?= =?us-ascii?Q?T4w3T5cx8eGPp48GNJEgtkN2DKb7sAtEOeHJFwxWhj5qnrFMv0lqiqi2tHN2?= =?us-ascii?Q?8eJmSUPff+jHDa0OzzcyARrXEhaTO1VxFscTlneHPFGyiywQULpTEPnOQSaO?= =?us-ascii?Q?AdkAHh0L92zQ2cTKVL9uM32R8v1j+kiVndGBpiAamlT6qessg4USixJRbkdT?= =?us-ascii?Q?5+T4vMaWrbJM2GlfDv1vLkt+MMRNCQz2Kt6ATJ4xRZhd1PL97by2v/zG8r0/?= =?us-ascii?Q?gw8GaYqo325v+QQvPLPpU3RiwsXdABbAdRTKkB5EEZYWyDeGS/d92UzftTOd?= =?us-ascii?Q?y93NXX3Kr/K37PFih69t421YNUL+4monWLk7rorPrra+D3aA0DwSy7m9/Y6P?= =?us-ascii?Q?9Q0y2DaVWUceZBS+grwKkMUsS+Qsgip/JPImkBIbYYclEalDlKknGM6AhuRh?= =?us-ascii?Q?g+ebnw6wsAmP82r/oKTxMycGfKy6qjTCvIJW5/+2W/vB5gGhSTyZwQvWh1yq?= =?us-ascii?Q?fWgj2Xl7nYGB7X7m2e3s2RAoaMF5Qn9iCxQmAKonLNatHPelEKUCXkrW/H6t?= =?us-ascii?Q?lOCAteWGy5nC5Pnq+gCSjb0C0+mWNtsP5TFlh+cV9PnU4zxi6v4xDPZhT66R?= =?us-ascii?Q?b45K1jxskmPU5UbJUR7sJ3skxkR2cVk4l+PQOrmfqdGfXzrgqZomoM0o0ash?= =?us-ascii?Q?XMJAdhykBLAAZiWu/IuDjYVLLuliidTbiUhdIPgNh9ae4EzJK5IT9h2X5Q73?= =?us-ascii?Q?IRpLGAror8DeCQHnf/hdQ2rXPlrniQ4WGyW3G1d/hGNCAJHvmOPs/ZXXmsmt?= =?us-ascii?Q?+tkf9gHx+L4OY2rCktAfBKn0kaQL+l/jYn1vW1nWjXgo+ltvVgrZqI5EEu3l?= =?us-ascii?Q?5BM2K5eVHohItOaROCkZX1prUrG7ztAOwWNIRM2r59vz7aUcg/YqYsSYtStp?= =?us-ascii?Q?kxww78pzm/BRQBT3kQMcIu50gz6jbALjhli8c7Htvj2MFzua1+Td7rQzsf0O?= =?us-ascii?Q?/XCUnqEE3HXsmzTpxscVtsG8?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5064.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 97140773-99ac-446e-8eb8-08d99212a2c7 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Oct 2021 08:38:18.6813 (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: FH+STsog6np4anrvSYMhMiD9TeYRpVi0uJAdrCfCZo7FDhK5lsa9X+tBWYz6B0uho/8ZwbQAiwSG8zGH1+jOaw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5141 Return-Path: min.m.xu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On October 12, 2021 7:50 PM, Gerd Hoffmann wrote: > Hi, >=20 > > Besides above features, TdxDxe driver will update the ACPI MADT > > Mutiprocessor Wakeup Table. >=20 > > + ACPI_MADT_MPWK_STRUCT *MadtMpWk; >=20 > > + NewBufferSize =3D 1 * sizeof (*Madt) + > > + CpuCount * sizeof (*LocalApic) + > > + 1 * sizeof (*IoApic) + > > + NUM_8259_IRQS * sizeof (*Iso) + > > + 1 * sizeof (*LocalApicNmi); >=20 > + sizeof(MadtMpWk) >=20 > > + CopyMem (&(Madt->Header), AcpiTableBuffer, sizeof > (EFI_ACPI_DESCRIPTION_HEADER)); > > + Madt->Header.Length =3D (UINT32) NewBufferSize; > > + Madt->LocalApicAddress =3D PcdGet32 (PcdCpuLocalApicBaseAddress); > > + Madt->Flags =3D EFI_ACPI_1_0_PCAT_COMPAT; > > + Ptr =3D Madt + 1; >=20 > [ ... ] >=20 > You are not updating the MADT. You create a new one from scratch. Not a > good plan. I think you should simply get the installed table, copy it to= a larger > buffer and append the ACPI_MADT_MPWK_STRUCT to that. >=20 Thanks for reminder. It will be updated in the next version. Thanks. Min