Skip to content

RFC um: Add VFIO-based PCI passthrough support

Tiwei Bie linux-um 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3um: Rewrite the sigio workaround based on epoll and tgkillarch/um/drivers/random.c arch/um/drivers/rtc_user.c arch/um/include/shared/os.h +3 more+47 -3160 replies
2/3um: virt-pci: Refactor virtio_pcidev into its own modulearch/um/drivers/Kconfig arch/um/drivers/Makefile arch/um/drivers/virt-pci.c +2 more+794 -5890 replies
3/3um: Add VFIO-based virtual PCI driverarch/um/drivers/Kconfig arch/um/drivers/Makefile arch/um/drivers/vfio_kern.c +2 more+1025 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/3] um: Add VFIO-based PCI passthrough support

This patchset adds a new virt-pci driver to UML that allows users to pass through host PCI devices to UML via VFIO. Currently, only MSI-X capable devices are supported, and drivers are assumed to use MSI-X.

This driver has been tested with virtio-net-pci, virtio-blk-pci and nvme in a QEMU virtual machine with virtual IOMMU enabled. Regression testing for virtio_pcidev has been limited as I haven't been able to find a virtio_pcidev vhost-user backend implementation.

This patchset is based on the following patchset:
https://lore.kernel.org/all/[email protected]/

Tiwei Bie (3):
um: Rewrite the sigio workaround based on epoll and tgkill
um: virt-pci: Refactor virtio_pcidev into its own module
um: Add VFIO-based virtual PCI driver

 arch/um/drivers/Kconfig         |  20 +-
 arch/um/drivers/Makefile        |   5 +-
 arch/um/drivers/random.c        |   2 +-
 arch/um/drivers/rtc_user.c      |   2 +-
 arch/um/drivers/vfio_kern.c     | 648 +++++++++++++++++++++++++++++
 arch/um/drivers/vfio_user.c     | 323 +++++++++++++++
 arch/um/drivers/vfio_user.h     |  44 ++
 arch/um/drivers/virt-pci.c      | 699 ++++++--------------------------
 arch/um/drivers/virt-pci.h      |  41 ++
 arch/um/drivers/virtio_pcidev.c | 628 ++++++++++++++++++++++++++++
 arch/um/include/shared/os.h     |   2 +-
 arch/um/include/shared/sigio.h  |   1 -
 arch/um/kernel/sigio.c          |  26 --
 arch/um/os-Linux/sigio.c        | 330 ++-------------
 14 files changed, 1866 insertions(+), 905 deletions(-)
 create mode 100644 arch/um/drivers/vfio_kern.c
 create mode 100644 arch/um/drivers/vfio_user.c
 create mode 100644 arch/um/drivers/vfio_user.h
 create mode 100644 arch/um/drivers/virt-pci.h
 create mode 100644 arch/um/drivers/virtio_pcidev.c
Signature · 1 line
2.34.1