]> git.proxmox.com Git - mirror_qemu.git/commit
vfio/ap: Make vfio cdev pre-openable by passing a file handle
authorZhenzhong Duan <zhenzhong.duan@intel.com>
Tue, 21 Nov 2023 08:44:14 +0000 (16:44 +0800)
committerCédric Le Goater <clg@redhat.com>
Tue, 19 Dec 2023 18:03:38 +0000 (19:03 +0100)
commit5e7ba401b71d18544a3e44b2a58b9e63fd5148d5
treedae6c3e9c9e47f526ee6d9185e9eb4d6e3f47b00
parent336f308958d598f3db351bb7d94cc57b4b2d448d
vfio/ap: Make vfio cdev pre-openable by passing a file handle

This gives management tools like libvirt a chance to open the vfio
cdev with privilege and pass FD to qemu. This way qemu never needs
to have privilege to open a VFIO or iommu cdev node.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
hw/vfio/ap.c