Re: [PULL 00/42] vfio queue

2024-06-25 Thread Richard Henderson

On 6/24/24 14:24, Cédric Le Goater wrote:

The following changes since commit d89b64beea65f77c21a553cb54cb97b75c53dc21:

   Merge tag 'pull-request-2024-06-24' ofhttps://gitlab.com/thuth/qemu  into 
staging (2024-06-24 11:57:11 -0700)

are available in the Git repository at:

   https://github.com/legoater/qemu/  tags/pull-vfio-20240624

for you to fetch changes up to 96b7af4388b38bc1f66467a9c7c8ee9d3bff500f:

   vfio/container: Move vfio_container_destroy() to an instance_finalize() 
handler (2024-06-24 23:15:31 +0200)


vfio queue:

* Add a host IOMMU device abstraction
* VIRTIO-IOMMU/VFIO: Fix host iommu geometry handling
* QOMify VFIOContainer


Applied, thanks.  Please update https://wiki.qemu.org/ChangeLog/9.1 as 
appropriate.


r~




[PULL 00/42] vfio queue

2024-06-24 Thread Cédric Le Goater
The following changes since commit d89b64beea65f77c21a553cb54cb97b75c53dc21:

  Merge tag 'pull-request-2024-06-24' of https://gitlab.com/thuth/qemu into 
staging (2024-06-24 11:57:11 -0700)

are available in the Git repository at:

  https://github.com/legoater/qemu/ tags/pull-vfio-20240624

for you to fetch changes up to 96b7af4388b38bc1f66467a9c7c8ee9d3bff500f:

  vfio/container: Move vfio_container_destroy() to an instance_finalize() 
handler (2024-06-24 23:15:31 +0200)


vfio queue:

* Add a host IOMMU device abstraction
* VIRTIO-IOMMU/VFIO: Fix host iommu geometry handling
* QOMify VFIOContainer


Avihai Horon (1):
  vfio/common: Extract vIOMMU code from vfio_sync_dirty_bitmap()

Cédric Le Goater (15):
  vfio: Make vfio_devices_dma_logging_start() return bool
  vfio: Remove unused declarations from vfio-common.h
  vfio/container: Introduce vfio_address_space_insert()
  vfio/container: Simplify vfio_container_init()
  vfio/container: Modify vfio_get_iommu_type() to use a container fd
  vfio/container: Introduce vfio_get_iommu_class_name()
  vfio/container: Introduce vfio_create_container()
  vfio/container: Discover IOMMU type before creating the container
  vfio/container: Change VFIOContainerBase to use QOM
  vfio/container: Switch to QOM
  vfio/container: Introduce an instance_init() handler
  vfio/container: Remove VFIOContainerBase::ops
  vfio/container: Remove vfio_container_init()
  vfio/container: Introduce vfio_iommu_legacy_instance_init()
  vfio/container: Move vfio_container_destroy() to an instance_finalize() 
handler

Eric Auger (8):
  HostIOMMUDevice: Store the VFIO/VDPA agent
  virtio-iommu: Implement set|unset]_iommu_device() callbacks
  HostIOMMUDevice: Introduce get_iova_ranges callback
  HostIOMMUDevice: Store the aliased bus and devfn
  virtio-iommu: Compute host reserved regions
  virtio-iommu: Remove the implementation of iommu_set_iova_range
  hw/vfio: Remove memory_region_iommu_set_iova_ranges() call
  memory: Remove IOMMU MR iommu_set_iova_range API

Joao Martins (1):
  vfio/common: Move dirty tracking ranges update to helper

Yi Liu (2):
  hw/pci: Introduce pci_device_[set|unset]_iommu_device()
  intel_iommu: Implement [set|unset]_iommu_device() callbacks

Zhenzhong Duan (15):
  backends: Introduce HostIOMMUDevice abstract
  backends/host_iommu_device: Introduce HostIOMMUDeviceCaps
  vfio/container: Introduce TYPE_HOST_IOMMU_DEVICE_LEGACY_VFIO device
  backends/iommufd: Introduce TYPE_HOST_IOMMU_DEVICE_IOMMUFD[_VFIO] devices
  range: Introduce range_get_last_bit()
  vfio/container: Implement HostIOMMUDeviceClass::realize() handler
  backends/iommufd: Introduce helper function 
iommufd_backend_get_device_info()
  vfio/iommufd: Implement HostIOMMUDeviceClass::realize() handler
  vfio/container: Implement HostIOMMUDeviceClass::get_cap() handler
  backends/iommufd: Implement HostIOMMUDeviceClass::get_cap() handler
  vfio: Create host IOMMU device instance
  hw/pci: Introduce helper function pci_device_get_iommu_bus_devfn()
  vfio/pci: Pass HostIOMMUDevice to vIOMMU
  intel_iommu: Extract out vtd_cap_init() to initialize cap/ecap
  intel_iommu: Check compatibility with host IOMMU capabilities

 MAINTAINERS   |   2 +
 include/exec/memory.h |  32 
 include/hw/i386/intel_iommu.h |   2 +
 include/hw/pci/pci.h  |  38 -
 include/hw/vfio/vfio-common.h |  18 ++-
 include/hw/vfio/vfio-container-base.h |  22 +--
 include/hw/virtio/virtio-iommu.h  |   2 +
 include/qemu/range.h  |  11 ++
 include/sysemu/host_iommu_device.h| 102 
 include/sysemu/iommufd.h  |  19 +++
 backends/host_iommu_device.c  |  33 
 backends/iommufd.c|  76 +++--
 hw/i386/intel_iommu.c | 203 ++-
 hw/pci/pci.c  |  79 -
 hw/vfio/common.c  | 150 ++---
 hw/vfio/container-base.c  |  70 
 hw/vfio/container.c   | 164 +--
 hw/vfio/helpers.c |  17 ++
 hw/vfio/iommufd.c |  68 +++-
 hw/vfio/pci.c |  23 ++-
 hw/vfio/spapr.c   |   3 +
 hw/virtio/virtio-iommu.c  | 296 ++
 system/memory.c   |  13 --
 backends/meson.build  |   1 +
 24 files changed, 1066 insertions(+), 378 deletions(-)
 create mode 100644 include/sysemu/host_iommu_device.h
 create mode 100644 backends/host_iommu_device.c