Bug 87591
Summary: | Host will call trace when loading igbvf. | ||
---|---|---|---|
Product: | Drivers | Reporter: | Zhou, Chao (chao.zhou) |
Component: | PCI | Assignee: | drivers_pci (drivers_pci) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | bjorn, bonzini, yinghai |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 3.18.0-rc2 | Subsystem: | |
Regression: | Yes | Bisected commit-id: |
Description
Zhou, Chao
2014-11-03 01:58:52 UTC
the first bad commit is: commit 6cd33649fa83d97ba7b66f1d871a360e867c5220 Author: Bjorn Helgaas <bhelgaas@google.com> Date: Wed Aug 27 14:29:47 2014 -0600 PCI: Add pci_configure_device() during enumeration Some platforms can tell the OS how to configure PCI devices, e.g., how to set cache line size, error reporting enables, etc. ACPI defines _HPP and _HPX methods for this purpose. This configuration was previously done by some of the hotplug drivers using pci_configure_slot(). But not all hotplug drivers did this, and per the spec (ACPI rev 5.0, sec 6.2.7), we can also do it for "devices not configured by the BIOS at system boot." Move this configuration into the PCI core by adding pci_configure_device() and calling it from pci_device_add(), so we do this for all devices as we enumerate them. This is based on pci_configure_slot(), which is used by hotplug drivers. I omitted: - pcie_bus_configure_settings() because it configures MPS and MRRS, which requires global knowledge of the fabric and must be done later, and - configuration of subordinate devices; that will happen when we call pci_device_add() for those devices. Because pci_configure_slot() was only done by hotplug drivers, this initial version of pci_configure_device() only configures hot-added devices, ignoring anything added during boot. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Yinghai Lu <yinghai@kernel.org> test the bug with commit:d3fccc7ef831d1d829b4da5eaa081db55b1e38f3(kvm.git master branch) kernel version: 3.18.0-rc6+ after loading igbvf, the host works fine. this commit fixed the bug: commit 32f638fc11db0526c706454d9ab4339d55ac89f3 Author: Yinghai Lu <yinghai@kernel.org> Date: Thu Oct 30 10:17:25 2014 -0600 PCI: Don't oops on virtual buses in acpi_pci_get_bridge_handle() acpi_pci_get_bridge_handle() returns the ACPI handle for the bridge device (either a host bridge or a PCI-to-PCI bridge) leading to a PCI bus. But SR-IOV virtual functions can be on a virtual bus with no bridge leading to it. Return a NULL acpi_handle in this case instead of trying to dereference the NULL pointer to the bridge. This fixes a NULL pointer dereference oops in pci_get_hp_params() when adding SR-IOV VF devices on virtual buses. [bhelgaas: changelog, add comment in code] Fixes: 6cd33649fa83 ("PCI: Add pci_configure_device() during enumeration") Link: https://bugzilla.kernel.org/show_bug.cgi?id=87591 Reported-by: Chao Zhou <chao.zhou@intel.com> Reported-by: Joerg Roedel <joro@8bytes.org> Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> |