From 127a90ff3ea1894cf187d3026fe98db5130aff49 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Mon, 13 Sep 2021 13:34:34 -0700 Subject: [PATCH] linux: disable PCI to PCI bridge The presence of the PCI bridge introduces a regression when booting OVMF: PciHostBridgeDxe: IntersectMemoryDescriptor: desc [0, A0000) type 2 cap 800000000002600F conflicts with aperture [0, D0021000) cap 1 The root cause is that the bridge does not correctly populate the memory base/limit and prefetchable memory base/limit PCI bridge configuration registers. For the short term, since this bridge is only needed for the PCI hotplug feature that is not enabled yet, remove the creation of the bridge from the startup code. Fixing the bridge will be done in another commit to keep this change small and easy to backport. BUG=b:199442120 BUG=b:185084350 TEST=crosvm run --bios OVMF.fd Change-Id: I91b2cc6628e320ac2403bd8b74d18ef5a26d7c0f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3158942 Reviewed-by: Xiong Zhang Reviewed-by: Dennis Kempin Tested-by: kokoro Commit-Queue: Daniel Verkamp --- src/linux.rs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/linux.rs b/src/linux.rs index 73ae11a838..422ffa1758 100644 --- a/src/linux.rs +++ b/src/linux.rs @@ -47,9 +47,8 @@ use devices::virtio::{ use devices::Ac97Dev; use devices::ProtectionType; use devices::{ - self, HostHotPlugKey, IrqChip, IrqEventIndex, KvmKernelIrqChip, PciAddress, PciBridge, - PciDevice, PcieRootPort, VcpuRunState, VfioContainer, VfioDevice, VfioPciDevice, - VirtioPciDevice, + self, HostHotPlugKey, IrqChip, IrqEventIndex, KvmKernelIrqChip, PciAddress, PciDevice, + VcpuRunState, VfioContainer, VfioDevice, VfioPciDevice, VirtioPciDevice, }; #[cfg(feature = "usb")] use devices::{HostBackendDeviceProvider, XhciController}; @@ -1649,14 +1648,6 @@ fn create_devices( pci_devices.push((usb_controller, simple_jail(cfg, "xhci")?)); } - // Create Pcie Root Port - let pcie_root_port = Box::new(PcieRootPort::new()); - let (msi_host_tube, msi_device_tube) = Tube::pair().map_err(Error::CreateTube)?; - control_tubes.push(TaggedControlTube::VmIrq(msi_host_tube)); - let pci_bridge = Box::new(PciBridge::new(pcie_root_port, msi_device_tube)); - // pcie root port is used in hotplug process only, so disable sandbox for it - pci_devices.push((pci_bridge, None)); - if !cfg.vfio.is_empty() { let mut iommu_attached_endpoints: BTreeMap>> = BTreeMap::new();