kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] vfio-pci/zdev: Fixing s390 vfio-pci ISM support
@ 2021-01-19 20:02 Matthew Rosato
  2021-01-19 20:02 ` [PATCH 1/4] s390/pci: track alignment/length strictness for zpci_dev Matthew Rosato
                   ` (5 more replies)
  0 siblings, 6 replies; 24+ messages in thread
From: Matthew Rosato @ 2021-01-19 20:02 UTC (permalink / raw)
  To: alex.williamson, cohuck, schnelle
  Cc: pmorel, borntraeger, hca, gor, gerald.schaefer, linux-s390, kvm,
	linux-kernel

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 execution, pinning the guest buffer in memory briefly in
order to execute the requested PCI instruction.

Changes from RFC -> v1:
- No functional changes, just minor commentary changes -- Re-posting along
with updated QEMU set.

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      |  34 ++++++++
 8 files changed, 222 insertions(+), 3 deletions(-)

-- 
1.8.3.1


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

end of thread, other threads:[~2021-01-27 18:28 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-19 20:02 [PATCH 0/4] vfio-pci/zdev: Fixing s390 vfio-pci ISM support Matthew Rosato
2021-01-19 20:02 ` [PATCH 1/4] s390/pci: track alignment/length strictness for zpci_dev Matthew Rosato
2021-01-19 20:02 ` [PATCH 2/4] vfio-pci/zdev: Pass the relaxed alignment flag Matthew Rosato
2021-01-19 20:02 ` [PATCH 3/4] s390/pci: Get hardware-reported max store block length Matthew Rosato
2021-01-19 20:02 ` [PATCH 4/4] vfio-pci/zdev: Introduce the zPCI I/O vfio region Matthew Rosato
2021-01-20 13:21   ` Niklas Schnelle
2021-01-20 17:10     ` Matthew Rosato
2021-01-20 17:28       ` Niklas Schnelle
2021-01-20 17:40         ` Matthew Rosato
2021-01-21 20:50     ` Alex Williamson
2021-01-21 10:01   ` Niklas Schnelle
2021-01-21 15:57     ` Matthew Rosato
2021-01-22 23:48   ` Alex Williamson
2021-01-25 14:40     ` Matthew Rosato
2021-01-25 15:42       ` Cornelia Huck
2021-01-25 15:52         ` Matthew Rosato
2021-01-26 23:18       ` Alex Williamson
2021-01-27 14:23         ` Matthew Rosato
2021-01-27 15:53           ` Alex Williamson
2021-01-27 17:45             ` Cornelia Huck
2021-01-27 18:27               ` Matthew Rosato
2021-01-19 20:50 ` [PATCH 0/4] vfio-pci/zdev: Fixing s390 vfio-pci ISM support Matthew Rosato
2021-01-20  9:02 ` Pierre Morel
2021-01-20 14:02   ` Matthew Rosato

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).