]> git.ipfire.org Git - thirdparty/qemu.git/commit
vfio: Introduce helper vfio_pci_from_vfio_device()
authorZhenzhong Duan <zhenzhong.duan@intel.com>
Fri, 22 Aug 2025 06:40:42 +0000 (02:40 -0400)
committerCédric Le Goater <clg@redhat.com>
Mon, 8 Sep 2025 14:46:31 +0000 (16:46 +0200)
commitbb1a6f1f43374a1850c314c4d0e945667d013d07
treeabf7b0185b16aa9284bebfb3fba42107a93a6420
parent1b50621881241ac5bc75ae7f8aa4c278ada8a668
vfio: Introduce helper vfio_pci_from_vfio_device()

Introduce helper vfio_pci_from_vfio_device() to transform from VFIODevice
to VFIOPCIDevice, also to hide low level VFIO_DEVICE_TYPE_PCI type check.

Suggested-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250822064101.123526-5-zhenzhong.duan@intel.com
[ clg: Added documentation ]
Signed-off-by: Cédric Le Goater <clg@redhat.com>
hw/vfio/container.c
hw/vfio/device.c
hw/vfio/iommufd.c
hw/vfio/listener.c
hw/vfio/pci.c
hw/vfio/pci.h