[PATCH v2 00/23] vfio-user client

John Johnson posted 23 patches 1 year, 2 months ago
There is a newer version of this series
docs/devel/index-internals.rst |    1 +
docs/devel/vfio-user.rst       | 1522 +++++++++++++++++++++++++++++
hw/vfio/pci.h                  |   35 +-
hw/vfio/user-protocol.h        |  243 +++++
hw/vfio/user.h                 |  116 +++
include/hw/vfio/vfio-common.h  |   65 ++
hw/vfio/ap.c                   |    2 +
hw/vfio/ccw.c                  |    8 +-
hw/vfio/common.c               |  548 ++++++++---
hw/vfio/igd.c                  |   23 +-
hw/vfio/migration.c            |    2 -
hw/vfio/pci-quirks.c           |   19 +-
hw/vfio/pci.c                  |  557 ++++++-----
hw/vfio/platform.c             |    3 +
hw/vfio/user-pci.c             |  435 +++++++++
hw/vfio/user.c                 | 2057 ++++++++++++++++++++++++++++++++++++++++
MAINTAINERS                    |    9 +
hw/vfio/Kconfig                |   10 +
hw/vfio/meson.build            |    2 +
hw/vfio/trace-events           |   15 +
20 files changed, 5283 insertions(+), 389 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-pci.c
create mode 100644 hw/vfio/user.c
[PATCH v2 00/23] vfio-user client
Posted by John Johnson 1 year, 2 months ago

Hello,

This is the 2nd patch 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 have upstreamed a patch series that implement a server using QEMU.


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 fron v1:

John Johnson (22):
  vfio-user: add VFIO base abstract class

rename VFIOKernPCIDevice to VFIOKernelPCIDevice

  vfio-user: add container IO ops vector

make vfio_cont_io_ioctl static
remove VFIOContIO CONT_* macros
rename VFIOContIO to VFIOContainerIO
rename VFIOContainer io_ops field to io

  vfio-user: add region cache

none

  vfio-user: add device IO ops vector

remove VFIODevIO VDEV_* macros
rename VFIODevIO to VFIODeviceIO
remove get_info operation from VFIODeviceIO
move short read/write check to patch 12

  vfio-user: Define type vfio_user_pci_dev_info

removed reset tests
add user-pci.c file for PCI specific vfio-user code
move pci.[ch] changes to user-pci.c

  vfio-user: connect vfio proxy to remote server

rename VFIOProxy to VFIOUserProxy
propoagate error return from vfio_user_connect_dev()
move pci.c changes to user-pci.c

  vfio-user: define socket receive functions

vfio_user_process: fix function name in error case
move pci.c changes to user-pci.c

  vfio-user: define socket send functions

set message error in vfio_user_send_wait() on invalid flags
use warn_report in caps_parse()
move pci.[ch] changes to user-pci.c

  vfio-user: get device info

remove caps_offset from VFIOUserDeviceInfo
add vfio_get_device() to user.c
change get_info operation to a vfio_get_device() call
typo:  struct_device_info -> struct vfio_device_info
move pci.c changes to user-pci.c

  vfio-user: get region info

add use_regfds boolean to VFIODevice instead of testing proxy
make vfio_user_get_region_info() return E2BIG on invalid argsz
typo:  struct_vfio -> struct vfio

  vfio-user: region read/write

add short read/write check from patch 05
move pci.c changes to user-pci.c

  vfio-user: pci_user_realize PCI setup

add pci notifier calls from patch 14
add user_instance finalize code from patch 16
move pci.c changes to user-pci.c

  vfio-user: get and set IRQs

move pci notifier calls to patch 13

  vfio-user: forward msix BAR accesses to server

rename irq_mask_works to can_mask_irq
move pci.c changes to user-pci.c

  vfio-user: proxy container connect/disconnect

refactor common IOMMU group code to be shared
move user_instance finalize code to patch 13
add user.h prototypes for vfio_user_{get,put}_group()
move common.c changes to user.c
move pci.c changes to user-pci.c

  vfio-user: dma map/unmap operations
  vfio-user: add dma_unmap_all

none

  vfio-user: no-mmap DMA support

rename secure-dma to no-mmap
move pci.[ch] changes to user-pci.c

  vfio-user: dma read/write operations

vfio_user_procss_req: fix function name in error case
move pci.c changes to user-pci.c

  vfio-user: pci reset

move pci.c changes to user-pci.c

  vfio-user: add 'x-msg-timeout' option that specifies msg wait times

initialize wait_time directly from command line property list
move pci.[ch] changes to user-pci.c

  vfio-user: add coalesced posted writes

elaborated coalesced write usage in commit msg

Removed from v1:

  vfio-user: add trace points

trace points distributed to other patches


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

 docs/devel/index-internals.rst |    1 +
 docs/devel/vfio-user.rst       | 1522 +++++++++++++++++++++++++++++
 hw/vfio/pci.h                  |   35 +-
 hw/vfio/user-protocol.h        |  243 +++++
 hw/vfio/user.h                 |  116 +++
 include/hw/vfio/vfio-common.h  |   65 ++
 hw/vfio/ap.c                   |    2 +
 hw/vfio/ccw.c                  |    8 +-
 hw/vfio/common.c               |  548 ++++++++---
 hw/vfio/igd.c                  |   23 +-
 hw/vfio/migration.c            |    2 -
 hw/vfio/pci-quirks.c           |   19 +-
 hw/vfio/pci.c                  |  557 ++++++-----
 hw/vfio/platform.c             |    3 +
 hw/vfio/user-pci.c             |  435 +++++++++
 hw/vfio/user.c                 | 2057 ++++++++++++++++++++++++++++++++++++++++
 MAINTAINERS                    |    9 +
 hw/vfio/Kconfig                |   10 +
 hw/vfio/meson.build            |    2 +
 hw/vfio/trace-events           |   15 +
 20 files changed, 5283 insertions(+), 389 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-pci.c
 create mode 100644 hw/vfio/user.c

-- 
1.9.4