From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Mon, 08 Jul 2019 07:42:44 -0700 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2453E3092669; Mon, 8 Jul 2019 14:42:34 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-117-3.ams2.redhat.com [10.36.117.3]) by smtp.corp.redhat.com (Postfix) with ESMTP id C82405C26C; Mon, 8 Jul 2019 14:42:30 +0000 (UTC) Subject: Re: [PATCH v3 15/35] OvmfPkg/AcpiPlatformDxe: Use Xen PVH RSDP if it exist To: Anthony PERARD , devel@edk2.groups.io Cc: xen-devel@lists.xenproject.org, Ard Biesheuvel , Jordan Justen , Julien Grall References: <20190704144233.27968-1-anthony.perard@citrix.com> <20190704144233.27968-16-anthony.perard@citrix.com> From: "Laszlo Ersek" Message-ID: <648a9322-2dda-28b9-cb98-4d763ec9e248@redhat.com> Date: Mon, 8 Jul 2019 16:42:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190704144233.27968-16-anthony.perard@citrix.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Mon, 08 Jul 2019 14:42:39 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 07/04/19 16:42, Anthony PERARD wrote: > If the firmware have been started via the Xen PVH entry point, a RSDP > pointer would have been provided. Use it. > > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689 > Signed-off-by: Anthony PERARD > --- > > Notes: > v3: > - patch splited from the previous one > - Fix DEBUG format string, use %p for pointers. > and use gEfiCallerBaseName to print module name > > OvmfPkg/AcpiPlatformDxe/Xen.c | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > > diff --git a/OvmfPkg/AcpiPlatformDxe/Xen.c b/OvmfPkg/AcpiPlatformDxe/Xen.c > index 82794b933e..376a6bd3cb 100644 > --- a/OvmfPkg/AcpiPlatformDxe/Xen.c > +++ b/OvmfPkg/AcpiPlatformDxe/Xen.c > @@ -36,10 +36,27 @@ GetXenAcpiRsdp ( > EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER *RsdpStructurePtr; > UINT8 *XenAcpiPtr; > UINT8 Sum; > + EFI_XEN_INFO *XenInfo; > > // > // Detect the RSDP structure > // > + > + // > + // First look for PVH one > + // > + XenInfo = XenGetInfoHOB (); > + ASSERT (XenInfo != NULL); > + if (XenInfo->RsdpPvh != NULL) { > + DEBUG ((DEBUG_INFO, "%a: Use ACPI RSDP table at 0x%p\n", > + gEfiCallerBaseName, XenInfo->RsdpPvh)); (1) Please fix the indentation here; "gEfiCallerBaseName" should start under the "B" in "DEBUG". With that updated: Reviewed-by: Laszlo Ersek Thanks Laszlo > + *RsdpPtr = XenInfo->RsdpPvh; > + return EFI_SUCCESS; > + } > + > + // > + // Otherwise, look for the HVM one > + // > for (XenAcpiPtr = (UINT8*)(UINTN) XEN_ACPI_PHYSICAL_ADDRESS; > XenAcpiPtr < (UINT8*)(UINTN) XEN_BIOS_PHYSICAL_END; > XenAcpiPtr += 0x10) { >