Re: [PATCH V4 43/43] vfio/container: delete old cpr register

2025-06-10 Thread Cédric Le Goater

On 5/29/25 21:24, Steve Sistare wrote:

vfio_cpr_[un]register_container is no longer used since they were
subsumed by container type-specific registration.  Delete them.

Signed-off-by: Steve Sistare 




Reviewed-by: Cédric Le Goater 

Thanks,

C.



---
  include/hw/vfio/vfio-cpr.h |  4 
  hw/vfio/cpr.c  | 13 -
  2 files changed, 17 deletions(-)

diff --git a/include/hw/vfio/vfio-cpr.h b/include/hw/vfio/vfio-cpr.h
index f88e4ba..5b6c960 100644
--- a/include/hw/vfio/vfio-cpr.h
+++ b/include/hw/vfio/vfio-cpr.h
@@ -44,10 +44,6 @@ void vfio_legacy_cpr_unregister_container(struct 
VFIOContainer *container);
  int vfio_cpr_reboot_notifier(NotifierWithReturn *notifier, MigrationEvent *e,
   Error **errp);
  
-bool vfio_cpr_register_container(struct VFIOContainerBase *bcontainer,

- Error **errp);
-void vfio_cpr_unregister_container(struct VFIOContainerBase *bcontainer);
-
  bool vfio_iommufd_cpr_register_container(struct VFIOIOMMUFDContainer 
*container,
   Error **errp);
  void vfio_iommufd_cpr_unregister_container(
diff --git a/hw/vfio/cpr.c b/hw/vfio/cpr.c
index fca..c97e467 100644
--- a/hw/vfio/cpr.c
+++ b/hw/vfio/cpr.c
@@ -29,19 +29,6 @@ int vfio_cpr_reboot_notifier(NotifierWithReturn *notifier,
  return 0;
  }
  
-bool vfio_cpr_register_container(VFIOContainerBase *bcontainer, Error **errp)

-{
-migration_add_notifier_mode(&bcontainer->cpr_reboot_notifier,
-vfio_cpr_reboot_notifier,
-MIG_MODE_CPR_REBOOT);
-return true;
-}
-
-void vfio_cpr_unregister_container(VFIOContainerBase *bcontainer)
-{
-migration_remove_notifier(&bcontainer->cpr_reboot_notifier);
-}
-
  #define STRDUP_VECTOR_FD_NAME(vdev, name)   \
  g_strdup_printf("%s_%s", (vdev)->vbasedev.name, (name))
  





[PATCH V4 43/43] vfio/container: delete old cpr register

2025-05-29 Thread Steve Sistare
vfio_cpr_[un]register_container is no longer used since they were
subsumed by container type-specific registration.  Delete them.

Signed-off-by: Steve Sistare 
---
 include/hw/vfio/vfio-cpr.h |  4 
 hw/vfio/cpr.c  | 13 -
 2 files changed, 17 deletions(-)

diff --git a/include/hw/vfio/vfio-cpr.h b/include/hw/vfio/vfio-cpr.h
index f88e4ba..5b6c960 100644
--- a/include/hw/vfio/vfio-cpr.h
+++ b/include/hw/vfio/vfio-cpr.h
@@ -44,10 +44,6 @@ void vfio_legacy_cpr_unregister_container(struct 
VFIOContainer *container);
 int vfio_cpr_reboot_notifier(NotifierWithReturn *notifier, MigrationEvent *e,
  Error **errp);
 
-bool vfio_cpr_register_container(struct VFIOContainerBase *bcontainer,
- Error **errp);
-void vfio_cpr_unregister_container(struct VFIOContainerBase *bcontainer);
-
 bool vfio_iommufd_cpr_register_container(struct VFIOIOMMUFDContainer 
*container,
  Error **errp);
 void vfio_iommufd_cpr_unregister_container(
diff --git a/hw/vfio/cpr.c b/hw/vfio/cpr.c
index fca..c97e467 100644
--- a/hw/vfio/cpr.c
+++ b/hw/vfio/cpr.c
@@ -29,19 +29,6 @@ int vfio_cpr_reboot_notifier(NotifierWithReturn *notifier,
 return 0;
 }
 
-bool vfio_cpr_register_container(VFIOContainerBase *bcontainer, Error **errp)
-{
-migration_add_notifier_mode(&bcontainer->cpr_reboot_notifier,
-vfio_cpr_reboot_notifier,
-MIG_MODE_CPR_REBOOT);
-return true;
-}
-
-void vfio_cpr_unregister_container(VFIOContainerBase *bcontainer)
-{
-migration_remove_notifier(&bcontainer->cpr_reboot_notifier);
-}
-
 #define STRDUP_VECTOR_FD_NAME(vdev, name)   \
 g_strdup_printf("%s_%s", (vdev)->vbasedev.name, (name))
 
-- 
1.8.3.1