From c9b0ea544d84a1b9d8f920759761083e952fd8b9 Mon Sep 17 00:00:00 2001 From: Xiong Zhang Date: Tue, 23 Apr 2019 17:14:46 +0800 Subject: [PATCH] devices: pci: Change host brige into Intel For kvmgt linux guest, intel graphic driver i915 need intel host bridge located at 0000:00.0, so this patch change the vendor id of 0000:00.0 device to intel. BUG=none TEST=none Change-Id: I52f2341d25859f2b7d4a3837f4f0c8a4b2443525 Signed-off-by: Xiong Zhang Signed-off-by: Daniel Verkamp Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1581139 Reviewed-by: Dylan Reid Tested-by: kokoro --- devices/src/pci/pci_root.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/devices/src/pci/pci_root.rs b/devices/src/pci/pci_root.rs index 1ddd3d7617..205524aad1 100644 --- a/devices/src/pci/pci_root.rs +++ b/devices/src/pci/pci_root.rs @@ -47,14 +47,17 @@ pub struct PciRoot { devices: Vec>>, } +const PCI_VENDOR_ID_INTEL: u16 = 0x8086; +const PCI_DEVICE_ID_INTEL_82441: u16 = 0x1237; + impl PciRoot { /// Create an empty PCI root bus. pub fn new() -> Self { PciRoot { root_configuration: PciRootConfiguration { config: PciConfiguration::new( - 0, - 0, + PCI_VENDOR_ID_INTEL, + PCI_DEVICE_ID_INTEL_82441, PciClassCode::BridgeDevice, &PciBridgeSubclass::HostBridge, None,