Re: [PATCH v4 0/3] vfio/pci: Introduce vfio_pci driver for ISM devices
From: Julian Ruess
Date: Mon Mar 16 2026 - 08:34:00 EST
On Fri Mar 13, 2026 at 4:41 PM CET, Alex Williamson wrote:
> On Fri, 13 Mar 2026 15:40:27 +0100
> Julian Ruess <julianr@xxxxxxxxxxxxx> wrote:
>
>> 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@xxxxxxxxxxxxx>
>> ---
>> Changes in v4:
>> - Fix bug with < 8 byte reads. For code simplicity, only support 8 byte reads.
>
> Does the ISM device define sub-8-byte accesses as valid? It looks like
> if pread() doesn't return the desired size QEMU will fill the return
> with -1. Unless such accesses are classified as undefined by ISM,
> doesn't that suggest a potential data corruption issue to the guest
> driver? Thanks,
>
> Alex
Hi Alex,
thanks for the quick feedback!
We are currently developing this extension for a non‑QEMU vfio user space
driver. Reads smaller than 8 bytes are theoretically valid, but they are not
used by this driver nor the existing in-kernel driver at the moment. We could
extend this in the future if needed.
vfio‑pci based PCI pass-through of the ISM device is already possible without
this extension. In that case, the ISM driver in the guest kernel accesses the
BARs directly through hardware virtualization, without using the new access
routines provided by this variant driver.
Julian