Skip to content

RFC vfio-user implementation

Elena Ufimtseva qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest16 patches 48 repliesIn review
  2. v1 RFC19 patches 9 repliesSuperseded

Changes in v2 from the cover letter

- combine some patches with relevant functionality.
- use SocketAddress with idea to modify later the command line options.
- define protocol bits in user-protocol.h.
- use QEMU_LOCK_GUARD where appropriate.
- fix the locking when event signaling.
- do not drop BQL on dma map/unmap.
- added checks for message sizes in communication functions.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16vfio-user: introduce vfio-user protocol specificationMAINTAINERS docs/devel/index.rst docs/devel/vfio-user.rst+1816 -04 replies
2/16vfio-user: add VFIO base abstract classhw/vfio/pci.c hw/vfio/pci.h+54 -250 replies
3/16vfio-user: Define type vfio_user_pci_dev_infohw/vfio/pci.c hw/vfio/pci.h+95 -01 reply
4/16vfio-user: connect vfio proxy to remote serverMAINTAINERS hw/vfio/meson.build hw/vfio/pci.c +3 more+262 -015 replies
5/16vfio-user: define VFIO Proxy and communication functionsMAINTAINERS hw/vfio/pci.c hw/vfio/user-protocol.h +2 more+366 -03 replies
6/16vfio-user: negotiate version with remote serverhw/vfio/pci.c hw/vfio/user-protocol.h hw/vfio/user.c +1 more+300 -03 replies
7/16vfio-user: get device infohw/vfio/pci.c hw/vfio/user-protocol.h hw/vfio/user.c +1 more+47 -03 replies
8/16vfio-user: get region infohw/vfio/common.c hw/vfio/user-protocol.h hw/vfio/user.c +2 more+126 -23 replies
9/16vfio-user: region read/writehw/vfio/common.c hw/vfio/user-protocol.h hw/vfio/user.c +1 more+73 -26 replies
10/16vfio-user: pci_user_realize PCI setuphw/vfio/pci.c+175 -351 reply
11/16vfio-user: get and set IRQshw/vfio/common.c hw/vfio/pci.c hw/vfio/user-protocol.h +2 more+181 -93 replies
12/16vfio-user: proxy container connect/disconnecthw/vfio/common.c hw/vfio/pci.c include/hw/vfio/vfio-common.h+109 -01 reply
13/16vfio-user: dma map/unmap operationshw/vfio/common.c hw/vfio/user-protocol.h hw/vfio/user.c +2 more+226 -81 reply
14/16vfio-user: dma read/write operationshw/vfio/pci.c hw/vfio/user-protocol.h hw/vfio/user.c +1 more+80 -22 replies
15/16vfio-user: pci resethw/vfio/pci.c hw/vfio/user.c hw/vfio/user.h+39 -31 reply
16/16vfio-user: migration supporthw/vfio/common.c hw/vfio/migration.c hw/vfio/pci.c +3 more+115 -201 reply

Reviews trailers per patch

1 of 16 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchStefan Hajnoczi
SeriesR-b R-b
1/16
2/16
3/16
4/16
5/16
6/16
7/16
8/16
9/16
10/16R-b
11/16
12/16
13/16
14/16
15/16
16/16

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

Read the v2 thread

Cover letter [PATCH RFC v2 00/16] vfio-user implementation

Hi

This is v2 of the RFC patches for vfio-user multi-process QEMU project[1].

Thank you for the review of v1 of the RFC patches.

vfio-user is a protocol that allows a device to be emulated in a separate process outside of QEMU. It encapsulates the messages sent from QEMU to the kernel VFIO driver, and sends them to a remote process over a UNIX socket.

The vfio-user framework consists of 3 parts:
1) The protocol specification.
2) A server - the VFIO generic device in QEMU that exchanges the protocol messages with the client.
3) A client - remote process that emulates a device.

This patchset implements parts 1 and 2.
The protocol's specification can be found here [2]:
We also include this as the first patch of the series.

The libvfio-user project (https://github.com/nutanix/libvfio-user)
can be used by a remote process to handle the protocol to implement the third part.
We also worked on implementing a client and will be sending this patch series shortly.

Contributors:

John G Johnson <[email protected]>
John Levon <[email protected]>
Thanos Makatos <[email protected]>
Elena Ufimtseva <[email protected]>
Jagannathan Raman <[email protected]>

Changes in v2:
- combine some patches with relevant functionality.
- use SocketAddress with idea to modify later the command line options.
- define protocol bits in user-protocol.h.
- use QEMU_LOCK_GUARD where appropriate.
- fix the locking when event signaling.
- do not drop BQL on dma map/unmap.
- added checks for message sizes in communication functions.

John Johnson (15):
vfio-user: add VFIO base abstract class
vfio-user: Define type vfio_user_pci_dev_info
vfio-user: connect vfio proxy to remote server
vfio-user: define VFIO Proxy and communication functions
vfio-user: negotiate version with remote server
vfio-user: get device info
vfio-user: get region info
vfio-user: region read/write
vfio-user: pci_user_realize PCI setup
vfio-user: get and set IRQs
vfio-user: proxy container connect/disconnect
vfio-user: dma map/unmap operations
vfio-user: dma read/write operations
vfio-user: pci reset
vfio-user: migration support

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

 docs/devel/index.rst          |    1 +
 docs/devel/vfio-user.rst      | 1809 +++++++++++++++++++++++++++++++++
 hw/vfio/pci.h                 |   25 +-
 hw/vfio/user-protocol.h       |  210 ++++
 hw/vfio/user.h                |   95 ++
 include/hw/vfio/vfio-common.h |    9 +
 hw/vfio/common.c              |  296 +++++-
 hw/vfio/migration.c           |   34 +-
 hw/vfio/pci.c                 |  571 +++++++++--
 hw/vfio/user.c                | 1104 ++++++++++++++++++++
 MAINTAINERS                   |   11 +
 hw/vfio/meson.build           |    1 +
 12 files changed, 4062 insertions(+), 104 deletions(-)
 create mode 100644 docs/devel/vfio-user.rst
 create mode 100644 hw/vfio/user-protocol.h
 create mode 100644 hw/vfio/user.h
 create mode 100644 hw/vfio/user.c
Signature · 1 line
2.25.1