[Qemu-devel] [PATCH v2 0/3] Simplify some not-really-necessary PCI bus callbacks

David Gibson posted 3 patches 6 years, 6 months ago
Test checkpatch passed
Test asan passed
Test docker-clang@ubuntu passed
Test docker-mingw@fedora passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190424041959.4087-1-david@gibson.dropbear.id.au
Maintainers: David Gibson <david@gibson.dropbear.id.au>, "Michael S. Tsirkin" <mst@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
There is a newer version of this series
hw/pci-bridge/pci_expander_bridge.c |  6 ----
hw/pci/pci.c                        | 55 +++++++++++++----------------
hw/pci/pci_host.c                   | 13 ++-----
hw/pci/pcie_host.c                  | 10 ------
hw/ppc/spapr_pci.c                  | 34 ++++++------------
hw/virtio/virtio-pci.c              |  1 +
include/hw/pci/pci.h                |  2 --
include/hw/pci/pci_bus.h            | 21 +++++++++--
8 files changed, 58 insertions(+), 84 deletions(-)
[Qemu-devel] [PATCH v2 0/3] Simplify some not-really-necessary PCI bus callbacks
Posted by David Gibson 6 years, 6 months ago
c2077e2c "pci: Adjust PCI config limit based on bus topology"
introduced checking the availability of extended config space for
PCI-E devices which are in a bus topology that doesn't permit extended
config space access (e.g. under PCI-E to PCI then PCI to PCI-E
bridges).

This caused some problems for the spapr para-virtual PCI bus which
_does_ allow extended config space access, despite acting in most ways
like a vanilla PCI bus.

Greg Kurz made a fix for that which was merged as 1c685a90263 "pci:
Allow PCI bus subtypes to support extended config space accesses".
While that was an appropriate minimal fix for the 4.0 hard freeze, it
was kind of a hack longer term.

This series implements a simpler way of handling the extended config
space permission, which works for both the normal and weird-PAPR
cases.  While we're there, we also make other small cleanups to the
PCI code.

David Gibson (3):
  pcie: Remove redundant test in pcie_mmcfg_data_{read,write}()
  pci: Simplify pci_bus_is_root()
  pcie: Simplify pci_adjust_config_limit()

 hw/pci-bridge/pci_expander_bridge.c |  6 ----
 hw/pci/pci.c                        | 55 +++++++++++++----------------
 hw/pci/pci_host.c                   | 13 ++-----
 hw/pci/pcie_host.c                  | 10 ------
 hw/ppc/spapr_pci.c                  | 34 ++++++------------
 hw/virtio/virtio-pci.c              |  1 +
 include/hw/pci/pci.h                |  2 --
 include/hw/pci/pci_bus.h            | 21 +++++++++--
 8 files changed, 58 insertions(+), 84 deletions(-)

-- 
2.20.1