diff options
author | Eric Auger <eric.auger@redhat.com> | 2023-10-09 11:09:09 +0200 |
---|---|---|
committer | Cédric Le Goater <clg@redhat.com> | 2023-10-18 10:10:49 +0200 |
commit | 5456b1867d10826e3857fda417b59a669fa5cce9 (patch) | |
tree | 956dcf7e2a886e03fabea7e623c9b7253c722f53 /hw/vfio/platform.c | |
parent | 5621c02d5adf3841884bb751ec8cf43d931aaa25 (diff) | |
download | qemu-5456b1867d10826e3857fda417b59a669fa5cce9.zip qemu-5456b1867d10826e3857fda417b59a669fa5cce9.tar.gz qemu-5456b1867d10826e3857fda417b59a669fa5cce9.tar.bz2 |
vfio/pci: Introduce vfio_[attach/detach]_device
We want the VFIO devices to be able to use two different
IOMMU backends, the legacy VFIO one and the new iommufd one.
Introduce vfio_[attach/detach]_device which aim at hiding the
underlying IOMMU backend (IOCTLs, datatypes, ...).
Once vfio_attach_device completes, the device is attached
to a security context and its fd can be used. Conversely
When vfio_detach_device completes, the device has been
detached from the security context.
At the moment only the implementation based on the legacy
container/group exists. Let's use it from the vfio-pci device.
Subsequent patches will handle other devices.
We also take benefit of this patch to properly free
vbasedev->name on failure.
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>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'hw/vfio/platform.c')
0 files changed, 0 insertions, 0 deletions