Re: [PATCH v3 2/3] vfio/ism: Implement vfio_pci driver for ISM devices
From: Farhan Ali
Date: Mon Mar 09 2026 - 12:57:16 EST
On 3/5/2026 4:20 AM, Julian Ruess wrote:
Add a vfio_pci variant driver for the s390-specific Internal Shared
Memory (ISM) devices used for inter-VM communication.
This enables the development of vfio-pci-based user space drivers for
ISM devices.
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.
Stores are not fragmented, therefore one ioctl corresponds to exactly
one PCISTB instruction. User space must ensure to not write more than
4096 bytes at once to an ISM BAR which is the maximum payload of the
PCISTB instruction.
Reviewed-by: Niklas Schnelle<schnelle@xxxxxxxxxxxxx>
Signed-off-by: Julian Ruess<julianr@xxxxxxxxxxxxx>
---
drivers/vfio/pci/Kconfig | 2 +
drivers/vfio/pci/Makefile | 2 +
drivers/vfio/pci/ism/Kconfig | 10 ++
drivers/vfio/pci/ism/Makefile | 3 +
drivers/vfio/pci/ism/main.c | 343 ++++++++++++++++++++++++++++++++++++++++++
5 files changed, 360 insertions(+)
Reviewed-by: Farhan Ali<alifm@xxxxxxxxxxxxx>