All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v7 00/17] vfio-user server in QEMU
@ 2022-03-25 19:19 Jagannathan Raman
  2022-03-25 19:19 ` [PATCH v7 01/17] tests/avocado: Specify target VM argument to helper routines Jagannathan Raman
                   ` (16 more replies)
  0 siblings, 17 replies; 44+ messages in thread
From: Jagannathan Raman @ 2022-03-25 19:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: eduardo, elena.ufimtseva, john.g.johnson, berrange, bleal,
	john.levon, mst, armbru, quintela, f4bug, alex.williamson,
	kanth.ghatraju, stefanha, thanos.makatos, pbonzini, jag.raman,
	eblake, dgilbert

Hi,

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

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

In this revision, we've dropped the patches concerning migration
due to a major changes in the VFIO PCI protocol. We are changing the
client, library and server to conform with the updated spec, and
will send the migration patches for review separately.

The review of client side changes are happening parallelly [1]. The
avocado test in Patch 17 of this series depends on the client, as
such it has to wait until client changes are available. However,
we run the avocado test, among others, to confirm that the server
is working as expected - we do it before submitting patches for
review each time. The following repo applies this series on the
latest client, in case anyone would like to run vfio-user.
repo: https://github.com/oracle/qemu
branch: vfio-user-client-v7server
launcher: scripts/vfiouser-launcher.py
[1]: https://lore.kernel.org/all/6d8ae21cbade8f4bb7eaca4da29e57f0cb1a03f3.1641584317.git.john.g.johnson@oracle.com/T/

We've made the following changes in this revision:

[PATCH v7 02/17] qdev: unplug blocker for devices
  - corrects comments to prevent creation of new section for
    unplug blocker
  - adds an assert to device_finalize() to confirm that device
    does not have unplug blockers
  - moves the unplug blocker functions to hw/core/qdev.c
  - moves test for unplug blocker to qdev_unplug() from qmp_device_del()

[PATCH v7 05/17] configure: require cmake 3.19 or newer
  - new in this series

[PATCH v7 06/17] vfio-user: build library
  - configure script sets cmake_required flag for vfio user

[PATCH v7 07/17] vfio-user: define vfio-user-server object
  - adds auto-shutdown sub-option to the remote machine
  - adds boolean auto_shutdown to TYPE_REMOTE_MACHINE's class
  - adds vfu_object_auto_shutdown() helper function to
    vfio-user-obj.c to query the auto-shutdown property
    from the machine
  - reworks VFU_OBJECT_ERROR() & vfu_object_finalize() to use
    the helper function above.
  - updates QEMU version to 7.1 in commentary for VfioUserServerProperties

[PATCH v7 08/17] vfio-user: instantiate vfio-user context
  - moves phase_check() after the check for machine type
    in vfu_object_init()
  - sets o->vfu_ctx to NULL in vfu_object_finalize()

[PATCH v7 09/17] vfio-user: find and init PCI device
  - holds a reference to attached device in the server,
    and unrefs it during cleanup

[PATCH v7 10/17] vfio-user: run vfio-user context
  - updates QEMU version to 7.1 in commentary for VFU_CLIENT_HANGUP

[PATCH v7 11/17] vfio-user: handle PCI config space accesses
  - adds a comment explaining that writes to BAR register in
    config space doesn't create conflicting memory regions

[PATCH v7 12/17] vfio-user: IOMMU support for remote device
  - passes IOMMU table as an opaque data to pci_setup_iommu()
  - adds locking to access the table to enable concurrent access
  - retains the global data structure as remote_iommu_del_device()
    needs it because it doesn't have access to the opaque data
  - removes redundant check to confirm if hash table is present
    in remote_iommu_find_add_as()
  - adds remote_iommu_del_elem() to free IOMMU entry when it
    is removed from the table

[PATCH v7 14/17] vfio-user: handle PCI BAR accesses
  - adjusts the 'offset' in vfu_object_bar_rw() - MemoryRegion
    returned by memory_region_find() could be a subregion of the
    root memory region referenced by pci_dev->io_regions[pci_bar].memory.
    'offset' input argument is relative to the root region, whereas it
    must be relative to the subregion before access.
  - adds warning for out-of-range access

[PATCH v7 15/17] vfio-user: handle device interrupts
  - moves msi_nonbroken initialization to hw/remote/machine.c
  - adds irq_opaque to PCIDevice which the interrupt notification
    could use; drops global hash table which map device to
    vfio-user context
  - removes NULL function pointer test in msi_notify and msix_notify
  - vfu_object_msi_notify() asserts that IRQ vector is allocated

[PATCH v7 16/17] vfio-user: handle reset of remote device
  - adds comment to explain lost connection handling

[PATCH v7 17/17] vfio-user: avocado tests for vfio-user
  - drops the migration test

