[PATCH 00/27] vfio-user client

John Levon posted 27 patches 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250515154413.210315-1-john.levon@nutanix.com
Maintainers: John Levon <john.levon@nutanix.com>, Thanos Makatos <thanos.makatos@nutanix.com>, Alex Williamson <alex.williamson@redhat.com>, "Cédric Le Goater" <clg@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Stefano Garzarella <sgarzare@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Peter Xu <peterx@redhat.com>, David Hildenbrand <david@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>
There is a newer version of this series
MAINTAINERS                           |   10 +-
docs/devel/index-internals.rst        |    1 +
docs/devel/vfio-user.rst              | 1522 +++++++++++++++++++++++++
docs/system/device-emulation.rst      |    1 +
docs/system/devices/vfio-user.rst     |   24 +
meson.build                           |    1 +
hw/vfio-user/container.h              |   27 +
hw/vfio-user/device.h                 |   27 +
hw/vfio-user/protocol.h               |  245 ++++
hw/vfio-user/proxy.h                  |  137 +++
hw/vfio-user/trace.h                  |    1 +
hw/vfio/pci.h                         |   16 +
include/hw/vfio/vfio-container-base.h |    5 +-
include/hw/vfio/vfio-device.h         |   15 +-
include/hw/vfio/vfio-region.h         |    2 +
include/system/memory.h               |   16 +-
hw/vfio-user/container.c              |  348 ++++++
hw/vfio-user/device.c                 |  389 +++++++
hw/vfio-user/pci.c                    |  428 +++++++
hw/vfio-user/proxy.c                  | 1314 +++++++++++++++++++++
hw/vfio/container-base.c              |    4 +-
hw/vfio/container.c                   |    3 +-
hw/vfio/device.c                      |   57 +-
hw/vfio/iommufd.c                     |    3 +-
hw/vfio/listener.c                    |   35 +-
hw/vfio/pci.c                         |  163 ++-
hw/vfio/region.c                      |   10 +-
hw/virtio/vhost-vdpa.c                |    8 +-
system/memory.c                       |   25 +-
hw/meson.build                        |    1 +
hw/vfio-user/meson.build              |   11 +
hw/vfio-user/trace-events             |   18 +
meson_options.txt                     |    2 +
scripts/meson-buildoptions.sh         |    4 +
34 files changed, 4753 insertions(+), 120 deletions(-)
create mode 100644 docs/devel/vfio-user.rst
create mode 100644 docs/system/devices/vfio-user.rst
create mode 100644 hw/vfio-user/container.h
create mode 100644 hw/vfio-user/device.h
create mode 100644 hw/vfio-user/protocol.h
create mode 100644 hw/vfio-user/proxy.h
create mode 100644 hw/vfio-user/trace.h
create mode 100644 hw/vfio-user/container.c
create mode 100644 hw/vfio-user/device.c
create mode 100644 hw/vfio-user/pci.c
create mode 100644 hw/vfio-user/proxy.c
create mode 100644 hw/vfio-user/meson.build
create mode 100644 hw/vfio-user/trace-events
[PATCH 00/27] vfio-user client
Posted by John Levon 7 months ago
The series contains an implement of a vfio-user client in QEMU, along with a few
more preparatory patches.

The vfio-user protocol allows for implementing (PCI) devices in another
userspace process; SPDK is one example, which includes a virtual NVMe
implementation.

The vfio-user framework consists of 3 parts:
 1) The VFIO user protocol specification.
 2) A client - the VFIO device in QEMU that encapsulates VFIO messages
    and sends them to the server.
 3) A server - a remote process that emulates a device.

This patchset implements parts 1 and 2.

It has been tested against libvfio-user test servers as well as SPDK.

