From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web12.26431.1661218494177294396 for ; Mon, 22 Aug 2022 18:34:54 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=TlnvRA36; spf=pass (domain: intel.com, ip: 192.55.52.136, 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=1661218494; x=1692754494; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=0HTcUyXv/SixAEc3psVtGrSsaJKTRBis1ryUzG/Di60=; b=TlnvRA36FDEn2itK85ohTYVwl8bUqq8ZLmS/bPa33P/M54PMvUJtiPrB SfdDr7amqbBFwDj7F6vc1p0/Rs6naZYsLy52gMf/Ok0m1UonXYHM3dvPX IK67+57pwvEAxj4rn85u/E4/r1M/krECXqu4f7IOt9fCrQpj63z3m1T5I kAkUMsYN1CcGaabAsyMJ16O0bmtRdZqlD07k8xyUOoilD824FFJ/cXy47 CBDld1wI0IldxzTj2BPdlAL4YB2/ohKX8VW04c9yCJJ336ld2pj1z9XsN v7PwvDq04nBCpINEpKliyJv7vwOhsN5kpfGEREioGcJcBT+LFwQy2nnQD A==; X-IronPort-AV: E=McAfee;i="6500,9779,10447"; a="273317961" X-IronPort-AV: E=Sophos;i="5.93,256,1654585200"; d="scan'208";a="273317961" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Aug 2022 18:34:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,256,1654585200"; d="scan'208";a="642255850" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga001.jf.intel.com with ESMTP; 22 Aug 2022 18:34:53 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) 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.2375.31; Mon, 22 Aug 2022 18:34:52 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) 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.2375.31; Mon, 22 Aug 2022 18:34:52 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx608.amr.corp.intel.com (10.18.126.88) 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, 22 Aug 2022 18:34:52 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.176) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Mon, 22 Aug 2022 18:34:52 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lTnmsfo9ERpFcyZODlQNamdz9BUm0kGK6JX0EjiOvFnE3A5vDaxGmypRyAbRsQykSnFZ55+SBoB7skpvNj+26dtXDSd8r65mydrJ0tl86qDwZaumKA1Ax8XQAVh3q/j9TJqV1SmMfh5QZiQqY6TJ++N335hm+f0OiY+RKGIXoAYAiJRpcfVScZCfQd7lyCcEiJG/F3a64A4W4Z8HTEM/K5F9DZDSrVZ3VauLVjnQvxG1o0Pa3oaaV7X8gPcjyVZbGvuem8xYEcL4KM/yIIX6K7iMB4imhV5qhZAswZPNhlkS8Q9m8vhOfnhfoJ8+wG7xphH0UZA6oTE9XLkSl9lcRA== 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=LZiwvjkU3zF2tmIJzj+bRg0pxYP6dtkzqZmyk871KeI=; b=gRNkF5FVsLkYGXROnyeeJM5rMUb3dewzmPrkOHEvtILNVVEYSWW5GvBoGQ6nVpRnbMzRBk812mER7N+STy6b7P/nQNCxPBU7BzWZ0e9JdnWmqj32zBWcEPkQjYIKAoiA3d6JYbf/7UP5GqwRio6p1I7TViDAMLmyD4sI5K+XojKqmrQnYYwz9LXQqA2GSrWOyYjkypyyd1X/TdqySgJHsWF1ePlA3CH3KYufHW4o7Zi7L5sl4Z0R3PT5/9gNySOk35/wy3dTFGPdN4vhoB8TnBIVgmcMjAo2UMq7ky+JVjeqbaAB5FmmBafmuSXEMGVvBftX8xygmsgxmIFSV7RZpg== 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 BN6PR11MB1716.namprd11.prod.outlook.com (2603:10b6:404:4a::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.19; Tue, 23 Aug 2022 01:34:49 +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.5546.024; Tue, 23 Aug 2022 01:34:49 +0000 From: "Min Xu" To: Gerd Hoffmann CC: "devel@edk2.groups.io" , "Aktas, Erdem" , James Bottomley , "Yao, Jiewen" , Tom Lendacky , "Xu, Min M" Subject: Re: [PATCH 1/1] OvmfPkg: Reserve the Ovmf work area as RT_DATA Thread-Topic: [PATCH 1/1] OvmfPkg: Reserve the Ovmf work area as RT_DATA Thread-Index: AQHYtc4z5aKi8l6fvU+iczNv26Kj5K26nSEAgAEW23A= Date: Tue, 23 Aug 2022 01:34:49 +0000 Message-ID: References: <20220822022301.1454-1-min.m.xu@intel.com> <20220822085130.sdmuz3schsia4fxw@sirius.home.kraxel.org> In-Reply-To: <20220822085130.sdmuz3schsia4fxw@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: 0753255f-7a6e-4021-35ea-08da84a7ab18 x-ms-traffictypediagnostic: BN6PR11MB1716: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: TAWULn6M9Iqj6PQuLQWlMtpc8QiQ96MDKXnRujkM88YHOCF3VN+TPyP5bLz/GER9+t4Uqd+VwJMtKeP7Qylc0Z18UHCU+2uMiJPv8H7n1xMmojUDZU12TUS8WXDVUgGnlM4HPA5m92AnCrpt5g9z1I7ma6APikm/Pnu/ATfFNe9r4Y/xb/ZaW5Ycw1YufEuNHPa27RVshTN4NQeSjRJMpK7qYZ2A2pSNjCG+UJOCP1pRTNpCRGxlThvYhmnFVgl+2oPh6KLw1SmodCqv3XrVi3UC53xO4MG0C1FRKTrwfM5DYNzDLE42uwxUPI3CHwR2lfobIhLjcGLx1hnxEQ/G3kKu6HFjYGa75z836a1lIc3X7WnZfiLqUSJC5+2AeD/lIOUBKNGzP2aMOGMC3UAWGQoX827Gr+YzP0wJ1lHZkENnvGpJWnHPyhhr51AP4RYiJvU+NS7QruvkdGjPv7AjQT10EF8w61SB4bazKH7V+R7CVsux/COtyTupwmGRvrxEYfgkpO2XZKPRjciZGVks/loN8QuKsFLdFYLxm8pG4ey11Fhs+lwvytTOXZgKKuF6ox3VR6gfRN6OJiNbDt7BNOT3peaOiMeNAtbA7gW8EkKcKQiJARFnV2lF+gBgJ3RtdzwD0HMgCyZnZIEBdSrdo/FjaquXfK2zEPMrQ2NKHSmJHJP1mLMhUa6QRnr9QvBmG87dxU6qp6PZa/AmPoLG/wrQi7XdENkb+xYNKgjT7O8oC2aBG81DjrWNPnMjNQx+9SU4l3YPBfMeOPedd5czg/ObjENE5aQvYQTt/6tEh5dSKsdnQtoxhYAEUr8LkyjSSdAFMYXVVCsM6ZZ6UR8BUg== 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)(366004)(376002)(136003)(396003)(346002)(39860400002)(54906003)(5660300002)(6916009)(86362001)(478600001)(64756008)(8676002)(66556008)(4326008)(966005)(66446008)(52536014)(6506007)(26005)(7696005)(107886003)(9686003)(8936002)(186003)(41300700001)(2906002)(82960400001)(38070700005)(33656002)(55016003)(83380400001)(66946007)(76116006)(71200400001)(316002)(38100700002)(122000001)(66476007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ptoSDY+7yHGCJ6yYdTagQmKohNO7mzWknAaafY4n1yJPsnL/rDj07D6PxR9n?= =?us-ascii?Q?M5QVORBGxhLlvEEb6Ho13lm3VeUiEbWtbiIxe3cKxbNqpXTUAap0Jsqjou52?= =?us-ascii?Q?YqevhEbap3thtJx8anNhtvrBKBek17uREwh3YsFalC7jYcWT9A7a9NvKhSoh?= =?us-ascii?Q?BJ+nur/SdcJEe78zSZQatYM92R7qDiuAY/KgJB6AQiFn/PThJbWkaYUYJAKe?= =?us-ascii?Q?U2PQ327Te7TJvaCXLS3mI9QC/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lWHPkRF0LfvlrYPVvWSrLUpFpAbWSR3jBpD7jZb+yqZ6y3bG/JR/?= =?us-ascii?Q?aN3y7kTN8tvzZWzEuuLoTyhYqNm5eaoOHhnqO9dR0w8Y18olwHba7efC0Rqh?= =?us-ascii?Q?tJSWO3wFcA0wYAVdu2XaXSvSfaz7h5jePUfJTN27002ax8zJG6ruSMG2XXey?= =?us-ascii?Q?4LCMyZGEnHDJODzDQEi1AYsnUodHKyp+GntW0vYd9iABKdfBpsXDfgCgtc7M?= =?us-ascii?Q?nvip/18w1ZiYftPzngnAYbnkoejn57GYWH0lSj3AVMHwR2nLKzd9muGUtPLg?= =?us-ascii?Q?ERhuPnZkF6rMhRlrX2N5cNAmD4Aeaj7J0wSFXDI2wC1PvC+imFzHsrwlb41B?= =?us-ascii?Q?NcV9wLrP+6J3ki+2FKmnMx9OyCn7t7G0XiLG18L//bia8HJ7uilnFtRw1Ntn?= =?us-ascii?Q?uP9ZokkwE/WRc3ctk1zik2XzFHth93ZWLoMkOMtV?= 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: 0753255f-7a6e-4021-35ea-08da84a7ab18 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Aug 2022 01:34:49.0773 (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: zF/kByaNWexHngda38LjES+Km1BQaZfvoGtXGtmgV3mQNIZGWFG40YUpuUCBWfsM9tuz0hYwDfwsGp7889IBFA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB1716 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 August 22, 2022 4:52 PM, Gerd Hoffmann wrote: > On Mon, Aug 22, 2022 at 10:23:01AM +0800, Min Xu wrote: > > From: Min M Xu > > > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3974 > > > > Ovmf work-area (PcdOvmfWorkArea) was designed to store the > > Confidential Computing guest information, including the CC guest type. > > This information will be probed by CcProbeLib so that the CC guest > > type can be determined in run-time. But the Ovmf work-area was > > reserved as BT_Data so that it cannot be accessed after > > ExitBootService. Please see the detailed analysis in BZ#3974. > > > > RH also reports a similar bug. Please see: > > https://bugzilla.redhat.com/show_bug.cgi?id=3D2114858 > > > > This patch reserves the work-area as RT_Data to fix this bug. >=20 > Seems to not be enough, I still see the page fault. > Maybe EfiConvertPointer() is needed at runtime? >=20 Ah, I forget to reserve the work-area as RT_Data in below code: BuildMemoryAllocationHob ( (EFI_PHYSICAL_ADDRESS)(UINTN)FixedPcdGet32 (PcdOvmfWorkAreaBase), (UINT64)(UINTN)FixedPcdGet32 (PcdOvmfWorkAreaSize), PlatformInfoHob->S3Supported ? EfiACPIMemoryNVS : EfiRuntimeService= sData <-- ACPI_NVS is not accessible either in OS-Runtime. ); https://github.com/tianocore/edk2/blob/master/OvmfPkg/Library/PlatformInitL= ib/MemDetect.c#L1022-L1026 Gerd, do you think we can reserve Ovmf WorkArea as RT_Data even when S3 is = supported? Thanks Min