[PATCH v9 00/17] vfio-user server in QEMU

Jagannathan Raman posted 17 patches 1 year, 12 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/cover.1651586203.git.jag.raman@oracle.com
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>, Thomas Huth <thuth@redhat.com>, Wainer dos Santos Moschetta <wainersm@redhat.com>, Beraldo Leal <bleal@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Eduardo Habkost <eduardo@habkost.net>, "Michael S. Tsirkin" <mst@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Elena Ufimtseva <elena.ufimtseva@oracle.com>, Jagannathan Raman <jag.raman@oracle.com>, John G Johnson <john.g.johnson@oracle.com>, Peter Xu <peterx@redhat.com>, David Hildenbrand <david@redhat.com>, Eric Blake <eblake@redhat.com>, Markus Armbruster <armbru@redhat.com>, Cleber Rosa <crosa@redhat.com>, Alexander Bulekov <alxndr@bu.edu>, Bandan Das <bsd@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, Darren Kenny <darren.kenny@oracle.com>, Qiuhao Li <Qiuhao.Li@outlook.com>, Laurent Vivier <lvivier@redhat.com>
There is a newer version of this series
configure                                  |  36 +-
meson.build                                |  44 +-
qapi/misc.json                             |  30 +
qapi/qom.json                              |  20 +-
include/exec/memory.h                      |   3 +
include/hw/pci/pci.h                       |  13 +
include/hw/qdev-core.h                     |  29 +
include/hw/remote/iommu.h                  |  40 +
include/hw/remote/machine.h                |   4 +
include/hw/remote/vfio-user-obj.h          |   6 +
hw/core/qdev.c                             |  24 +
hw/pci/msi.c                               |  16 +-
hw/pci/msix.c                              |  10 +-
hw/pci/pci.c                               |  13 +
hw/remote/iommu.c                          | 131 +++
hw/remote/machine.c                        |  88 +-
hw/remote/vfio-user-obj.c                  | 898 +++++++++++++++++++++
softmmu/physmem.c                          |   4 +-
softmmu/qdev-monitor.c                     |   4 +
stubs/vfio-user-obj.c                      |   6 +
tests/qtest/fuzz/generic_fuzz.c            |   9 +-
.gitlab-ci.d/buildtest.yml                 |   2 +
.gitmodules                                |   3 +
Kconfig.host                               |   4 +
MAINTAINERS                                |   6 +
hw/remote/Kconfig                          |   4 +
hw/remote/meson.build                      |   4 +
hw/remote/trace-events                     |  11 +
meson_options.txt                          |   3 +
stubs/meson.build                          |   1 +
subprojects/libvfio-user                   |   1 +
tests/avocado/avocado_qemu/__init__.py     |  14 +-
tests/avocado/vfio-user.py                 | 164 ++++
tests/docker/dockerfiles/centos8.docker    |   2 +
tests/docker/dockerfiles/ubuntu2004.docker |   2 +
35 files changed, 1625 insertions(+), 24 deletions(-)
create mode 100644 include/hw/remote/iommu.h
create mode 100644 include/hw/remote/vfio-user-obj.h
create mode 100644 hw/remote/iommu.c
create mode 100644 hw/remote/vfio-user-obj.c
create mode 100644 stubs/vfio-user-obj.c
create mode 160000 subprojects/libvfio-user
create mode 100644 tests/avocado/vfio-user.py
[PATCH v9 00/17] vfio-user server in QEMU
Posted by Jagannathan Raman 1 year, 12 months ago
Hi,

This is v9 of the server side changes to enable vfio-user in QEMU.

Thank you very much for reviewing the last revision of this series!

We've made the following changes in this revision:

[PATCH v9 02/17] qdev: unplug blocker for devices
  - updated commit message with more details

[PATCH v9 06/17] vfio-user: build library
  - updated commit message with license information

[PATCH v9 07/17] vfio-user: define vfio-user-server object
  - fixed type with libvfio-user library name in comments for
    VfioUserServerProperties

[PATCH v9 10/17] vfio-user: run vfio-user context
  - added the QOM patchs of the PCI device and server to
    VFU_CLIENT_HANGUP event

[PATCH v9 12/17] vfio-user: IOMMU support for remote device
  - added comments to describe the design of the remote machine's IOMMU

[PATCH v9 14/17] vfio-user: handle PCI BAR accesses
  - unref memory region during early exit in vfu_object_bar_rw()