A previous version of this series can be found at
https://lore.kernel.org/all/7dd34008-e0f1-4eed-a77e-55b1f68fbe69@redhat.com/T/
(I've reset the version as it has changed significantly.)

thanks
john

John Levon (25):
  vfio/container: pass MemoryRegion to DMA operations
  vfio: move more cleanup into vfio_pci_put_device()
  vfio: move config space read into vfio_pci_config_setup()
  vfio: refactor out IRQ signalling setup
  vfio: enable per-IRQ MSI-X masking
  vfio: add per-region fd support
  vfio: mark posted writes in region write callbacks
  vfio-user: add vfio-user class and container
  vfio-user: connect vfio proxy to remote server
  vfio-user: implement message receive infrastructure
  vfio-user: implement message send infrastructure
  vfio-user: implement VFIO_USER_DEVICE_GET_INFO
  vfio-user: implement VFIO_USER_DEVICE_GET_REGION_INFO
  vfio-user: implement VFIO_USER_REGION_READ/WRITE
  vfio-user: set up PCI in vfio_user_pci_realize()
  vfio-user: implement VFIO_USER_DEVICE_GET/SET_IRQ*
  vfio-user: forward MSI-X PBA BAR accesses to server
  vfio-user: set up container access to the proxy
  vfio-user: implement VFIO_USER_DEVICE_RESET
  vfio-user: implement VFIO_USER_DMA_MAP/UNMAP
  vfio-user: implement VFIO_USER_DMA_READ/WRITE
  vfio-user: add 'x-msg-timeout' option
  vfio-user: support posted writes
  vfio-user: add coalesced posted writes
  docs: add vfio-user documentation

Steve Sistare (1):
  vfio: return mr from vfio_get_xlat_addr

Thanos Makatos (1):
  vfio-user: introduce vfio-user protocol specification

 MAINTAINERS                           |   10 +-
 docs/devel/index-internals.rst        |    1 +
 docs/devel/vfio-user.rst              | 1522 +++++++++++++++++++++++++
 docs/system/device-emulation.rst      |    1 +
 docs/system/devices/vfio-user.rst     |   24 +
 meson.build                           |    1 +
 hw/vfio-user/container.h              |   27 +
 hw/vfio-user/device.h                 |   27 +
 hw/vfio-user/protocol.h               |  245 ++++
 hw/vfio-user/proxy.h                  |  137 +++
 hw/vfio-user/trace.h                  |    1 +
 hw/vfio/pci.h                         |   16 +
 include/hw/vfio/vfio-container-base.h |    5 +-
 include/hw/vfio/vfio-device.h         |   15 +-
 include/hw/vfio/vfio-region.h         |    2 +
 include/system/memory.h               |   16 +-
 hw/vfio-user/container.c              |  348 ++++++
 hw/vfio-user/device.c                 |  389 +++++++
 hw/vfio-user/pci.c                    |  428 +++++++
 hw/vfio-user/proxy.c                  | 1314 +++++++++++++++++++++
 hw/vfio/container-base.c              |    4 +-
 hw/vfio/container.c                   |    3 +-
 hw/vfio/device.c                      |   57 +-
 hw/vfio/iommufd.c                     |    3 +-
 hw/vfio/listener.c                    |   35 +-
 hw/vfio/pci.c                         |  163 ++-
 hw/vfio/region.c                      |   10 +-
 hw/virtio/vhost-vdpa.c                |    8 +-
 system/memory.c                       |   25 +-
 hw/meson.build                        |    1 +
 hw/vfio-user/meson.build              |   11 +
 hw/vfio-user/trace-events             |   18 +
 meson_options.txt                     |    2 +
 scripts/meson-buildoptions.sh         |    4 +
 34 files changed, 4753 insertions(+), 120 deletions(-)
 create mode 100644 docs/devel/vfio-user.rst
 create mode 100644 docs/system/devices/vfio-user.rst
 create mode 100644 hw/vfio-user/container.h
 create mode 100644 hw/vfio-user/device.h
 create mode 100644 hw/vfio-user/protocol.h
 create mode 100644 hw/vfio-user/proxy.h
 create mode 100644 hw/vfio-user/trace.h
 create mode 100644 hw/vfio-user/container.c
 create mode 100644 hw/vfio-user/device.c
 create mode 100644 hw/vfio-user/pci.c
 create mode 100644 hw/vfio-user/proxy.c
 create mode 100644 hw/vfio-user/meson.build
 create mode 100644 hw/vfio-user/trace-events

-- 
2.43.0
Re: [PATCH 00/27] vfio-user client
Posted by Cédric Le Goater 6 months, 4 weeks ago
John,

+ Steven,

On 5/15/25 17:43, John Levon wrote:
> The series contains an implement of a vfio-user client in QEMU, along with a few
> more preparatory patches.
> 
> The vfio-user protocol allows for implementing (PCI) devices in another
> userspace process; SPDK is one example, which includes a virtual NVMe
> implementation.
> 
> The vfio-user framework consists of 3 parts:
>   1) The VFIO user protocol specification.
>   2) A client - the VFIO device in QEMU that encapsulates VFIO messages
>      and sends them to the server.
>   3) A server - a remote process that emulates a device.
> 
> This patchset implements parts 1 and 2.
> 
> It has been tested against libvfio-user test servers as well as SPDK.
> 
> A previous version of this series can be found at
> https://lore.kernel.org/all/7dd34008-e0f1-4eed-a77e-55b1f68fbe69@redhat.com/T/
> (I've reset the version as it has changed significantly.)
> 
> thanks
> john
> 
> John Levon (25):
>    vfio/container: pass MemoryRegion to DMA operations
>    vfio: move more cleanup into vfio_pci_put_device()
>    vfio: move config space read into vfio_pci_config_setup()
>    vfio: refactor out IRQ signalling setup
>    vfio: enable per-IRQ MSI-X masking
>    vfio: add per-region fd support
>    vfio: mark posted writes in region write callbacks
>    vfio-user: add vfio-user class and container
>    vfio-user: connect vfio proxy to remote server
>    vfio-user: implement message receive infrastructure
>    vfio-user: implement message send infrastructure
>    vfio-user: implement VFIO_USER_DEVICE_GET_INFO
>    vfio-user: implement VFIO_USER_DEVICE_GET_REGION_INFO
>    vfio-user: implement VFIO_USER_REGION_READ/WRITE
>    vfio-user: set up PCI in vfio_user_pci_realize()
>    vfio-user: implement VFIO_USER_DEVICE_GET/SET_IRQ*
>    vfio-user: forward MSI-X PBA BAR accesses to server
>    vfio-user: set up container access to the proxy
>    vfio-user: implement VFIO_USER_DEVICE_RESET
>    vfio-user: implement VFIO_USER_DMA_MAP/UNMAP
>    vfio-user: implement VFIO_USER_DMA_READ/WRITE
>    vfio-user: add 'x-msg-timeout' option
>    vfio-user: support posted writes
>    vfio-user: add coalesced posted writes
>    docs: add vfio-user documentation
> 
> Steve Sistare (1):
>    vfio: return mr from vfio_get_xlat_addr
> 
> Thanos Makatos (1):
>    vfio-user: introduce vfio-user protocol specification
> 
>   MAINTAINERS                           |   10 +-
>   docs/devel/index-internals.rst        |    1 +
>   docs/devel/vfio-user.rst              | 1522 +++++++++++++++++++++++++
>   docs/system/device-emulation.rst      |    1 +
>   docs/system/devices/vfio-user.rst     |   24 +
>   meson.build                           |    1 +
>   hw/vfio-user/container.h              |   27 +
>   hw/vfio-user/device.h                 |   27 +
>   hw/vfio-user/protocol.h               |  245 ++++
>   hw/vfio-user/proxy.h                  |  137 +++
>   hw/vfio-user/trace.h                  |    1 +
>   hw/vfio/pci.h                         |   16 +
>   include/hw/vfio/vfio-container-base.h |    5 +-
>   include/hw/vfio/vfio-device.h         |   15 +-
>   include/hw/vfio/vfio-region.h         |    2 +
>   include/system/memory.h               |   16 +-
>   hw/vfio-user/container.c              |  348 ++++++
>   hw/vfio-user/device.c                 |  389 +++++++
>   hw/vfio-user/pci.c                    |  428 +++++++
>   hw/vfio-user/proxy.c                  | 1314 +++++++++++++++++++++
>   hw/vfio/container-base.c              |    4 +-
>   hw/vfio/container.c                   |    3 +-
>   hw/vfio/device.c                      |   57 +-
>   hw/vfio/iommufd.c                     |    3 +-
>   hw/vfio/listener.c                    |   35 +-
>   hw/vfio/pci.c                         |  163 ++-
>   hw/vfio/region.c                      |   10 +-
>   hw/virtio/vhost-vdpa.c                |    8 +-
>   system/memory.c                       |   25 +-
>   hw/meson.build                        |    1 +
>   hw/vfio-user/meson.build              |   11 +
>   hw/vfio-user/trace-events             |   18 +
>   meson_options.txt                     |    2 +
>   scripts/meson-buildoptions.sh         |    4 +
>   34 files changed, 4753 insertions(+), 120 deletions(-)
>   create mode 100644 docs/devel/vfio-user.rst
>   create mode 100644 docs/system/devices/vfio-user.rst
>   create mode 100644 hw/vfio-user/container.h
>   create mode 100644 hw/vfio-user/device.h
>   create mode 100644 hw/vfio-user/protocol.h
>   create mode 100644 hw/vfio-user/proxy.h
>   create mode 100644 hw/vfio-user/trace.h
>   create mode 100644 hw/vfio-user/container.c
>   create mode 100644 hw/vfio-user/device.c
>   create mode 100644 hw/vfio-user/pci.c
>   create mode 100644 hw/vfio-user/proxy.c
>   create mode 100644 hw/vfio-user/meson.build
>   create mode 100644 hw/vfio-user/trace-events
> 

patches 3-5 seem be ok to merge. They are first on my vfio-next
candidates.

patches 1-2 should be reworked on top of the memory_get_xlat_addr()
changes [1] proposed by Steven.

I haven't looked at patches 6-8 yet. I think I saw some conflicts
with the live update proposal from Steven. To be clarified next.

The rest (9-27) is vfio-user territory only (I hope). Still, it
should be merged through the VFIO tree. Would it be complex to
propose a functional test for it ?

Thanks,

C.


[1] https://lore.kernel.org/qemu-devel/1747415599-131553-1-git-send-email-steven.sistare@oracle.com/
Re: [PATCH 00/27] vfio-user client
Posted by John Levon 6 months, 4 weeks ago
On Mon, May 19, 2025 at 02:40:12PM +0200, Cédric Le Goater wrote:

> patches 3-5 seem be ok to merge. They are first on my vfio-next
> candidates.
> 
> patches 1-2 should be reworked on top of the memory_get_xlat_addr()
> changes [1] proposed by Steven.

Now v5 is out I will rebase on top of it.

> The rest (9-27) is vfio-user territory only (I hope). Still, it
> should be merged through the VFIO tree.

It isn't entirely contained within hw/vfio-user/ (there are e.g. some exports of
util functions), but yes essentially. See diff below for illustration.

