diff mbox series

[v3,26/35] OvmfPkg/XenPlatformPei: Ignore missing PCI Host Bridge on Xen PVH

Message ID 20190704144233.27968-27-anthony.perard@citrix.com (mailing list archive)
State Superseded
Headers show
Series Specific platform to run OVMF in Xen PVH and HVM guests | expand

Commit Message

Anthony PERARD July 4, 2019, 2:42 p.m. UTC
When the device ID of the host bridge is unknown, check if we are
running as a PVH guest as there is no PCI bus in that case.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---

Notes:
    v3:
    - Remove use of XEN_PVH_PCI_HOST_BRIDGE_DEVICE_ID, and simply don't set
      PcdOvmfHostBridgePciDevId.
    
    v2:
    - Use new XEN_PVH_PCI_HOST_BRIDGE_DEVICE_ID macro

 OvmfPkg/XenPlatformPei/Platform.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Laszlo Ersek July 8, 2019, 3:31 p.m. UTC | #1
On 07/04/19 16:42, Anthony PERARD wrote:
> When the device ID of the host bridge is unknown, check if we are
> running as a PVH guest as there is no PCI bus in that case.
> 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> ---
> 
> Notes:
>     v3:
>     - Remove use of XEN_PVH_PCI_HOST_BRIDGE_DEVICE_ID, and simply don't set
>       PcdOvmfHostBridgePciDevId.
>     
>     v2:
>     - Use new XEN_PVH_PCI_HOST_BRIDGE_DEVICE_ID macro
> 
>  OvmfPkg/XenPlatformPei/Platform.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/OvmfPkg/XenPlatformPei/Platform.c b/OvmfPkg/XenPlatformPei/Platform.c
> index 52f6048ca4..b7fc30d2ee 100644
> --- a/OvmfPkg/XenPlatformPei/Platform.c
> +++ b/OvmfPkg/XenPlatformPei/Platform.c
> @@ -272,6 +272,12 @@ MiscInitialization (
>        AcpiEnBit  = ICH9_ACPI_CNTL_ACPI_EN;
>        break;
>      default:
> +      if (XenPvhDetected ()) {
> +        //
> +        // 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);
> 

Acked-by: Laszlo Ersek <lersek@redhat.com>
diff mbox series

Patch

diff --git a/OvmfPkg/XenPlatformPei/Platform.c b/OvmfPkg/XenPlatformPei/Platform.c
index 52f6048ca4..b7fc30d2ee 100644
--- a/OvmfPkg/XenPlatformPei/Platform.c
+++ b/OvmfPkg/XenPlatformPei/Platform.c
@@ -272,6 +272,12 @@  MiscInitialization (
       AcpiEnBit  = ICH9_ACPI_CNTL_ACPI_EN;
       break;
     default:
+      if (XenPvhDetected ()) {
+        //
+        // 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);