Skip to content

qtests/libqos: Allow PCI tests to be run with virt-machine

Eric Auger qemu-arm qemu-devel 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest3 patches 3 repliesIn review
  2. v53 patches 0 repliesSuperseded
  3. v44 patches 3 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v35 patches6 repliesSuperseded
v26 patches7 repliesSuperseded
v16 patches8 repliesSuperseded

Changes in v6 from the cover letter

- change the libqtest.h header path after pull of
"tests: move libqtest.h back under qtest/"

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3tests/qtest/libqos/pci: Introduce pio_limittests/qtest/libqos/pci-pc.c tests/qtest/libqos/pci-spapr.c tests/qtest/libqos/pci.c +1 more+54 -310 replies
2/3tests/qtest/libqos: Skip hotplug tests if pci root bus is not hotpluggabletests/qtest/e1000e-test.c tests/qtest/libqos/pci.h tests/qtest/vhost-user-blk-test.c +3 more+32 -00 replies
3/3tests/qtest/libqos: Add generic pci host bridge in arm-virt machinetests/qtest/libqos/arm-virt-machine.c tests/qtest/libqos/generic-pcihost.c tests/qtest/libqos/generic-pcihost.h +1 more+301 -42 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchThomas HuthAlex Bennée
1/3R-b R-b
2/3A-b R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH v6 0/3] qtests/libqos: Allow PCI tests to be run with virt-machine

Up to now the virt-machine node only contains a virtio-mmio driver node but no driver that eventually produces any pci-bus interface.

Hence, PCI libqos tests cannot be run with aarch64 binary.

This series brings the pieces needed to be able to run PCI tests with the aarch64 binary: a generic-pcihost driver node gets instantiated by the machine. This later contains a pci-bus-generic driver which produces a pci-bus interface. Then all tests consuming the pci-bus interface can be run with the libqos arm virt machine.

One of the first goal was to be able to run the virtio-iommu-pci tests as the virtio-iommu was initially targetting ARM and it was awkard to run the tests with the pc machine. This is now possible.

Only the tests doing hotplug cannot be run yet as hotplug is not possible on the root bus. This will be dealt with separately by adding a root port to the object tree.

Best Regards

Eric

This series can be found at:
https://github.com/eauger/qemu/tree/libqos-pci-arm-v6

History

v5 -> v6:
- change the libqtest.h header path after pull of
"tests: move libqtest.h back under qtest/"

v4 -> v5:
- Added Alex' R-b
- Removed [PATCH v3 4/5] tests/qtest/vhost-user-blk-test:
Temporary hack to get tests passing on aarch64 following Alex' fix

v3 -> v4:
- handle endianess when accessing the cfg space (fix PPC64 BE failure). Tested on such machine.

v2 -> v3:
- force -cpu=max along with aarch64/virt
- reduced the vhost-user-block-pci issue workaround to a single guest_alloc() instead of enabling MSIs. Call for help on this specific issue. The 2 tests which fail are:
test_basic and indirect.

v1 -> v2:
- copyright updated to 2022
- QPCIBusARM renamed into QGenericPCIBus
- QGenericPCIHost declarations and definitions moved in the same place as the generic pci implementation
- rename pci-arm.c/h in generic-pcihost.c/h and remove any ref to ARM there
- remove qos_node_produces_opts, qpci_new_arm, qpci_free_arm
- ecam_alloc_ptr now is a field of QGenericPCIBus and not QPCIBus
- new libqos_init to create generic-pcihost driver that contains pci-bus-generic
- QGenericPCIHost moved in the same place as the generic pci bindings
- collected Thomas A-b/R-b

Eric Auger (3):
tests/qtest/libqos/pci: Introduce pio_limit tests/qtest/libqos: Skip hotplug tests if pci root bus is not
hotpluggable
tests/qtest/libqos: Add generic pci host bridge in arm-virt machine

 tests/qtest/e1000e-test.c             |   6 +
 tests/qtest/libqos/arm-virt-machine.c |  19 ++-
 tests/qtest/libqos/generic-pcihost.c  | 231 ++++++++++++++++++++++++++
 tests/qtest/libqos/generic-pcihost.h  |  54 ++++++
 tests/qtest/libqos/meson.build        |   1 +
 tests/qtest/libqos/pci-pc.c           |   1 +
 tests/qtest/libqos/pci-spapr.c        |   1 +
 tests/qtest/libqos/pci.c              |  78 +++++----
 tests/qtest/libqos/pci.h              |   6 +-
 tests/qtest/vhost-user-blk-test.c     |  10 ++
 tests/qtest/virtio-blk-test.c         |   5 +
 tests/qtest/virtio-net-test.c         |   5 +
 tests/qtest/virtio-rng-test.c         |   5 +
 13 files changed, 387 insertions(+), 35 deletions(-)
 create mode 100644 tests/qtest/libqos/generic-pcihost.c
 create mode 100644 tests/qtest/libqos/generic-pcihost.h
Signature · 1 line
2.35.1