From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [194.104.111.102]) by mx.groups.io with SMTP id smtpd.web12.6043.1624961233751673409 for ; Tue, 29 Jun 2021 03:07:14 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@suse.com header.s=mimecast20200619 header.b=MbEH1YV6; spf=pass (domain: suse.com, ip: 194.104.111.102, mailfrom: jbeulich@suse.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1624961231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GzJmNK2/A57ZlJktqWnKNzNAraO8WQb7FYwVSy2KEAk=; b=MbEH1YV68mV6W5F53pY1lO309c+VMQFU22fSfSVWA1zo+GYnfc4LTw7MvCh5VxSmRi0Og5 fFBpKcUkxqQFiphAblJe5nhoyOjTG2XWcmYmWsYXyrcrGniZjs2c80pfGzJrVscLQJoPv7 vsZx7PLDOvY8fW/ssVJRtiWltA1Nz/w= Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04lp2057.outbound.protection.outlook.com [104.47.13.57]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-2-KbeHiCSCPOSr6LrHfwxwAA-1; Tue, 29 Jun 2021 12:07:09 +0200 X-MC-Unique: KbeHiCSCPOSr6LrHfwxwAA-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fEahfSxCBukJKb4bNYoDU/XNG8ym7gh0MeSW/j/j7PG3/3NDTON0qzsKEH8IWT90XL8SJpBH0JTR2DXAztQCuK+DDh3yaa1ylKsEPsXhOZYMtS7zXDF5gCAK3ToVXd+W0wxYHObAYPK2c/QMZjsvph4XKZaZJtk/HA7syYCIOd4bC/x0StcIPUid6COGeyqDKJ6HKv4cyAj0xLHDi+Eln3Ww8jk49kUhrBMlHAT0hBL93bpzEcpzxnylT4ebF9nZpPNCR2LiL+4xk4cQCQetRXEjt5jBSzRh9gYPpqmp8VLOFsmcB4njXYRYexiPYLfJTdKAhIxAjcJzukXUaLVIPQ== 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-SenderADCheck; bh=GzJmNK2/A57ZlJktqWnKNzNAraO8WQb7FYwVSy2KEAk=; b=a4ZOOU8J/eMXCoKLa6thpcLt6I7I3EMzktEjGP/1Z67DU7G3H4TJaJ6O8+8yuTHVPjE8zrSDkFrFpRYZ/6iXjQsDpi7EJHRHeuRphhPS1jHsIisn9kHIg70XDlG5gU3XeyhOYBz+qtRxVPeTrdBP3LG0sZgaW0t8xWhvH6Gi09hM7TJl1/U1so7DO/RcXL5MbQuFvC4I9FHmU5gMAOH3JLfGxFtUzJGM+Fanv+F+KgdNt6I6NO5JwfbB8AwfTMnKRI4OoxaN/C4CwPxPCfffmoI9VIAGtsb9r5ag+kMyHUUYtxjRrhJLLWpwTwesU8R2OiyO/TvZTypq37FUW+cSJQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: citrix.com; dkim=none (message not signed) header.d=none;citrix.com; dmarc=none action=none header.from=suse.com; Received: from VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) by VI1PR04MB6863.eurprd04.prod.outlook.com (2603:10a6:803:12f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.19; Tue, 29 Jun 2021 10:07:07 +0000 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::99d3:99cd:8adf:3eea]) by VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::99d3:99cd:8adf:3eea%5]) with mapi id 15.20.4264.026; Tue, 29 Jun 2021 10:07:07 +0000 Subject: Re: [edk2-devel] [PATCH] OvmfPkg/XenPlatformPei: Relocate shared_info page mapping To: Laszlo Ersek Cc: Ard Biesheuvel , Andrew Cooper , devel@edk2.groups.io, anthony.perard@citrix.com References: <20210628132337.46345-1-anthony.perard@citrix.com> <4d4af77a-8d70-d473-179f-14b3cbc0e6fd@redhat.com> From: Jan Beulich Message-ID: Date: Tue, 29 Jun 2021 12:07:05 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 In-Reply-To: <4d4af77a-8d70-d473-179f-14b3cbc0e6fd@redhat.com> X-Originating-IP: [37.24.206.209] X-ClientProxiedBy: FR0P281CA0042.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:48::9) To VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) Return-Path: jbeulich@suse.com MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [10.156.60.236] (37.24.206.209) by FR0P281CA0042.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:48::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.8 via Frontend Transport; Tue, 29 Jun 2021 10:07:06 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4d3e36a1-878c-4930-aed9-08d93ae5a6b3 X-MS-TrafficTypeDiagnostic: VI1PR04MB6863: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ozduA27HSTybG3w12oxW2hjT9I/3e9U9WGmHX9lL5Go8h0m2sqg9i1TUGG2cL0Le+a9dd05nhLJVBmRTMg7zTqt+4EzaB3LqCKhLypTqR39mxEhbAmcKy7rC9mle+zFlmaVbx0GLVKa02mj1C9FmoLvGd8pTrtSfCeX+PNwWO5bnow9FBdaB10Im9d5ZZ0LLdCyGC7/OfYqDDma12s9MByPZ83viYEcpshpnbRm0g2C2qJXWuEnKcKoC2uzuPgboYD/DvM2FdoAAD6umOPiU9oMOCyq4z0ZY01m9CvpfZd/0jnJMA0xzpOd9cXoniHA524U3B66eA+yD9xn0MYZQhljO7+VS9aJ05vWxLfkileeLF04lBM/mFZp92AkR03Hwg5sCvh1WUOSFYgxmcDa1oKXkH9MUIQF2M8hr6RKZspFYb1Cfy4a/TMdk3PgDB9odaeZli75wSfeYSBiuzVcXYS/5COP1StqaYuRFMNfGvGYAgbLoQk+Htlr0Eiq5DK7yFZx+CZppZ3LAo8jEhLknamEpVIBmlrdYenkVgE1A20vMd1MFnrFV8H6eyKten8JeMb48YPKJYEL+xiBEZQ1BZMZYinG02+dqpyXl2FpiX+4qR73x9BbAtpy4mEZs1R14LF8ha3sYt2mTvJoILL8bFY3Ktr5nMkKB1dT3kdikU6EHGxpmA0p8pVuBJ7wQQPB9VJWkIlljMSujVdJx/3eTaHNEnitxXpQPlJM/pVFw2rfzo30sQQjhQtPNd1oGynARP3POcGoqYwbysv7t8PogiTXXESKKMQRp5O+Qx086ZrVH3dJoR27raMl81z2H9OGXn4Ia+q7xh7F6Nl1q4F+46+zoqS3Q3yWyGbWlopyqh5M= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5600.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(376002)(396003)(39850400004)(346002)(136003)(2906002)(31696002)(966005)(5660300002)(86362001)(8936002)(478600001)(38100700002)(66556008)(66946007)(186003)(316002)(66476007)(16526019)(956004)(6916009)(6486002)(83380400001)(53546011)(16576012)(54906003)(31686004)(2616005)(4326008)(26005)(8676002)(36756003)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-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B1Rk03cVF0NkpFNUZCSHJhVis4?= =?utf-8?Q?l2xIIDC8Gn7regSGv22VcSY3kF/3b7ZI3tQsSsG?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4d3e36a1-878c-4930-aed9-08d93ae5a6b3 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5600.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2021 10:07:06.9320 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4k47n/6J2H52vN+45BI6FjhmIpD2x8zyRoxfKYONrsVW7wal5YHlA+ljr0Ue8SiOrFkFnRkTlnq7uLXb/ToK3Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6863 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 29.06.2021 11:20, Laszlo Ersek wrote: > On 06/28/21 15:23, Anthony PERARD via groups.io wrote: >> From: Anthony PERARD >> >> Unfortunately, Xen isn't ready to deal with mapping at the top of the >> physical address space, so we relocate the mapping after the LAPIC >> location. >> >> See this thread about the issue with the mapping: >> - https://lore.kernel.org/xen-devel/f8c4151a-6dac-d87c-ef46-eb35ada07bd9@suse.com/ >> >> The PhysicalAddressIdentityMapping() call isn't going to do anything >> anymore since everything under 4GB is already mapped, but there is no >> need to remove the call. >> >> CC: Jan Beulich >> CC: Andrew Cooper >> Signed-off-by: Anthony PERARD >> --- >> OvmfPkg/XenPlatformPei/Xen.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/OvmfPkg/XenPlatformPei/Xen.c b/OvmfPkg/XenPlatformPei/Xen.c >> index a4e82b356936..9c6641895970 100644 >> --- a/OvmfPkg/XenPlatformPei/Xen.c >> +++ b/OvmfPkg/XenPlatformPei/Xen.c >> @@ -569,7 +569,7 @@ CalibrateLapicTimer ( >> EFI_STATUS Status; >> >> >> - SharedInfo = (VOID*)((1ULL << mPhysMemAddressWidth) - EFI_PAGE_SIZE); >> + SharedInfo = (VOID*)((UINTN)PcdGet32 (PcdCpuLocalApicBaseAddress) + SIZE_1MB); >> Status = PhysicalAddressIdentityMapping ((EFI_PHYSICAL_ADDRESS)SharedInfo); >> if (EFI_ERROR (Status)) { >> DEBUG ((DEBUG_ERROR, >> > > Acked-by: Laszlo Ersek > > I guess I should merge this after Jan and/or Andrew ack it. Well, I can informally ack that a move like this is needed, but I can't really give an Acked-by on the change, as I know next to nothing about ovmf, and hence I cannot, for example, tell whether the chosen new location is okay to use there. Jan