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 <c...@redhat.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.d...@intel.com>
Reviewed-by: Cédric Le Goater <c...@redhat.com>
Link: 
https://lore.kernel.org/qemu-devel/20250801023533.1458644-1-zhenzhong.d...@intel.com
[ clg: Added documentation ]
Signed-off-by: Cédric Le Goater <c...@redhat.com>
---
  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 <yi.l....@intel.com>

Reply via email to