> Would it be complex to propose a functional test for it ?

We have a libvfio-user we can use, but this would be a problem:

 487   │ 2025-05-19 14:19:20,304: modprobe gpio-pci-idio-16
 488   │ 2025-05-19 14:19:20,306: modprobe: FATAL: Module gpio-pci-idio-16 not found in directory /lib/modules/5.3.7-301.fc31.x86_64

If somebody can help with how to get a suitable test initrd with this module
available, we could at least do basic testing (although no DMA).

regards
john


diff --git a/hw/vfio/pci.h b/hw/vfio/pci.h
index 7a03d24805..80599454d4 100644
--- a/hw/vfio/pci.h
+++ b/hw/vfio/pci.h
@@ -116,6 +116,7 @@ typedef struct VFIOMSIXInfo {
     uint32_t pba_offset;
     unsigned long *pending;
     bool noresize;
+    MemoryRegion *pba_region;
 } VFIOMSIXInfo;
 
 /*
@@ -215,6 +216,20 @@ uint32_t vfio_pci_read_config(PCIDevice *pdev, uint32_t addr, int len);
 void vfio_pci_write_config(PCIDevice *pdev,
                            uint32_t addr, uint32_t val, int len);
 
+void vfio_intx_eoi(VFIODevice *vbasedev);
+Object *vfio_pci_get_object(VFIODevice *vbasedev);
+int vfio_pci_save_config(VFIODevice *vbasedev, QEMUFile *f, Error **errp);
+int vfio_pci_load_config(VFIODevice *vbasedev, QEMUFile *f);
+void vfio_pci_put_device(VFIOPCIDevice *vdev);
+bool vfio_populate_device(VFIOPCIDevice *vdev, Error **errp);
+void vfio_teardown_msi(VFIOPCIDevice *vdev);
+void vfio_bars_exit(VFIOPCIDevice *vdev);
+bool vfio_add_capabilities(VFIOPCIDevice *vdev, Error **errp);
+void vfio_register_err_notifier(VFIOPCIDevice *vdev);
+void vfio_register_req_notifier(VFIOPCIDevice *vdev);
+bool vfio_pci_config_setup(VFIOPCIDevice *vdev, Error **errp);
+bool vfio_interrupt_setup(VFIOPCIDevice *vdev, Error **errp);
+
 uint64_t vfio_vga_read(void *opaque, hwaddr addr, unsigned size);
 void vfio_vga_write(void *opaque, hwaddr addr, uint64_t data, unsigned size);
 
diff --git a/include/hw/vfio/vfio-container-base.h b/include/hw/vfio/vfio-container-base.h
index c18986a621..c854f902ed 100644
--- a/include/hw/vfio/vfio-container-base.h
+++ b/include/hw/vfio/vfio-container-base.h
@@ -109,6 +109,7 @@ vfio_container_get_page_size_mask(const VFIOContainerBase *bcontainer)
 #define TYPE_VFIO_IOMMU_LEGACY TYPE_VFIO_IOMMU "-legacy"
 #define TYPE_VFIO_IOMMU_SPAPR TYPE_VFIO_IOMMU "-spapr"
 #define TYPE_VFIO_IOMMU_IOMMUFD TYPE_VFIO_IOMMU "-iommufd"
+#define TYPE_VFIO_IOMMU_USER TYPE_VFIO_IOMMU "-user"
 
 OBJECT_DECLARE_TYPE(VFIOContainerBase, VFIOIOMMUClass, VFIO_IOMMU)
 
diff --git a/include/hw/vfio/vfio-device.h b/include/hw/vfio/vfio-device.h
index a23ef4ea13..09f1a21bf8 100644
--- a/include/hw/vfio/vfio-device.h
+++ b/include/hw/vfio/vfio-device.h
@@ -46,6 +46,7 @@ typedef struct VFIOMigration VFIOMigration;
 
 typedef struct IOMMUFDBackend IOMMUFDBackend;
 typedef struct VFIOIOASHwpt VFIOIOASHwpt;
+typedef struct VFIOUserProxy VFIOUserProxy;
 
 typedef struct VFIODevice {
     QLIST_ENTRY(VFIODevice) next;
@@ -86,6 +87,7 @@ typedef struct VFIODevice {
     QLIST_ENTRY(VFIODevice) hwpt_next;
     struct vfio_region_info **reginfo;
     int *region_fds;
+    VFIOUserProxy *proxy;
 } VFIODevice;
 
 struct VFIODeviceOps {
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 57ef65dcc9..a92e38f822 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -103,7 +103,7 @@ static void vfio_intx_interrupt(void *opaque)
     }
 }
 
-static void vfio_intx_eoi(VFIODevice *vbasedev)
+void vfio_intx_eoi(VFIODevice *vbasedev)
 {
     VFIOPCIDevice *vdev = container_of(vbasedev, VFIOPCIDevice, vbasedev);
 
@@ -1770,7 +1770,7 @@ static bool vfio_msix_setup(VFIOPCIDevice *vdev, int pos, Error **errp)
     return true;
 }
 
-static void vfio_teardown_msi(VFIOPCIDevice *vdev)
+void vfio_teardown_msi(VFIOPCIDevice *vdev)
 {
     msi_uninit(&vdev->pdev);
 
@@ -1869,7 +1869,7 @@ static void vfio_bars_register(VFIOPCIDevice *vdev)
     }
 }
 
-static void vfio_bars_exit(VFIOPCIDevice *vdev)
+void vfio_bars_exit(VFIOPCIDevice *vdev)
 {
     int i;
 
@@ -2460,7 +2460,7 @@ static void vfio_add_ext_cap(VFIOPCIDevice *vdev)
     g_free(config);
 }
 
-static bool vfio_add_capabilities(VFIOPCIDevice *vdev, Error **errp)
+bool vfio_add_capabilities(VFIOPCIDevice *vdev, Error **errp)
 {
     PCIDevice *pdev = &vdev->pdev;
 
@@ -2629,7 +2629,7 @@ static void vfio_pci_compute_needs_reset(VFIODevice *vbasedev)
     }
 }
 
-static Object *vfio_pci_get_object(VFIODevice *vbasedev)
+Object *vfio_pci_get_object(VFIODevice *vbasedev)
 {
     VFIOPCIDevice *vdev = container_of(vbasedev, VFIOPCIDevice, vbasedev);
 
@@ -2685,7 +2685,7 @@ static const VMStateDescription vmstate_vfio_pci_config = {
     }
 };
 
-static int vfio_pci_save_config(VFIODevice *vbasedev, QEMUFile *f, Error **errp)
+int vfio_pci_save_config(VFIODevice *vbasedev, QEMUFile *f, Error **errp)
 {
     VFIOPCIDevice *vdev = container_of(vbasedev, VFIOPCIDevice, vbasedev);
 
@@ -2693,7 +2693,7 @@ static int vfio_pci_save_config(VFIODevice *vbasedev, QEMUFile *f, Error **errp)
                                        errp);
 }
 
-static int vfio_pci_load_config(VFIODevice *vbasedev, QEMUFile *f)
+int vfio_pci_load_config(VFIODevice *vbasedev, QEMUFile *f)
 {
     VFIOPCIDevice *vdev = container_of(vbasedev, VFIOPCIDevice, vbasedev);
     PCIDevice *pdev = &vdev->pdev;
@@ -2807,7 +2807,7 @@ bool vfio_populate_vga(VFIOPCIDevice *vdev, Error **errp)
     return true;
 }
 
-static bool vfio_populate_device(VFIOPCIDevice *vdev, Error **errp)
+bool vfio_populate_device(VFIOPCIDevice *vdev, Error **errp)
 {
     VFIODevice *vbasedev = &vdev->vbasedev;
     struct vfio_region_info *reg_info = NULL;
@@ -2895,7 +2895,7 @@ static bool vfio_populate_device(VFIOPCIDevice *vdev, Error **errp)
     return true;
 }
 
-static void vfio_pci_put_device(VFIOPCIDevice *vdev)
+void vfio_pci_put_device(VFIOPCIDevice *vdev)
 {
     vfio_display_finalize(vdev);
     vfio_bars_finalize(vdev);
@@ -2943,7 +2943,7 @@ static void vfio_err_notifier_handler(void *opaque)
  * and continue after disabling error recovery support for the
  * device.
  */
