Hello,
This is the 3rd revision of the vfio-user client implementation.
First of all, thank you for your time reviewing the previous versions.
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.
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 server with QEMU that is a separate
patch series.
Contributors:
John G Johnson <john.g.johnson@oracle.com>
John Levon <john.levon@nutanix.com>
Thanos Makatos <thanos.makatos@nutanix.com>
Elena Ufimtseva <elena.ufimtseva@oracle.com>
Jagannathan Raman <jag.raman@oracle.com>
Changes from v2->v3:
John Johnson (18):
vfio-user: add VFIO base abstract class
Moved common vfio pci cli options to base class
Add container IO ops vector
Added ops vectors to decide to use ioctl() or socket implementation
Add device IO ops vector
Added ops vectors to decide to use ioctl() or socket implementation
Add validation ops vector
Added validation vector to check user replies
vfio-user: Define type vfio_user_pci_dev_info
Added separate VFIO_USER_PCI config element to control whether vfio-user is compiled
Fix scalar spelling
vfio-user: connect vfio proxy to remote server
Made socket IO non-blocking
Use g_strdup_printf to save socket name
vfio-user: define socket receive functions
Made socket IO non-blocking
Process inbound commands in main loop thread to avoid BQL interactions with recv
Added comment describing inbound command callback usage
Use true/false instead of 1/0 for booleans
vfio-user: define socket send functions
Made socket IO non-blocking
Added version string NULL termination check
vfio-user: get device info
Added ops vectors to decide to use ioctl() or socket implementation
Added validation vector to check user replies
vfio-user: get region info
Added ops vectors to decide to use ioctl() or socket implementation
Added validation vector to check user replies
Remove merge bug that filled region cache twice
vfio-user: region read/write
Added ops vectors to decide to use ioctl() or socket implementation
Added validation vector to check user replies
Made posted write conditional on region not mapped
vfio-user: pci_user_realize PCI setup
Moved common vfio pci cli options to base class
vfio-user: get and set IRQs
Added ops vectors to decide to use ioctl() or socket implementation
Added validation vector to check user replies
Fixed %m usage when not using syscall
vfio-user: proxy container connect/disconnect
Added separate VFIO_USER_PCI config element to control whether vfio-user is compiled
Use true/false instead of 1/0 for booleans
vfio-user: dma map/unmap operations
Added ops vectors to decide to use ioctl() or socket implementation
Use BQL instead of iolock in comments
Fixed %m usage when not using syscall
vfio-user: dma read/write operations
Added header checking before loading DMA message content
Added error handling if DMA fails
vfio-user: pci reset
no r3-specific changes
vfio-user: migration support
generic fix: only set qemu file error if there is a file
Thanos Makatos (1):
vfio-user: introduce vfio-user protocol specification
Spec specifies host endiannes instead of always LE
Fixed grammar error
docs/devel/index.rst | 1 +
docs/devel/vfio-user.rst | 1810 +++++++++++++++++++++++++++++++++++++++++
hw/vfio/pci.h | 27 +-
hw/vfio/user-protocol.h | 210 +++++
hw/vfio/user.h | 96 +++
include/hw/vfio/vfio-common.h | 95 +++
hw/vfio/common.c | 489 +++++++++--
hw/vfio/migration.c | 34 +-
hw/vfio/pci.c | 740 ++++++++++++++---
hw/vfio/user.c | 1559 +++++++++++++++++++++++++++++++++++
MAINTAINERS | 11 +
hw/vfio/Kconfig | 10 +
hw/vfio/meson.build | 1 +
13 files changed, 4896 insertions(+), 187 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
--
1.8.3.1