Skip to content

RFC vfio-pci/zdev: Fixing s390 vfio-pci ISM support

Matthew Rosato kvm linux-s390 lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4s390/pci: track alignment/length strictness for zpci_devarch/s390/include/asm/pci.h arch/s390/include/asm/pci_clp.h arch/s390/pci/pci_clp.c+6 -23 replies
2/4vfio-pci/zdev: Pass the relaxed alignment flagdrivers/vfio/pci/vfio_pci_zdev.c include/uapi/linux/vfio_zdev.h+3 -00 replies
3/4s390/pci: Get hardware-reported max store block lengtharch/s390/include/asm/pci.h arch/s390/include/asm/pci_clp.h arch/s390/pci/pci_clp.c+4 -10 replies
4/4vfio-pci/zdev: Introduce the zPCI I/O vfio regiondrivers/vfio/pci/vfio_pci.c drivers/vfio/pci/vfio_pci_private.h drivers/vfio/pci/vfio_pci_zdev.c +2 more+208 -00 replies

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchNiklas SchnellePierre Morel
1/4R-b R-b
2/4A-b R-b
3/4R-b
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC 0/4] vfio-pci/zdev: Fixing s390 vfio-pci ISM support

Today, ISM devices are completely disallowed for vfio-pci passthrough as QEMU will reject the device due to an (inappropriate) MSI-X check. However, in an effort to enable ISM device passthrough, I realized that the manner in which ISM performs block write operations is highly incompatible with the way that QEMU s390 PCI instruction interception and vfio_pci_bar_rw break up I/O operations into 8B and 4B operations -- ISM devices have particular requirements in regards to the alignment, size and order of writes performed. Furthermore, they require that legacy/non-MIO s390 PCI instructions are used, which is also not guaranteed when the I/O is passed through the typical userspace channels.

As a result, this patchset proposes a new VFIO region to allow a guest to pass certain PCI instruction intercepts directly to the s390 host kernel PCI layer for exeuction, pinning the guest buffer in memory briefly in order to execute the requested PCI instruction.

Matthew Rosato (4):
s390/pci: track alignment/length strictness for zpci_dev vfio-pci/zdev: Pass the relaxed alignment flag s390/pci: Get hardware-reported max store block length vfio-pci/zdev: Introduce the zPCI I/O vfio region

 arch/s390/include/asm/pci.h         |   4 +-
 arch/s390/include/asm/pci_clp.h     |   7 +-
 arch/s390/pci/pci_clp.c             |   2 +
 drivers/vfio/pci/vfio_pci.c         |   8 ++
 drivers/vfio/pci/vfio_pci_private.h |   6 ++
 drivers/vfio/pci/vfio_pci_zdev.c    | 160 ++++++++++++++++++++++++++++++++++++
 include/uapi/linux/vfio.h           |   4 +
 include/uapi/linux/vfio_zdev.h      |  33 ++++++++
 8 files changed, 221 insertions(+), 3 deletions(-)
Signature · 1 line
1.8.3.1