qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Enable QEMU NVMe userspace driver on s390x
@ 2025-03-28 19:06 Farhan Ali
  2025-03-28 19:06 ` [PATCH v2 1/3] util: Add functions for s390x mmio read/write Farhan Ali
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Farhan Ali @ 2025-03-28 19:06 UTC (permalink / raw)
  To: qemu-devel
  Cc: alifm, mjrosato, schnelle, qemu-block, qemu-s390x, stefanha, fam,
	philmd, kwolf, hreitz, thuth

Hi,

Recently on s390x we have enabled mmap support for vfio-pci devices [1].
This allows us to take advantage and use userspace drivers on s390x. However,
on s390x we have special instructions for MMIO access. Starting with z15 
(and newer platforms) we have new PCI Memory I/O (MIO) instructions which 
operate on virtually mapped PCI memory spaces, and can be used from userspace.
On older platforms we would fallback to using existing system calls for MMIO access.

This patch series introduces support the PCI MIO instructions, and enables s390x
support for the userspace NVMe driver on s390x. I would appreciate any review/feedback
on the patches.

Thanks
Farhan

[1] https://lore.kernel.org/linux-s390/20250226-vfio_pci_mmap-v7-0-c5c0f1d26efd@linux.ibm.com/

ChangeLog
---------
v1 series https://mail.gnu.org/archive/html/qemu-devel/2025-03/msg06596.html
v1 -> v2
    - Add 8 and 16 bit reads/writes for completeness (patch 1)
    - Introduce new QEMU PCI MMIO read/write API as suggested by Stefan (patch 2)
    - Update NVMe userspace driver to use QEMU PCI MMIO functions (patch 3)

Farhan Ali (3):
  util: Add functions for s390x mmio read/write
  include: Add a header to define PCI MMIO functions
  block/nvme: Use QEMU PCI MMIO API

 block/nvme.c                  |  37 +++++----
 include/qemu/pci-mmio.h       | 116 ++++++++++++++++++++++++++
 include/qemu/s390x_pci_mmio.h |  23 ++++++
 util/meson.build              |   2 +
 util/s390x_pci_mmio.c         | 148 ++++++++++++++++++++++++++++++++++
 5 files changed, 310 insertions(+), 16 deletions(-)
 create mode 100644 include/qemu/pci-mmio.h
 create mode 100644 include/qemu/s390x_pci_mmio.h
 create mode 100644 util/s390x_pci_mmio.c

-- 
2.43.0



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

end of thread, other threads:[~2025-04-01 13:04 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-28 19:06 [PATCH v2 0/3] Enable QEMU NVMe userspace driver on s390x Farhan Ali
2025-03-28 19:06 ` [PATCH v2 1/3] util: Add functions for s390x mmio read/write Farhan Ali
2025-03-31  7:34   ` Niklas Schnelle
2025-03-28 19:06 ` [PATCH v2 2/3] include: Add a header to define PCI MMIO functions Farhan Ali
2025-03-28 20:38   ` Philippe Mathieu-Daudé
2025-03-29  5:58     ` Farhan Ali
2025-03-28 20:44   ` Philippe Mathieu-Daudé
2025-03-29  6:03     ` Farhan Ali
2025-03-29  6:50       ` Philippe Mathieu-Daudé
2025-03-31 13:46   ` Stefan Hajnoczi
2025-04-01 13:02     ` Farhan Ali
2025-03-28 19:06 ` [PATCH v2 3/3] block/nvme: Use QEMU PCI MMIO API Farhan Ali
2025-03-28 20:41   ` Philippe Mathieu-Daudé
2025-03-29  6:04     ` Farhan Ali
2025-03-31 16:58   ` Stefan Hajnoczi

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).