Dropped the following patches:
configure, meson: override C compiler for cmake
softmmu/vl: defer backend init
vfio-user: register handlers to facilitate migration

We are looking forward to your comments.

Thank you very much!

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                             |  23 +
 qapi/qom.json                              |  20 +-
 include/exec/memory.h                      |   3 +
 include/hw/pci/pci.h                       |  10 +
 include/hw/qdev-core.h                     |  29 +
 include/hw/remote/iommu.h                  |  18 +
 include/hw/remote/machine.h                |  10 +-
 include/hw/remote/vfio-user-obj.h          |   6 +
 hw/core/qdev.c                             |  24 +
 hw/pci/msi.c                               |  11 +-
 hw/pci/msix.c                              |  10 +-
 hw/remote/iommu.c                          |  95 +++
 hw/remote/machine.c                        |  73 +-
 hw/remote/vfio-user-obj.c                  | 847 +++++++++++++++++++++
 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 +
 34 files changed, 1483 insertions(+), 20 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



^ permalink raw reply	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2022-04-19  8:51 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-25 19:19 [PATCH v7 00/17] vfio-user server in QEMU Jagannathan Raman
2022-03-25 19:19 ` [PATCH v7 01/17] tests/avocado: Specify target VM argument to helper routines Jagannathan Raman
2022-03-25 19:19 ` [PATCH v7 02/17] qdev: unplug blocker for devices Jagannathan Raman
2022-03-29 10:08   ` Stefan Hajnoczi
2022-03-25 19:19 ` [PATCH v7 03/17] remote/machine: add HotplugHandler for remote machine Jagannathan Raman
2022-03-25 19:19 ` [PATCH v7 04/17] remote/machine: add vfio-user property Jagannathan Raman
2022-03-25 19:19 ` [PATCH v7 05/17] configure: require cmake 3.19 or newer Jagannathan Raman
2022-03-25 19:19 ` [PATCH v7 06/17] vfio-user: build library Jagannathan Raman
2022-03-25 19:19 ` [PATCH v7 07/17] vfio-user: define vfio-user-server object Jagannathan Raman
2022-03-29 10:21   ` Stefan Hajnoczi
2022-03-29 14:03     ` Jag Raman
2022-03-25 19:19 ` [PATCH v7 08/17] vfio-user: instantiate vfio-user context Jagannathan Raman
2022-03-29 10:26   ` Stefan Hajnoczi
2022-03-25 19:19 ` [PATCH v7 09/17] vfio-user: find and init PCI device Jagannathan Raman
2022-03-25 19:19 ` [PATCH v7 10/17] vfio-user: run vfio-user context Jagannathan Raman
2022-03-25 19:19 ` [PATCH v7 11/17] vfio-user: handle PCI config space accesses Jagannathan Raman
2022-03-25 19:19 ` [PATCH v7 12/17] vfio-user: IOMMU support for remote device Jagannathan Raman
2022-03-29 12:35   ` Stefan Hajnoczi
2022-03-29 14:12     ` Jag Raman
2022-03-29 14:48       ` Stefan Hajnoczi
2022-03-29 19:58         ` Jag Raman
2022-03-30 10:04           ` Stefan Hajnoczi
2022-03-30 12:53             ` Peter Xu
2022-03-30 16:08               ` Stefan Hajnoczi
2022-03-30 17:13                 ` Peter Xu
2022-03-31  9:47                   ` Stefan Hajnoczi
2022-03-31 12:41                     ` Peter Xu
2022-04-13 14:37                       ` Igor Mammedov
2022-04-13 19:08                         ` Peter Xu
2022-04-19  8:48                           ` Igor Mammedov
2022-04-13 14:25   ` Igor Mammedov
2022-04-13 18:25     ` Jag Raman
2022-04-13 21:59       ` Jag Raman
2022-03-25 19:19 ` [PATCH v7 13/17] vfio-user: handle DMA mappings Jagannathan Raman
2022-03-25 19:19 ` [PATCH v7 14/17] vfio-user: handle PCI BAR accesses Jagannathan Raman
2022-03-29 12:50   ` Stefan Hajnoczi
2022-03-29 15:51     ` Jag Raman
2022-03-30 10:05       ` Stefan Hajnoczi
2022-03-30 14:46         ` Jag Raman
2022-03-30 16:06           ` Stefan Hajnoczi
2022-03-25 19:19 ` [PATCH v7 15/17] vfio-user: handle device interrupts Jagannathan Raman
2022-03-25 19:19 ` [PATCH v7 16/17] vfio-user: handle reset of remote device Jagannathan Raman
2022-03-29 14:46   ` Stefan Hajnoczi
2022-03-25 19:19 ` [PATCH v7 17/17] vfio-user: avocado tests for vfio-user Jagannathan Raman

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.