On 2025/8/22 14:40, Zhenzhong Duan wrote:
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 <[email protected]>
Signed-off-by: Zhenzhong Duan <[email protected]>
Reviewed-by: Cédric Le Goater <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
[ clg: Added documentation ]
Signed-off-by: Cédric Le Goater <[email protected]>
---
  hw/vfio/pci.h       | 12 ++++++++++++
  hw/vfio/container.c |  4 ++--
  hw/vfio/device.c    |  2 +-
  hw/vfio/iommufd.c   |  4 ++--
  hw/vfio/listener.c  |  4 ++--
  hw/vfio/pci.c       |  9 +++++++++
  6 files changed, 28 insertions(+), 7 deletions(-)

Reviewed-by: Yi Liu <[email protected]>

Reply via email to