From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web11.3483.1662598111368655505 for ; Wed, 07 Sep 2022 17:48:31 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=Oz8TjCq0; spf=permerror, err=too many SPF records (domain: intel.com, ip: 192.55.52.43, mailfrom: min.m.xu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662598111; x=1694134111; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=ZQLj/0TnR14SU9o4HI7IzRVV1BUwL40y/RE/FA4QEYI=; b=Oz8TjCq0vbE0FKkWz5v4b01NqQzZRaz5FV8PgBWe8n+U/Ou7fbz5m/+8 1clC6CIKVyf5s35Dcrio+vXbcP9aJXQoWwplGoY4K2EWo+NgB6PLOA+o+ +ilyCkx1SPmAQZ1eWyvIaPtG8i/9J1L/UMW68EZZw57z7iiFHUGQS+WTs 30JyDj6tmid9JH3VH+Z30vfqhX6ktJgefXgDjKDlWkwUa55onsHreTCPS ehJSrrlAeyq7ioPHRVd0r5UQlXu2XaWK18SiIsCmsgqmn8K6xJ5QdAOPv w8LJ/HupTpakdXzI6dl8h1/sO2iiARaLVnsS6eUC2mW8ay6lzPcUNrP5S A==; X-IronPort-AV: E=McAfee;i="6500,9779,10463"; a="383325633" X-IronPort-AV: E=Sophos;i="5.93,298,1654585200"; d="scan'208";a="383325633" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2022 17:48:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,298,1654585200"; d="scan'208";a="943124131" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga005.fm.intel.com with ESMTP; 07 Sep 2022 17:48:08 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 7 Sep 2022 17:48:08 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) 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.2375.31; Wed, 7 Sep 2022 17:48:08 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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; Wed, 7 Sep 2022 17:48:08 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.41) 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.2375.31; Wed, 7 Sep 2022 17:48:08 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=COQNbMFrGXImZwgXHobwJwlpv4AxoisyHRgD7zzah6ysyb/yitqI9OZFyFAapYUQ9vQBqHQKMfU37ublK+agNn864o+rWRbByJB6uslrC0VPO/WI5iw9C94iMjMI5hsbLdQepaTrUxr98HK/RhuvhciYDzf0dfQqD5bQqvLX/5swu3P11lgX58E0rzqaNPAc/Lxck3rJDnNRW4vpouHxPQGl9p3VL+bpJbNCYskmIE3yDB+aP2UQ9JZoVqDsRIKcvRgkwT27WrTRhAzLWK9rgDANeKgpTX/do3wzDmCIWbbAXbsmO1GShiIudQRK3csZ+yd9KGxINYpIEfRuROgXTA== 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=ZJDXj1a6DdQq6SUcWOBllOyNghdz76WQUhVTjTzh05Y=; b=ATqMkR16MoDTOpc7/MECE77oykyaQYJo4TSWjU3Rcgbn9rt+1dULQ3GQcmngtzRIaI/s9pstRKHSrsEMXTkhgkas2IkkF/l2gaM/lHB0FLGaUfok+EqRAocn2dyn6HxPCy1gMRrhCUg1YV/+bYIdKL1seaEJt5ovANFl+kwknlIe0v9qYP6EV9x3IbPWx2UCajufWftNxy2a4RzdQVzgmDKObjJSBjrbz4KOHreM6axAvJczIcVkC+4LGyW6+kh5PctZMKNWMlKTHHZflDO0tVON1HoMiPdrTXKT4avO/js4toRJYymAA/JkElg0ZOLLAm5wZW+dkEeGfW6zxtoSNQ== 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 PH0PR11MB5064.namprd11.prod.outlook.com (2603:10b6:510:3b::15) by DM5PR11MB1963.namprd11.prod.outlook.com (2603:10b6:3:10e::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.14; Thu, 8 Sep 2022 00:48:06 +0000 Received: from PH0PR11MB5064.namprd11.prod.outlook.com ([fe80::ec3f:8428:41d6:3284]) by PH0PR11MB5064.namprd11.prod.outlook.com ([fe80::ec3f:8428:41d6:3284%4]) with mapi id 15.20.5588.018; Thu, 8 Sep 2022 00:48:05 +0000 From: "Min Xu" To: Gerd Hoffmann CC: "devel@edk2.groups.io" , "Aktas, Erdem" , James Bottomley , "Yao, Jiewen" , Tom Lendacky Subject: Re: [PATCH V3 09/12] OvmfPkg: Update ConstructFwHobList for lazy accept Thread-Topic: [PATCH V3 09/12] OvmfPkg: Update ConstructFwHobList for lazy accept Thread-Index: AQHYwQKHGR87e3odiE65LYNLbe6rFK3TdweAgAEyLIA= Date: Thu, 8 Sep 2022 00:48:05 +0000 Message-ID: References: <5f53ebaa41c5231ff9bb0031ca95afd7e05684c1.1662365866.git.min.m.xu@intel.com> <20220907054149.ynwhhs3gpli5cy6l@sirius.home.kraxel.org> In-Reply-To: <20220907054149.ynwhhs3gpli5cy6l@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.500.17 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: dc303496-bc12-4ee4-07ba-08da9133cadd x-ms-traffictypediagnostic: DM5PR11MB1963: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: mQf3Pl72UKe0SN2yMZvuMz64mi7w+RbPiIiAPJaqVQHfUTtE9EjD1HX4fF8Qv8qqJev+3EB92URWA5LMuC6SLynWlh0u+J2ZoOp4kvKWT5jPtCZZhrDygIU2UFPMoCh/RAFFqj410RQRddjSZNSVIwKNhAR8wbzsbXv4DEMwOTc1Jq7O6Ee5V4YL0iuX6ztnihHMq4y88n7Qp9LD6GrXYm6Ydb5Sa/fEIonCoj3dVH5TtSbXHna90dKrkdWZJzSRBF7h6T1WBPOH5Jd7erV8139bBlzFxxvjkqnni/kVQ+CpjaWqDOnahqZyWa7dNIAJPrWsSMf6rkYmUfmTjXh0uHgYuQua0Kx6O30zUgyEqW6vQMpzN0Ev2BkuQJ5ucpyezz2xJXEDE61HGnkCiKvdoK3fLWiR86/bOFWONe2YhqNsM9cEVT0CIP97F5DiYZKVD1bQgcZ0dZS4dh6l6v6y2tuKyD0a5RU6ZzC8QmHet/GVinIqjAZcW3/FJ2oTddb/5pDs66EmOGsAHWx5WWpLyj1oMRIGm1sEYNjs4xXgKvqBz1eAaD3XUCq7SILdgw1HFthPO5PfVVx5e6eFugYQ2OO1nFUCvc4PYRVWLnTQ2yKLU9uW+pZGPdAi+4VNjobbOLrboi5DvWDxOx2PP1AbELiGi9ExPGdYGwHqJN3Ojvh8gr8JO6QKilJozGPX8PkutqNsJC75BSMYYdgHZJ2pWI6X/OyE27HqORZ4s5d3s7fYsakBV0vOxY0VkXPmVOE7 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:(13230016)(6029001)(39860400002)(136003)(396003)(376002)(346002)(366004)(55016003)(82960400001)(38070700005)(38100700002)(316002)(6916009)(54906003)(71200400001)(122000001)(52536014)(5660300002)(4744005)(8936002)(76116006)(66946007)(66446008)(4326008)(2906002)(64756008)(8676002)(66556008)(66476007)(186003)(41300700001)(478600001)(7696005)(26005)(9686003)(86362001)(33656002)(6506007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?gZuaFyiR4tCPJ92wGaFhAnLyJNnrgHBE9fmWNi6SWxuTQAmDf1+0qcFRkhQG?= =?us-ascii?Q?Oh0+g7Wcx1Lf8LJmk8TbpwjRqFhAbMlW6Du6x7wQYJLmg8owk8VCoy8De3ed?= =?us-ascii?Q?mp4V3u6shkSQRTYG7ttAa8t5wkDklKQZuBFgnz33TuEOHLAM+sgQ5aNsO603?= =?us-ascii?Q?vpJbboQzDT/TcLWIggfK7rz1p6Szhg62aEP723t1waDE0TvoOENpEwdBj/Qr?= =?us-ascii?Q?wtAlOdHaTZOdAKdFwjIMJjNK+LqHapWsbaO061msIoX2tRfPfhfibxRIGZcT?= =?us-ascii?Q?z4AgR0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sT167LNFMEEJ1i+?= =?us-ascii?Q?oA9G3iuDdvfT8Tvot+IyfcKE03EvQmczZraY3hPIzAhyecGFBpp+S70cYj1V?= =?us-ascii?Q?SJEtfJDwwpJlGi+rM5jRvGY4G+ScHd7FrKW26UTp8ZtY7mucmgOLKwVKVsGz?= =?us-ascii?Q?4V5NDhhVfKOGF7Fj272Wm3Jku12WQDV56EU/hrlYLYt5jOz0hmpO3hw9UEE0?= =?us-ascii?Q?uB8bcGSdEGeHd2ZuAY2vOeNwewWJkC/zLgYGh88O/c6GKIEm+4lYzszbTfzt?= =?us-ascii?Q?+38r+wEf2o5rhb+6IssWZh3KHSLOIrdTBR/3tYkyB/6di5YPkF/HbtqwwwDs?= =?us-ascii?Q?hsi2xX8JLtrbqUCEtmdi9vrorKQjJGXVAO7+DLlLXsDy4VoE7hgDI/TqdSxm?= =?us-ascii?Q?EofE8BAp+sAW49befmVxO1bR8PCl7Be/qqr7jsCF?= 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: dc303496-bc12-4ee4-07ba-08da9133cadd X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Sep 2022 00:48:05.9032 (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: keF8Pz3CIhX4yHCUjRA/Qkh9anf4xnpC99wWjDr2zuHQadezJUPVplhfO9LeGLBME8Gs29YO6s0DOi422ZckQQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1963 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 September 7, 2022 1:42 PM, Gerd Hoffmann wrote: > Hi, >=20 > > + // > > + // This memory region is split into 2 parts. The left part i= s accepted. > > + // > > + PhysicalEnd =3D MaxAcceptedMemoryAddress; > > + ResourceLength =3D PhysicalEnd - PhysicalStart; >=20 > Same comment here. Can't happen when all memory below 4G is accepted, > and I think MaxAcceptedMemoryAddress is not needed either. >=20 It may happen. For example, a TD VM is created with 2G memory, then the Max= AcceptedMemoryAddress is 0x80000000. If it is created with 1G memory, MaxAc= ceptedMemoryAddress is 0x40000000. This information can be retrieved by wal= king thru the TD-Hob and read the largest address of the unaccept-mem-regio= n under 4G.=20 But I think it's easier to record the value in MaxAcceptedMemoryAddress. An= d it can be used when not all memory below 4G is accepted. Thanks Min