From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web12.5694.1624958435524926478 for ; Tue, 29 Jun 2021 02:20:35 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PN3AIYaK; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624958434; 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=GyzZxRG9s5TuaH1W236GEk/k0EbRjcOtM6zbFBKzyok=; b=PN3AIYaKxGL/zO+6dLs5/P+A7aD4Zo0W2897jdPV2PyZ7IHi4G6HTRnzhrL4zEXro5HgEi U7mUYQXFe7KJSfxDeOxc6vLlz7i6o1F/j9Tdj9ByB+OiDYqUExDixhqfT2EKlEQBGJ3LUc Qw5Fevwskua04u1eigla3aG3YdUY2f8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-370-f7TcQ6n5P_ul8n2zLrj-Xw-1; Tue, 29 Jun 2021 05:20:31 -0400 X-MC-Unique: f7TcQ6n5P_ul8n2zLrj-Xw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 988541922962; Tue, 29 Jun 2021 09:20:30 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-114-158.ams2.redhat.com [10.36.114.158]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6F189E2DD; Tue, 29 Jun 2021 09:20:29 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH] OvmfPkg/XenPlatformPei: Relocate shared_info page mapping To: devel@edk2.groups.io, anthony.perard@citrix.com Cc: Ard Biesheuvel , Jan Beulich , Andrew Cooper References: <20210628132337.46345-1-anthony.perard@citrix.com> From: "Laszlo Ersek" Message-ID: <4d4af77a-8d70-d473-179f-14b3cbc0e6fd@redhat.com> Date: Tue, 29 Jun 2021 11:20:28 +0200 MIME-Version: 1.0 In-Reply-To: <20210628132337.46345-1-anthony.perard@citrix.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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. Thanks Laszlo