[PATCH RFC server v2 00/11] vfio-user server in QEMU

Jagannathan Raman posted 11 patches 2 years, 8 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/cover.1630084211.git.jag.raman@oracle.com
Maintainers: Jagannathan Raman <jag.raman@oracle.com>, Elena Ufimtseva <elena.ufimtseva@oracle.com>, Juan Quintela <quintela@redhat.com>, John G Johnson <john.g.johnson@oracle.com>, Cleber Rosa <crosa@redhat.com>, "Philippe Mathieu-Daudé" <philmd@redhat.com>, Wainer dos Santos Moschetta <wainersm@redhat.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>
There is a newer version of this series
configure                     |  11 +
meson.build                   |  28 ++
qapi/qom.json                 |  20 +-
include/hw/remote/iohub.h     |   2 +
migration/savevm.h            |   2 +
hw/remote/iohub.c             |   5 +
hw/remote/vfio-user-obj.c     | 803 ++++++++++++++++++++++++++++++++++++++++++
migration/savevm.c            |  73 ++++
.gitmodules                   |   3 +
MAINTAINERS                   |   9 +
hw/remote/meson.build         |   3 +
hw/remote/trace-events        |  10 +
subprojects/libvfio-user      |   1 +
tests/acceptance/vfio-user.py |  94 +++++
14 files changed, 1062 insertions(+), 2 deletions(-)
create mode 100644 hw/remote/vfio-user-obj.c
create mode 160000 subprojects/libvfio-user
create mode 100644 tests/acceptance/vfio-user.py
[PATCH RFC server v2 00/11] vfio-user server in QEMU
Posted by Jagannathan Raman 2 years, 8 months ago
Hi,

This series depends on the following series from
Elena Ufimtseva <elena.ufimtseva@oracle.com>:
[PATCH RFC v2 00/16] vfio-user implementation

Thank you for your feedback for the v1 patches!
https://www.mail-archive.com/qemu-devel@nongnu.org/msg825021.html

We have incorporated the following feedback from v1 of the
review cycle:

[PATCH RFC server v2 01/11] vfio-user: build library
  - Using cmake subproject to build libvfio-user

[PATCH RFC server v2 02/11] vfio-user: define vfio-user object
  - Added check to confirm that TYPE_REMOTE_MACHINE is used
    with TYPE_VFU_OBJECT

[PATCH RFC server v2 04/11] vfio-user: find and init PCI device
  - Removed call to vfu_pci_set_id()
  - Added check to confirm that TYPE_PCI_DEVICE is used with
    TYPE_VFU_OBJECT

[PATCH RFC server v2 05/11] vfio-user: run vfio-user context
  - Using QEMU main-loop to drive the vfu_ctx (using
    vfu_get_poll_fd() & qemu_set_fd_handler())
  - Set vfu_ctx to non-blocking mode (LIBVFIO_USER_FLAG_ATTACH_NB)
  - Modified how QEMU attaches to the vfu_ctx

[PATCH RFC server v2 06/11] handle PCI config space accesses
  - Broke-up PCI config space access to 4-byte accesses

[PATCH RFC server v2 07/11] vfio-user: handle DMA mappings
  - Received feedback to assert that vfu_dma_info_t->vaddr is not
    NULL - unable to do it as it appears to be a valid case.

[PATCH RFC server v2 10/11] register handlers to facilitate migration
  - Migrate only one device's data per contect

Would appreciate if you could kindly review this v2 series. Looking
forward to your comments.

Thank you!

Jagannathan Raman (11):
  vfio-user: build library
  vfio-user: define vfio-user object
  vfio-user: instantiate vfio-user context
  vfio-user: find and init PCI device
  vfio-user: run vfio-user context
  vfio-user: handle PCI config space accesses
  vfio-user: handle DMA mappings
  vfio-user: handle PCI BAR accesses
  vfio-user: handle device interrupts
  vfio-user: register handlers to facilitate migration
  vfio-user: acceptance test

 configure                     |  11 +
 meson.build                   |  28 ++
 qapi/qom.json                 |  20 +-
 include/hw/remote/iohub.h     |   2 +
 migration/savevm.h            |   2 +
 hw/remote/iohub.c             |   5 +
 hw/remote/vfio-user-obj.c     | 803 ++++++++++++++++++++++++++++++++++++++++++
 migration/savevm.c            |  73 ++++
 .gitmodules                   |   3 +
 MAINTAINERS                   |   9 +
 hw/remote/meson.build         |   3 +
 hw/remote/trace-events        |  10 +
 subprojects/libvfio-user      |   1 +
 tests/acceptance/vfio-user.py |  94 +++++
 14 files changed, 1062 insertions(+), 2 deletions(-)
 create mode 100644 hw/remote/vfio-user-obj.c
 create mode 160000 subprojects/libvfio-user
 create mode 100644 tests/acceptance/vfio-user.py

-- 
1.8.3.1


Re: [PATCH RFC server v2 00/11] vfio-user server in QEMU
Posted by Stefan Hajnoczi 2 years, 7 months ago
Hi Jag,
I have finished reviewing these patches and left comments. I didn't take
a look at the libvfio-user's implementation.

Stefan
Re: [PATCH RFC server v2 00/11] vfio-user server in QEMU
Posted by Jag Raman 2 years, 7 months ago

> On Sep 9, 2021, at 4:17 AM, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> 
> Hi Jag,
> I have finished reviewing these patches and left comments. I didn't take
> a look at the libvfio-user's implementation.

Thank you for you comments, Stefan - we’ll get cracking on them. :)

--
Jag

> 
> Stefan