On Wed, Apr 09, 2025 at 11:38:01PM +0800, Tomita Moeko wrote: > On 4/9/25 21:48, John Levon wrote: > > Refactor the PCI config setup code out of vfio_realize() for > > readability.
> > + if (!vfio_msix_early_setup(vdev, errp)) { > > + return false; > > + } > > + > > + vfio_bars_register(vdev); > > Probably we can also put `vfio_config_quirk_setup` here as it deals with > device-spcific config space. This should be harmless (I think), but... > I would personally prefer keeping `vfio_bars_register` in `vfio_realize` > so that it matches `vfio_bars_exit` at the end, just a minor nit. ... this means that vfio-user (when it exists) can't re-use the function, which is the underlying reason for this refactoring originally. regards john