Hi, Thank you for taking the time to provide a comprehensive feedback of the last series of patches. We have addressed all the comments.
We are posting this v5 of the series, which incorporates all the feedback. Kindly share your feedback for this latest series We added the following patches to the series: - [PATCH v5 03/18] pci: isolated address space for PCI bus - [PATCH v5 04/18] pci: create and free isolated PCI buses - [PATCH v5 05/18] qdev: unplug blocker for devices - [PATCH v5 06/18] vfio-user: add HotplugHandler for remote machine - [PATCH v5 07/18] vfio-user: set qdev bus callbacks for remote machine We made the following changes to the existing patches: [PATCH v5 09/18] vfio-user: define vfio-user-server object - renamed object class member 'daemon' as 'auto_shutdown' - set VfioUserServerProperties version to 6.3 - use SocketAddressType_str to compose error message - refuse setting 'socket' and 'device' properties after server starts - added VFU_OBJECT_ERROR macro to report error [PATCH v5 10/18] vfio-user: instantiate vfio-user context - set error variable to NULL after transferring ownership with error_propagate() [PATCH v5 11/18] vfio-user: find and init PCI device - block hot-unplug of PCI device when it is attached to the server object [PATCH v5 12/18] vfio-user: run vfio-user context - emit a hangup event to the monitor when the client disconnects - reset vfu_poll_fd member and disable FD handler during finalize - add a comment to explain that attach could block - use VFU_OBJECT_ERROR instead of setting error_abort [PATCH v5 14/18] vfio-user: handle DMA mappings - use pci_address_space() to access device's root memory region - given we're using one bus per device, mapped memory regions get destroyed automatically when device is unplugged [PATCH v5 15/18] vfio-user: handle PCI BAR accesses - use pci_isol_as_io() & pci_isol_as_mem() to access the device's PCI/CPU address space. This simultaneously fixes the AddressSpace issue noted in the last review cycle [PATCH v5 16/18] vfio-user: handle device interrupts - setting own IRQ handlers for each bus - renamed vfu_object_dev_table to vfu_object_dev_to_ctx_table - indexing into vfu_object_dev_to_ctx_table with device's address pointer instead of devfn - not looking up before removing from table [PATCH v5 17/18] vfio-user: register handlers to facilitate migration - use VFU_OBJECT_ERROR instead of setting error_abort We dropped the following patch from previous series: - vfio-user: IOMMU support for remote device Thank you very much! Jagannathan Raman (18): configure, meson: override C compiler for cmake tests/avocado: Specify target VM argument to helper routines pci: isolated address space for PCI bus pci: create and free isolated PCI buses qdev: unplug blocker for devices vfio-user: add HotplugHandler for remote machine vfio-user: set qdev bus callbacks for remote machine 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: handle DMA mappings vfio-user: handle PCI BAR accesses vfio-user: handle device interrupts vfio-user: register handlers to facilitate migration vfio-user: avocado tests for vfio-user configure | 21 +- meson.build | 44 +- qapi/misc.json | 23 + qapi/qom.json | 20 +- include/hw/pci/pci.h | 12 + include/hw/pci/pci_bus.h | 17 + include/hw/qdev-core.h | 21 + include/migration/vmstate.h | 2 + migration/savevm.h | 2 + hw/pci/msi.c | 13 +- hw/pci/msix.c | 12 +- hw/pci/pci.c | 186 ++++ hw/pci/pci_bridge.c | 5 + hw/remote/machine.c | 86 ++ hw/remote/vfio-user-obj.c | 1019 ++++++++++++++++++++ migration/savevm.c | 73 ++ migration/vmstate.c | 19 + softmmu/qdev-monitor.c | 74 +- .gitlab-ci.d/buildtest.yml | 2 + .gitmodules | 3 + Kconfig.host | 4 + MAINTAINERS | 3 + hw/remote/Kconfig | 4 + hw/remote/meson.build | 3 + hw/remote/trace-events | 11 + meson_options.txt | 2 + subprojects/libvfio-user | 1 + tests/avocado/avocado_qemu/__init__.py | 14 +- tests/avocado/vfio-user.py | 225 +++++ tests/docker/dockerfiles/centos8.docker | 2 + tests/docker/dockerfiles/ubuntu2004.docker | 2 + 31 files changed, 1912 insertions(+), 13 deletions(-) create mode 100644 hw/remote/vfio-user-obj.c create mode 160000 subprojects/libvfio-user create mode 100644 tests/avocado/vfio-user.py -- 2.20.1