On Fri, Aug 22, 2025 at 02:40:42AM -0400, 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>
I think we should drop the link? The link points to the v3 that is not the officially accepted one now, as this PATCH-04 would be? IOW, the commit should probably have a link to this patch instead. Also, in general, your "Signed-off-by" should be the last line, when you submit a patch. With that, Reviewed-by: Nicolin Chen <nicol...@nvidia.com> > diff --git a/hw/vfio/pci.h b/hw/vfio/pci.h > index 810a842f4a..beb8fb9ee7 100644 > --- a/hw/vfio/pci.h > +++ b/hw/vfio/pci.h > @@ -221,6 +221,18 @@ void vfio_pci_write_config(PCIDevice *pdev, > uint64_t vfio_vga_read(void *opaque, hwaddr addr, unsigned size); > void vfio_vga_write(void *opaque, hwaddr addr, uint64_t data, unsigned size); > > +/** > + * vfio_pci_from_vfio_device: Transform from VFIODevice to > + * VFIOPCIDevice Nit: this could fit into one line.