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; Wed, 10 Jul 2019 02:50:11 -0700 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3B494308338E; Wed, 10 Jul 2019 09:50:11 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-117-153.ams2.redhat.com [10.36.117.153]) by smtp.corp.redhat.com (Postfix) with ESMTP id BD7221001B1B; Wed, 10 Jul 2019 09:50:09 +0000 (UTC) Subject: Re: [PATCH v3 29/35] OvmfPkg/PlatformBootManagerLib: Handle the absence of PCI bus on Xen PVH 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-30-anthony.perard@citrix.com> From: "Laszlo Ersek" Message-ID: <1cddaea8-dd2d-b55a-456c-e9435c36f4cf@redhat.com> Date: Wed, 10 Jul 2019 11:50:08 +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-30-anthony.perard@citrix.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Wed, 10 Jul 2019 09:50:11 +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: > When running in a Xen PVH guest, there's nothing to do in > PciAcpiInitialization() because there isn't any PCI bus. When the Host > Bridge DID isn't recognised, simply continue. (The value of > PcdOvmfHostBridgePciDevId would be 0 because it isn't set.) > > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689 > Signed-off-by: Anthony PERARD > --- > > Notes: > v3: > - Instead of checking for a false value, > XEN_PVH_PCI_HOST_BRIDGE_DEVICE_ID, simply check if we are running xen > when the HostBridge device ID isn't recognised. > > OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c > index e32969e63e..9ae590293a 100644 > --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c > +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c > @@ -1209,6 +1209,12 @@ PciAcpiInitialization ( > PciWrite8 (PCI_LIB_ADDRESS (0, 0x1f, 0, 0x6b), 0x0b); // H > break; > default: > + if (XenDetected ()) { > + // > + // There is no PCI bus in this case. > + // > + return; > + } > DEBUG ((EFI_D_ERROR, "%a: Unknown Host Bridge Device ID: 0x%04x\n", > __FUNCTION__, mHostBridgeDevId)); > ASSERT (FALSE); > Reviewed-by: Laszlo Ersek