From: John Johnson <john.g.johnson@oracle.com>
To: qemu-devel@nongnu.org
Subject: [RFC v4 00/21] vfio-user client
Date: Tue, 11 Jan 2022 16:43:36 -0800 [thread overview]
Message-ID: <cover.1641584316.git.john.g.johnson@oracle.com> (raw)
Hello,
This is the 4th 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 sent 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 from v3->v4:
vfio-user: introduce vfio-user protocol specification
No v4 specific changess
vfio-user: add VFIO base abstract class
Put all properties except those specific to the ioctl() implementation in the base class
vfio-user: add container IO ops vector
Move will_commit support to dma map/unmap patch below
Use ternary return expression in IO ops vectors
vfio-user: add region cache
New patch with only region cache support
Make vfio_get_region_info return region reference instead of a copy
vfio-user: add device IO ops vector
Move posted write support to region read/write patch below
Move FD receiving code to get region info patch below
Add VDEV_CONFIG_READ/WRITE macros to pci.c for convenient access to PCI config space
Use ternary return expression in IO ops vectors
vfio-user: Define type vfio_user_pci_dev_info
Move secure DMA support to separate patch below
Remove dummy function for vfio_hot_reset_multi ops vector
Add vfio_user_instance_finalize code from connect proxy patch below
vfio-user: connect vfio proxy to remote server
Move vfio_user_instance_finalize code to define type patch above
vfio-user: define socket receive functions
Handle kernel splitting message from server into multiple read()s
Fix incoming message queue handling in vfio_user_request()
Move secure DMA support to separate patch below
Move MAX_FDS and MAX_XFER defines to socket send patch below
vfio-user: define socket send functions
Free pending messages when the reply times out
Add MAX_FDS and MAX_XFER defines from socket recv patch above
Don't set error twice on a capabilities parsing error
vfio-user: get device info
Add vfio_get_all_regions() call
Validate device info return values from server
vfio-user: get region info
Add FD receiving code from device IO ops patch above
Add a generic FD to VFIORegion for mapping device regions
Validate region info return values from server
vfio-user: region read/write
Add posted write support from device IO ops patch above
Check region read/write count against max_xfer
vfio-user: pci_user_realize PCI setup
Refactor realize functions to use common setup functions
vfio-user: get and set IRQs
Validate irq return values from server
vfio-user: proxy container connect/disconnect
No v4 specific changes
vfio-user: dma map/unmap operations
Add wlll_commit support from container IO ops patch above
Rename will_commit to async_ops to describe its operation better
Pass memory region to dma_map op so only vfio-user needs to look up FD
Free pending messages when the reply times out
Move secure DMA support to separate patch below
Set argz in dma_unmap message according to spec
vfio-user: secure DMA support
New patch consolidating all secure DMA support
vfio-user: dma read/write operations
vfio-user: pci reset
No v4 specific changes
vfio-user: migration support
Move qemu file errors fix to its own patch below
Set argz in get_dirty_bitmap message according to spec
Only set qemu file error if saving state if the file exists
New patch with just this fix found during vfio-user development
Removed from v4:
Add validation ops vector
Generic checking moved to the corresponding vfio-user function
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 | 221 +++++
hw/vfio/user.h | 96 +++
include/hw/vfio/vfio-common.h | 73 ++
hw/vfio/ccw.c | 5 -
hw/vfio/common.c | 477 +++++++++--
hw/vfio/migration.c | 34 +-
hw/vfio/pci-quirks.c | 19 +-
hw/vfio/pci.c | 856 ++++++++++++++-----
hw/vfio/user.c | 1596 ++++++++++++++++++++++++++++++++++++
MAINTAINERS | 11 +
hw/vfio/Kconfig | 10 +
hw/vfio/meson.build | 1 +
15 files changed, 4919 insertions(+), 318 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
next reply other threads:[~2022-01-12 0:56 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-12 0:43 John Johnson [this message]
2022-01-12 0:43 ` [RFC v4 01/21] vfio-user: introduce vfio-user protocol specification John Johnson
2022-02-14 13:10 ` Thanos Makatos
2022-03-09 22:34 ` Alex Williamson
2022-03-10 10:20 ` John Levon
2022-03-14 6:04 ` John Johnson
2022-03-15 21:43 ` Thanos Makatos
2022-03-15 22:28 ` Alex Williamson
2022-07-22 6:23 ` John Johnson
2022-01-12 0:43 ` [RFC v4 02/21] vfio-user: add VFIO base abstract class John Johnson
2022-01-12 0:43 ` [RFC v4 03/21] vfio-user: add container IO ops vector John Johnson
2022-01-12 0:43 ` [RFC v4 04/21] vfio-user: add region cache John Johnson
2022-03-09 23:40 ` Alex Williamson
2022-01-12 0:43 ` [RFC v4 05/21] vfio-user: add device IO ops vector John Johnson
2022-01-12 0:43 ` [RFC v4 06/21] vfio-user: Define type vfio_user_pci_dev_info John Johnson
2022-01-12 0:43 ` [RFC v4 07/21] vfio-user: connect vfio proxy to remote server John Johnson
2022-01-12 0:43 ` [RFC v4 08/21] vfio-user: define socket receive functions John Johnson
2022-02-03 21:53 ` Thanos Makatos
2022-02-04 12:42 ` Thanos Makatos
2022-02-07 7:07 ` John Johnson
2022-02-15 13:35 ` Thanos Makatos
2022-02-15 14:50 ` Thanos Makatos
2022-02-16 2:09 ` John Johnson
2022-02-16 9:31 ` Thanos Makatos
2022-01-12 0:43 ` [RFC v4 09/21] vfio-user: define socket send functions John Johnson
2022-01-26 10:17 ` Thanos Makatos
2022-02-07 7:09 ` John Johnson
2022-01-12 0:43 ` [RFC v4 10/21] vfio-user: get device info John Johnson
2022-01-12 0:43 ` [RFC v4 11/21] vfio-user: get region info John Johnson
2022-01-12 0:43 ` [RFC v4 12/21] vfio-user: region read/write John Johnson
2022-01-26 21:57 ` Thanos Makatos
2022-01-12 0:43 ` [RFC v4 13/21] vfio-user: pci_user_realize PCI setup John Johnson
2022-01-12 0:43 ` [RFC v4 14/21] vfio-user: get and set IRQs John Johnson
2022-01-12 0:43 ` [RFC v4 15/21] vfio-user: proxy container connect/disconnect John Johnson
2022-01-12 0:43 ` [RFC v4 16/21] vfio-user: dma map/unmap operations John Johnson
2022-01-12 0:43 ` [RFC v4 17/21] vfio-user: secure DMA support John Johnson
2022-01-12 0:43 ` [RFC v4 18/21] vfio-user: dma read/write operations John Johnson
2022-01-12 0:43 ` [RFC v4 19/21] vfio-user: pci reset John Johnson
2022-01-12 0:43 ` [RFC v4 20/21] vfio-user: migration support John Johnson
2022-02-11 13:31 ` Thanos Makatos
2022-02-14 18:50 ` John Johnson
2022-02-15 14:53 ` Thanos Makatos
2022-01-12 0:43 ` [RFC v4 21/21] Only set qemu file error if saving state so the file exists 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.1641584316.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.