On 18/03/2025 09:53, Cédric Le Goater wrote: > This routine is only used in file "migration.c". Move it there. > > Signed-off-by: Cédric Le Goater <c...@redhat.com>
Reviewed-by: Joao Martins <joao.m.mart...@oracle.com> > --- > include/hw/vfio/vfio-common.h | 1 - > hw/vfio/common.c | 6 ------ > hw/vfio/migration.c | 5 +++++ > 3 files changed, 5 insertions(+), 7 deletions(-) > > diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h > index > 5f082e5a321d97e90066d48cd3c1eaad56912ccb..0aae88131cffda1a90b8ccd0224387133c0fa83a > 100644 > --- a/include/hw/vfio/vfio-common.h > +++ b/include/hw/vfio/vfio-common.h > @@ -290,7 +290,6 @@ extern VFIODeviceList vfio_device_list; > extern const MemoryListener vfio_memory_listener; > extern int vfio_kvm_device_fd; > > -bool vfio_viommu_preset(VFIODevice *vbasedev); > bool vfio_device_state_is_running(VFIODevice *vbasedev); > bool vfio_device_state_is_precopy(VFIODevice *vbasedev); > > diff --git a/hw/vfio/common.c b/hw/vfio/common.c > index > ace7a4403bd49f35cf85009015b3ba315f80cd30..0b9b071cd0490867bb6aa4ceb261350ccd6e1125 > 100644 > --- a/hw/vfio/common.c > +++ b/hw/vfio/common.c > @@ -65,12 +65,6 @@ int vfio_kvm_device_fd = -1; > * Device state interfaces > */ > > - > -bool vfio_viommu_preset(VFIODevice *vbasedev) > -{ > - return vbasedev->bcontainer->space->as != &address_space_memory; > -} > - > static void vfio_set_migration_error(int ret) > { > if (migration_is_running()) { > diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c > index > 951e073a20287c46ca199b1648782b59415d0d2a..a1ba993ce549fce0d2a9a60ba07d4782c87c0c09 > 100644 > --- a/hw/vfio/migration.c > +++ b/hw/vfio/migration.c > @@ -1141,6 +1141,11 @@ bool vfio_mig_active(void) > return true; > } > > +static bool vfio_viommu_preset(VFIODevice *vbasedev) > +{ > + return vbasedev->bcontainer->space->as != &address_space_memory; > +} > + > /* > * Return true when either migration initialized or blocker registered. > * Currently only return false when adding blocker fails which will