]> git.proxmox.com Git - mirror_qemu.git/commit
backends/iommufd: Introduce the iommufd object
authorEric Auger <eric.auger@redhat.com>
Tue, 21 Nov 2023 08:44:00 +0000 (16:44 +0800)
committerCédric Le Goater <clg@redhat.com>
Tue, 19 Dec 2023 18:03:38 +0000 (19:03 +0100)
commit6e6d8ac62b5b38dc9d4b69ffdf073f0a0b43b7be
treeed0a5d7b3b5ba608a2d7b2dd84b03f37c204d219
parentdbb9d0c9691d145338686d3e0920da047f2ab3da
backends/iommufd: Introduce the iommufd object

Introduce an iommufd object which allows the interaction
with the host /dev/iommu device.

The /dev/iommu can have been already pre-opened outside of qemu,
in which case the fd can be passed directly along with the
iommufd object:

This allows the iommufd object to be shared accross several
subsystems (VFIO, VDPA, ...). For example, libvirt would open
the /dev/iommu once.

If no fd is passed along with the iommufd object, the /dev/iommu
is opened by the qemu code.

Suggested-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Yi Liu <yi.l.liu@intel.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
MAINTAINERS
backends/Kconfig
backends/iommufd.c [new file with mode: 0644]
backends/meson.build
backends/trace-events
include/sysemu/iommufd.h [new file with mode: 0644]
qapi/qom.json
qemu-options.hx