public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] vfio/pci: Introduce vfio_pci driver for ISM devices
@ 2026-02-24 12:34 Julian Ruess
  2026-02-24 12:34 ` [PATCH v2 1/3] vfio/pci: Rename vfio_config_do_rw() to vfio_pci_config_rw_single() and export it Julian Ruess
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Julian Ruess @ 2026-02-24 12:34 UTC (permalink / raw)
  To: schnelle, wintera, ts, oberpar, gbayer, Alex Williamson,
	Jason Gunthorpe, Yishai Hadas, Shameer Kolothum, Kevin Tian
  Cc: mjrosato, alifm, raspl, hca, agordeev, gor, julianr, kvm,
	linux-kernel, linux-s390, linux-pci

Hi all,

This series adds a vfio_pci variant driver for the s390-specific
Internal Shared Memory (ISM) devices used for inter-VM communication
including SMC-D.

This is a prerequisite for an in-development open-source user space
driver stack that will allow to use ISM devices to provide remote
console and block device functionality. This stack will be part of
s390-tools.

This driver would also allow QEMU to mediate access to an ISM device,
enabling a form of PCI pass-through even for guests whose hardware
cannot directly execute PCI accesses, such as nested guests.

On s390, kernel primitives such as ioread() and iowrite() are switched
over from function handle based PCI load/stores instructions to PCI
memory-I/O (MIO) loads/stores when these are available and not
explicitly disabled. Since these instructions cannot be used with ISM
devices, ensure that classic function handle-based PCI instructions are
used instead.

The driver is still required even when MIO instructions are disabled, as
the ISM device relies on the PCI store‑block (PCISTB) instruction to
perform write operations.

Thank you,
Julian

Signed-off-by: Julian Ruess <julianr@linux.ibm.com>
---
Changes in v2:
- Remove common code patch that sets VFIO_PCI_OFFSET_SHIFT to 48.
- Implement ism_vfio_pci_ioctl_get_region_info() to have own region
  offsets.
- For config space accesses, rename vfio_config_do_rw() to
  vfio_pci_config_rw_single() and export it.
- Use zdev->maxstbl instead of ZPCI_BOUNDARY_SIZE.
- Add comment that zPCI must not use MIO instructions for config space
  access.
- Rework patch descriptions.
- Update license info.
- Link to v1: https://lore.kernel.org/r/20260212-vfio_pci_ism-v1-0-333262ade074@linux.ibm.com

---
Julian Ruess (3):
      vfio/pci: Rename vfio_config_do_rw() to vfio_pci_config_rw_single() and export it
      vfio/ism: Implement vfio_pci driver for ISM devices
      MAINTAINERS: add VFIO ISM PCI DRIVER section

 MAINTAINERS                        |   6 +
 drivers/vfio/pci/Kconfig           |   2 +
 drivers/vfio/pci/Makefile          |   2 +
 drivers/vfio/pci/ism/Kconfig       |  11 ++
 drivers/vfio/pci/ism/Makefile      |   3 +
 drivers/vfio/pci/ism/main.c        | 297 +++++++++++++++++++++++++++++++++++++
 drivers/vfio/pci/vfio_pci_config.c |   8 +-
 drivers/vfio/pci/vfio_pci_priv.h   |   4 +
 8 files changed, 330 insertions(+), 3 deletions(-)
---
base-commit: 7dff99b354601dd01829e1511711846e04340a69
change-id: 20250227-vfio_pci_ism-0ccc2e472247

Best regards,
-- 
Julian Ruess <julianr@linux.ibm.com>


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

end of thread, other threads:[~2026-03-02 22:07 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-24 12:34 [PATCH v2 0/3] vfio/pci: Introduce vfio_pci driver for ISM devices Julian Ruess
2026-02-24 12:34 ` [PATCH v2 1/3] vfio/pci: Rename vfio_config_do_rw() to vfio_pci_config_rw_single() and export it Julian Ruess
2026-02-26 19:36   ` Niklas Schnelle
2026-02-27 20:51   ` Alex Williamson
2026-02-24 12:34 ` [PATCH v2 2/3] vfio/ism: Implement vfio_pci driver for ISM devices Julian Ruess
2026-02-26 21:02   ` Niklas Schnelle
2026-02-27 15:52   ` Alexandra Winter
2026-03-02 12:18     ` Julian Ruess
2026-03-02 13:23       ` Alexandra Winter
2026-02-27 22:12   ` Alex Williamson
2026-03-02 22:07   ` Farhan Ali
2026-02-24 12:34 ` [PATCH v2 3/3] MAINTAINERS: add VFIO ISM PCI DRIVER section Julian Ruess
2026-02-26 21:04   ` Niklas Schnelle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox