[Qemu-devel] [RFC for-4.1 0/5] Simplify some not-really-necessary PCI bus callbacks

David Gibson posted 5 patches 4 years, 12 months ago
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Test checkpatch passed
Test asan passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190402054028.20926-1-david@gibson.dropbear.id.au
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, David Gibson <david@gibson.dropbear.id.au>, 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                        | 40 ++++++++++++++++++++++-------
hw/pci/pci_host.c                   | 13 +++-------
hw/pci/pcie_host.c                  |  5 ----
hw/ppc/spapr_pci.c                  | 20 ++++++++++++++-
hw/virtio/virtio-pci.c              |  1 +
include/hw/pci/pci.h                |  3 ++-
include/hw/pci/pci_bus.h            | 14 +++++++++-
8 files changed, 69 insertions(+), 33 deletions(-)
[Qemu-devel] [RFC for-4.1 0/5] Simplify some not-really-necessary PCI bus callbacks
Posted by David Gibson 4 years, 12 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 has posted a proposed fix for that against qemu-4.0 - for
easy reference I've included that as the first two patches of this
series.

The rest of the series simplfies both the PCI-E config space access
and pci_bus_is_root() logic, using a new flags field on the PCI Bus
instance.

David Gibson (3):
  pcie: Remove redundant test in pcie_mmcfg_data_read()
  pci: Simplify pci_bus_is_root()
  pcie: Simplify pci_adjust_config_limit()

Greg Kurz (2):
  pci: Allow PCI bus subtypes to support extended config space accesses
  spapr_pci: Fix extended config space accesses

 hw/pci-bridge/pci_expander_bridge.c |  6 -----
 hw/pci/pci.c                        | 40 ++++++++++++++++++++++-------
 hw/pci/pci_host.c                   | 13 +++-------
 hw/pci/pcie_host.c                  |  5 ----
 hw/ppc/spapr_pci.c                  | 20 ++++++++++++++-
 hw/virtio/virtio-pci.c              |  1 +
 include/hw/pci/pci.h                |  3 ++-
 include/hw/pci/pci_bus.h            | 14 +++++++++-
 8 files changed, 69 insertions(+), 33 deletions(-)

-- 
2.20.1