]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
vfio/ism: Implement vfio_pci driver for ISM devices
authorJulian Ruess <julianr@linux.ibm.com>
Wed, 25 Mar 2026 13:31:24 +0000 (14:31 +0100)
committerAlex Williamson <alex@shazbot.org>
Wed, 1 Apr 2026 21:51:21 +0000 (15:51 -0600)
commitbf4197be96d0839963d28e1812d9edc71086a580
treef07aa87f6c5920a051b597683bbd0fbd3376ec3e
parent29afd0c70d9cd77da62b1105a0553c24e42c0df1
vfio/ism: Implement vfio_pci driver for ISM devices

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: Alexandra Winter <wintera@linux.ibm.com>
Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Julian Ruess <julianr@linux.ibm.com>
Reviewed-by: Farhan Ali <alifm@linux.ibm.com>
Link: https://lore.kernel.org/r/20260325-vfio_pci_ism-v8-2-ddc504cde914@linux.ibm.com
Signed-off-by: Alex Williamson <alex@shazbot.org>
drivers/vfio/pci/Kconfig
drivers/vfio/pci/Makefile
drivers/vfio/pci/ism/Kconfig [new file with mode: 0644]
drivers/vfio/pci/ism/Makefile [new file with mode: 0644]
drivers/vfio/pci/ism/main.c [new file with mode: 0644]