All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Johnson <john.g.johnson@oracle.com>
To: qemu-devel@nongnu.org
Subject: [RFC v3 00/19] vfio-user client
Date: Mon,  8 Nov 2021 16:46:28 -0800	[thread overview]
Message-ID: <cover.1636057885.git.john.g.johnson@oracle.com> (raw)

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



             reply	other threads:[~2021-11-09  0:48 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-09  0:46 John Johnson [this message]
2021-11-09  0:46 ` [RFC v3 01/19] vfio-user: introduce vfio-user protocol specification John Johnson
2021-11-09  0:46 ` [RFC v3 02/19] vfio-user: add VFIO base abstract class John Johnson
2021-11-19 22:42   ` Alex Williamson
2021-12-07  7:47     ` John Johnson
2021-11-09  0:46 ` [RFC v3 03/19] Add container IO ops vector John Johnson
2021-11-09  0:46 ` [RFC v3 04/19] Add device " John Johnson
2021-11-19 22:42   ` Alex Williamson
2021-12-07  7:48     ` John Johnson
2021-11-09  0:46 ` [RFC v3 05/19] Add validation " John Johnson
2021-11-19 22:42   ` Alex Williamson
2021-12-07  7:48     ` John Johnson
2021-11-09  0:46 ` [RFC v3 06/19] vfio-user: Define type vfio_user_pci_dev_info John Johnson
2021-11-19 22:42   ` Alex Williamson
2021-12-07  7:49     ` John Johnson
2021-11-09  0:46 ` [RFC v3 07/19] vfio-user: connect vfio proxy to remote server John Johnson
2021-11-19 22:42   ` Alex Williamson
2021-12-07  7:49     ` John Johnson
2021-11-09  0:46 ` [RFC v3 08/19] vfio-user: define socket receive functions John Johnson
2021-11-19 22:42   ` Alex Williamson
2021-12-07  7:49     ` John Johnson
2021-11-09  0:46 ` [RFC v3 09/19] vfio-user: define socket send functions John Johnson
2021-11-09  0:46 ` [RFC v3 10/19] vfio-user: get device info John Johnson
2021-11-09  0:46 ` [RFC v3 11/19] vfio-user: get region info John Johnson
2021-11-19 22:42   ` Alex Williamson
2021-12-07  7:50     ` John Johnson
2021-11-09  0:46 ` [RFC v3 12/19] vfio-user: region read/write John Johnson
2021-11-19 22:42   ` Alex Williamson
2021-12-07  7:50     ` John Johnson
2021-11-09  0:46 ` [RFC v3 13/19] vfio-user: pci_user_realize PCI setup John Johnson
2021-11-19 22:42   ` Alex Williamson
2021-12-07  7:50     ` John Johnson
2021-11-09  0:46 ` [RFC v3 14/19] vfio-user: get and set IRQs John Johnson
2021-11-09  0:46 ` [RFC v3 15/19] vfio-user: proxy container connect/disconnect John Johnson
2021-11-09  0:46 ` [RFC v3 16/19] vfio-user: dma map/unmap operations John Johnson
2021-11-19 22:42   ` Alex Williamson
2021-12-07  7:50     ` John Johnson
2021-11-09  0:46 ` [RFC v3 17/19] vfio-user: dma read/write operations John Johnson
2021-11-09  0:46 ` [RFC v3 18/19] vfio-user: pci reset John Johnson
2021-11-09  0:46 ` [RFC v3 19/19] vfio-user: migration support John Johnson
2021-11-19 22:42   ` Alex Williamson
2021-12-07  7:50     ` John Johnson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1636057885.git.john.g.johnson@oracle.com \
    --to=john.g.johnson@oracle.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.