Message ID | 20190729153944.24239-29-anthony.perard@citrix.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Specific platform to run OVMF in Xen PVH and HVM guests | expand |
On Mon, Jul 29, 2019 at 04:39:37PM +0100, 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.) I guess we will need to figure out how to make OVMF happy when passthrough support is added to PVH. Having to fake a bridge is quite cumbersome, but I assume OVMF only pokes at some specific bridge registers which we might be able to emulate without much fuss. Thanks, Roger.
diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c index d5d5d20fd8..1eba304f09 100644 --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c @@ -1208,6 +1208,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);