-static void vfio_register_err_notifier(VFIOPCIDevice *vdev)
+void vfio_register_err_notifier(VFIOPCIDevice *vdev)
 {
     Error *err = NULL;
     int32_t fd;
@@ -3002,7 +3002,7 @@ static void vfio_req_notifier_handler(void *opaque)
     }
 }
 
-static void vfio_register_req_notifier(VFIOPCIDevice *vdev)
+void vfio_register_req_notifier(VFIOPCIDevice *vdev)
 {
     struct vfio_irq_info irq_info;
     Error *err = NULL;
@@ -3056,7 +3056,7 @@ static void vfio_unregister_req_notifier(VFIOPCIDevice *vdev)
     vdev->req_enabled = false;
 }
 
-static bool vfio_pci_config_setup(VFIOPCIDevice *vdev, Error **errp)
+bool vfio_pci_config_setup(VFIOPCIDevice *vdev, Error **errp)
 {
     PCIDevice *pdev = &vdev->pdev;
     VFIODevice *vbasedev = &vdev->vbasedev;
@@ -3162,7 +3162,7 @@ static bool vfio_pci_config_setup(VFIOPCIDevice *vdev, Error **errp)
     return true;
 }
 
-static bool vfio_interrupt_setup(VFIOPCIDevice *vdev, Error **errp)
+bool vfio_interrupt_setup(VFIOPCIDevice *vdev, Error **errp)
 {
     PCIDevice *pdev = &vdev->pdev;
 

Re: [PATCH 00/27] vfio-user client
Posted by Cédric Le Goater 6 months, 4 weeks ago
Hello John,

>> Would it be complex to propose a functional test for it ?
> 
> We have a libvfio-user we can use, but this would be a problem:
> 
>   487   │ 2025-05-19 14:19:20,304: modprobe gpio-pci-idio-16
>   488   │ 2025-05-19 14:19:20,306: modprobe: FATAL: Module gpio-pci-idio-16 not found in directory /lib/modules/5.3.7-301.fc31.x86_64
> 
> If somebody can help with how to get a suitable test initrd with this module
> available, we could at least do basic testing (although no DMA).

Can't we update the asset and use newer images ? It's also possible
to use a custom build, buildroot images for instance.


Thanks,

C.




Re: [PATCH 00/27] vfio-user client
Posted by John Levon 6 months, 4 weeks ago
On Tue, May 20, 2025 at 07:59:13AM +0200, Cédric Le Goater wrote:

> > > Would it be complex to propose a functional test for it ?
> > 
> > We have a libvfio-user we can use, but this would be a problem:
> > 
> >   487   │ 2025-05-19 14:19:20,304: modprobe gpio-pci-idio-16
> >   488   │ 2025-05-19 14:19:20,306: modprobe: FATAL: Module gpio-pci-idio-16 not found in directory /lib/modules/5.3.7-301.fc31.x86_64
> > 
> > If somebody can help with how to get a suitable test initrd with this module
> > available, we could at least do basic testing (although no DMA).
> 
> Can't we update the asset and use newer images ? It's also possible
> to use a custom build, buildroot images for instance.

Mark is going to help me out with this, stay tuned.

In the meantime I sent out a v2 of the series, as there's a couple of additional
generic vfio patches you might want to review.

thanks
john