Jagannathan Raman (17):
  tests/avocado: Specify target VM argument to helper routines
  qdev: unplug blocker for devices
  remote/machine: add HotplugHandler for remote machine
  remote/machine: add vfio-user property
  configure: require cmake 3.19 or newer
  vfio-user: build library
  vfio-user: define vfio-user-server 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: IOMMU support for remote device
  vfio-user: handle DMA mappings
  vfio-user: handle PCI BAR accesses
  vfio-user: handle device interrupts
  vfio-user: handle reset of remote device
  vfio-user: avocado tests for vfio-user

 configure                                  |  36 +-
 meson.build                                |  44 +-
 qapi/misc.json                             |  30 +
 qapi/qom.json                              |  20 +-
 include/exec/memory.h                      |   3 +
 include/hw/pci/pci.h                       |  13 +
 include/hw/qdev-core.h                     |  29 +
 include/hw/remote/iommu.h                  |  40 +
 include/hw/remote/machine.h                |   4 +
 include/hw/remote/vfio-user-obj.h          |   6 +
 hw/core/qdev.c                             |  24 +
 hw/pci/msi.c                               |  16 +-
 hw/pci/msix.c                              |  10 +-
 hw/pci/pci.c                               |  13 +
 hw/remote/iommu.c                          | 131 +++
 hw/remote/machine.c                        |  88 +-
 hw/remote/vfio-user-obj.c                  | 898 +++++++++++++++++++++
 softmmu/physmem.c                          |   4 +-
 softmmu/qdev-monitor.c                     |   4 +
 stubs/vfio-user-obj.c                      |   6 +
 tests/qtest/fuzz/generic_fuzz.c            |   9 +-
 .gitlab-ci.d/buildtest.yml                 |   2 +
 .gitmodules                                |   3 +
 Kconfig.host                               |   4 +
 MAINTAINERS                                |   6 +
 hw/remote/Kconfig                          |   4 +
 hw/remote/meson.build                      |   4 +
 hw/remote/trace-events                     |  11 +
 meson_options.txt                          |   3 +
 stubs/meson.build                          |   1 +
 subprojects/libvfio-user                   |   1 +
 tests/avocado/avocado_qemu/__init__.py     |  14 +-
 tests/avocado/vfio-user.py                 | 164 ++++
 tests/docker/dockerfiles/centos8.docker    |   2 +
 tests/docker/dockerfiles/ubuntu2004.docker |   2 +
 35 files changed, 1625 insertions(+), 24 deletions(-)
 create mode 100644 include/hw/remote/iommu.h
 create mode 100644 include/hw/remote/vfio-user-obj.h
 create mode 100644 hw/remote/iommu.c
 create mode 100644 hw/remote/vfio-user-obj.c
 create mode 100644 stubs/vfio-user-obj.c
 create mode 160000 subprojects/libvfio-user
 create mode 100644 tests/avocado/vfio-user.py

-- 
2.20.1
Re: [PATCH v9 00/17] vfio-user server in QEMU
Posted by Markus Armbruster 1 year, 11 months ago
Does not apply for me.  What's your base?
Re: [PATCH v9 00/17] vfio-user server in QEMU
Posted by Jag Raman 1 year, 11 months ago

> On May 4, 2022, at 7:37 AM, Markus Armbruster <armbru@redhat.com> wrote:
> 
> Does not apply for me.  What's your base?

The base I used is f5643914a9e8f79c606a76e6a9d7ea82a3fc3e65.

The patchew tool says it was able to apply the patches:
https://patchew.org/QEMU/cover.1651586203.git.jag.raman@oracle.com/

The client side changes required are still under review. But the
following repo has this series applied on top of the client:
repo URL: https://github.com/oracle/qemu
branch: vfio-user-v5client-v9server

Thank you!
--
Jag

> 
Re: [PATCH v9 00/17] vfio-user server in QEMU
Posted by Markus Armbruster 1 year, 11 months ago
Jag Raman <jag.raman@oracle.com> writes:

>> On May 4, 2022, at 7:37 AM, Markus Armbruster <armbru@redhat.com> wrote:
>> 
>> Does not apply for me.  What's your base?
>
> The base I used is f5643914a9e8f79c606a76e6a9d7ea82a3fc3e65.
>
> The patchew tool says it was able to apply the patches:
> https://patchew.org/QEMU/cover.1651586203.git.jag.raman@oracle.com/

Local tooling error, sorry for the noise.