qemu/include
Zhenzhong Duan da3e04b26f vfio/pci: 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.

Together with the earlier support of pre-opening /dev/iommu device,
now we have full support of passing a vfio device to unprivileged
qemu by management tool. This mode is no more considered for the
legacy backend. So let's remove the "TODO" comment.

Add helper functions vfio_device_set_fd() and vfio_device_get_name()
to set fd and get device name, they will also be used by other vfio
devices.

There is no easy way to check if a device is mdev with FD passing,
so fail the x-balloon-allowed check unconditionally in this case.

There is also no easy way to get BDF as name with FD passing, so
we fake a name by VFIO_FD[fd].

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>
2023-12-19 19:03:38 +01:00
..
authz
block block: Fix deadlocks in bdrv_graph_wrunlock() 2023-11-21 12:45:21 +01:00
chardev
crypto
disas
exec accel/tcg: Remove CF_LAST_IO 2023-11-14 10:40:54 -08:00
fpu
gdbstub
hw vfio/pci: Make vfio cdev pre-openable by passing a file handle 2023-12-19 19:03:38 +01:00
io
libdecnumber
migration
monitor
net net: Update MemReentrancyGuard for NIC 2023-11-21 15:42:34 +08:00
qapi
qemu util/char_dev: Add open_cdev() 2023-12-19 19:03:38 +01:00
qom qom: Add object_property_set_default_list() 2023-11-10 18:19:14 +01:00
scsi
semihosting
standard-headers
sysemu backends/iommufd: Introduce the iommufd object 2023-12-19 19:03:38 +01:00
tcg tcg: Remove TCG_TARGET_HAS_neg_{i32,i64} 2023-11-06 08:27:21 -08:00
ui ui/pixman-minimal.h: fix empty allocation 2023-11-21 14:38:14 +04:00
user
elf.h
glib-compat.h
qemu-io.h
qemu-main.h