All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 00/10] tests/qtest: pci and MSI-X fixes
@ 2026-08-17 18:55 Jishnu Warrier
  2026-08-17 18:55 ` [PATCH v6 01/10] tests/qtest: Enforce zero for the "un-fired" msix message value Jishnu Warrier
                   ` (8 more replies)
  0 siblings, 9 replies; 11+ messages in thread
From: Jishnu Warrier @ 2026-08-17 18:55 UTC (permalink / raw)
  To: qemu-devel
  Cc: npiggin, philmd, farosas, akihiko.odaki, mst, marcel.apfelbaum,
	david, adityag, harshpb, amachhiw

To: qemu-devel@nongnu.org
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Philippe Mathieu-Daudé <philmd@linaro.org>
Cc: Fabiano Rosas <farosas@suse.de>
Cc: Akihiko Odaki <akihiko.odaki@daynix.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: Aditya Gupta <adityag@linux.ibm.com>
Cc: Harsh Prateek Bora <harshpb@linux.ibm.com>
Cc: Amit Machhiwal <amachhiw@linux.ibm.com>

This series fixes a number of issues in the pci and MSI-X qtest
infrastructure, and adds new functionality.

Nicholas Piggin is the original author of all patches in this series.
This submission takes his v5 posting forward, with the additional
changes described below.

It was originally posted as v5 in May 2025 but was not merged.

Changes since v5
(https://lore.kernel.org/qemu-devel/20250502030446.88310-1-npiggin@gmail.com/):

- Use sizeof(data) instead of literal 4 in qtest_memread/qtest_memset
  calls inside qpci_msix_test_interrupt() [Akihiko Odaki]

- Fix MSI-X capitalisation in the qpci_msix_test_interrupt() doc
  comment (was "msix", now "MSI-X" throughout) [Akihiko Odaki]

- Replace the per-device boolean flags (pci_enabled in AHCIQState,
  enabled in QVirtioPCIDevice) with a bool mapped field on QPCIBar
  itself. qpci_iounmap() is now a graceful no-op when called on a
  bar that was never mapped, removing the need for guards in callers.
  [Akihiko Odaki]

- Remove missed qpci_check_buggy_msi() guard in nvme-test.c

- Fix off-by-one bound check: use barno < QPCI_NUM_REGIONS instead of
  barno <= QPCI_NUM_REGIONS in qpci_bar_reg() and qpci_iomap(); the
  previous condition allowed barno == 6 which is one past the end of
  the 6-element array [Amit Machhiwal]

- Remove redundant memset(&dev->bars_mapped[i], ...) in qpci_iounmap()
  that immediately followed dev->bars_mapped[i] = false [Amit Machhiwal]

- Add explanatory comment before the msix_addr/msix_data != 0
  assertions in qpci_msix_test_interrupt() clarifying that 0 is a
  libqos-internal sentinel value [Amit Machhiwal]

- Remove always-true g_assert_cmpint(entry, >=, 0) assertions on
  uint16_t parameters in qpci_msix_set_entry(), qpci_msix_pending(),
  qpci_msix_masked(), and qpci_msix_set_masked() [Amit Machhiwal]

Nicholas Piggin (10):
  tests/qtest: Enforce zero for the "un-fired" MSI-X message value
  tests/qtest: Fix virtio MSI-X message endianness
  tests/qtest: Add libqos function for testing MSI-X interrupt status
  tests/qtest: Enable spapr dma with linear iommu map
  tests/qtest/ahci: unmap pci bar before reusing device
  tests/qtest/ahci: don't unmap pci bar if it wasn't mapped
  tests/qtest/libquos/pci: Add migration fixup helper for pci devices
  qtest/libqos/pci: Enforce balanced iomap/unmap
  qtest/libqos/pci: Fix qpci_msix_enable sharing bar0
  qtest/libqos/pci: Factor MSI-X entry helpers into pci common code

 hw/ppc/spapr_iommu.c                   |  10 +-
 tests/qtest/ahci-test.c                |   8 +
 tests/qtest/e1000e-test.c              |  21 ---
 tests/qtest/igb-test.c                 |  21 ---
 tests/qtest/libqos/ahci.c              |  12 ++
 tests/qtest/libqos/ahci.h              |   2 +
 tests/qtest/libqos/generic-pcihost.c   |   1 -
 tests/qtest/libqos/pci-pc.c            |   3 -
 tests/qtest/libqos/pci-spapr.c         |   7 +-
 tests/qtest/libqos/pci.c               | 215 ++++++++++++++++++++++---
 tests/qtest/libqos/pci.h               |  21 ++-
 tests/qtest/libqos/virtio-pci-modern.c |  30 +---
 tests/qtest/libqos/virtio-pci.c        |  86 ++--------
 tests/qtest/nvme-test.c                |   4 -
 tests/qtest/vhost-user-blk-test.c      |   6 -
 tests/qtest/virtio-blk-test.c          |  12 --
 16 files changed, 262 insertions(+), 197 deletions(-)

-- 
2.55.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-08-18 19:51 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-17 18:55 [PATCH v6 00/10] tests/qtest: pci and MSI-X fixes Jishnu Warrier
2026-08-17 18:55 ` [PATCH v6 01/10] tests/qtest: Enforce zero for the "un-fired" msix message value Jishnu Warrier
2026-08-17 18:55 ` [PATCH v6 02/10] tests/qtest: Fix virtio msix message endianness Jishnu Warrier
2026-08-17 18:55 ` [PATCH v6 03/10] tests/qtest: Add libqos function for testing msix interrupt status Jishnu Warrier
2026-08-17 18:55 ` [PATCH v6 04/10] tests/qtest: Enable spapr dma with linear iommu map Jishnu Warrier
2026-08-18 19:50   ` Fabiano Rosas
2026-08-17 18:55 ` [PATCH v6 05/10] tests/qtest/ahci: unmap pci bar before reusing device Jishnu Warrier
2026-08-17 18:55 ` [PATCH v6 06/10] tests/qtest/ahci: don't unmap pci bar if it wasn't mapped Jishnu Warrier
2026-08-17 18:55 ` [PATCH v6 07/10] tests/qtest/libquos/pci: Add migration fixup helper for pci devices Jishnu Warrier
2026-08-17 18:55 ` [PATCH v6 08/10] qtest/libqos/pci: Enforce balanced iomap/unmap Jishnu Warrier
2026-08-17 18:55 ` [PATCH v6 09/10] qtest/libqos/pci: Fix qpci_msix_enable sharing bar0 Jishnu Warrier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.