[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 02/17] migration: No save_live_pending() method uses the QEMUF
From: |
Avihai Horon |
Subject: |
[PATCH v3 02/17] migration: No save_live_pending() method uses the QEMUFile parameter |
Date: |
Thu, 3 Nov 2022 18:16:05 +0200 |
From: Juan Quintela <quintela@redhat.com>
So remove it everywhere.
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
hw/s390x/s390-stattrib.c | 2 +-
hw/vfio/migration.c | 6 ++----
include/migration/register.h | 6 ++----
migration/block-dirty-bitmap.c | 3 +--
migration/block.c | 2 +-
migration/migration.c | 3 +--
migration/ram.c | 2 +-
migration/savevm.c | 5 ++---
migration/savevm.h | 2 +-
9 files changed, 12 insertions(+), 19 deletions(-)
diff --git a/hw/s390x/s390-stattrib.c b/hw/s390x/s390-stattrib.c
index ee60b53da4..9b74eeadf3 100644
--- a/hw/s390x/s390-stattrib.c
+++ b/hw/s390x/s390-stattrib.c
@@ -182,7 +182,7 @@ static int cmma_save_setup(QEMUFile *f, void *opaque)
return 0;
}
-static void cmma_save_pending(QEMUFile *f, void *opaque, uint64_t max_size,
+static void cmma_save_pending(void *opaque, uint64_t max_size,
uint64_t *res_precopy, uint64_t *res_postcopy)
{
S390StAttribState *sas = S390_STATTRIB(opaque);
diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c
index 3423f113f0..760d5f3c5c 100644
--- a/hw/vfio/migration.c
+++ b/hw/vfio/migration.c
@@ -456,10 +456,8 @@ static void vfio_save_cleanup(void *opaque)
trace_vfio_save_cleanup(vbasedev->name);
}
-static void vfio_save_pending(QEMUFile *f, void *opaque,
- uint64_t threshold_size,
- uint64_t *res_precopy,
- uint64_t *res_postcopy)
+static void vfio_save_pending(void *opaque, uint64_t threshold_size,
+ uint64_t *res_precopy, uint64_t *res_postcopy)
{
VFIODevice *vbasedev = opaque;
VFIOMigration *migration = vbasedev->migration;
diff --git a/include/migration/register.h b/include/migration/register.h
index 1950fee6a8..5b5424ed8f 100644
--- a/include/migration/register.h
+++ b/include/migration/register.h
@@ -46,10 +46,8 @@ typedef struct SaveVMHandlers {
/* This runs outside the iothread lock! */
int (*save_setup)(QEMUFile *f, void *opaque);
- void (*save_live_pending)(QEMUFile *f, void *opaque,
- uint64_t threshold_size,
- uint64_t *rest_precopy,
- uint64_t *rest_postcopy);
+ void (*save_live_pending)(void *opaque, uint64_t threshold_size,
+ uint64_t *rest_precopy, uint64_t *rest_postcopy);
/* Note for save_live_pending:
* - res_precopy is for data which must be migrated in precopy
* phase or in stopped state, in other words - before target
diff --git a/migration/block-dirty-bitmap.c b/migration/block-dirty-bitmap.c
index dfea546330..9d4f56693f 100644
--- a/migration/block-dirty-bitmap.c
+++ b/migration/block-dirty-bitmap.c
@@ -761,8 +761,7 @@ static int dirty_bitmap_save_complete(QEMUFile *f, void
*opaque)
return 0;
}
-static void dirty_bitmap_save_pending(QEMUFile *f, void *opaque,
- uint64_t max_size,
+static void dirty_bitmap_save_pending(void *opaque, uint64_t max_size,
uint64_t *res_precopy,
uint64_t *res_postcopy)
{
diff --git a/migration/block.c b/migration/block.c
index 4ae8f837b0..b3d680af75 100644
--- a/migration/block.c
+++ b/migration/block.c
@@ -862,7 +862,7 @@ static int block_save_complete(QEMUFile *f, void *opaque)
return 0;
}
-static void block_save_pending(QEMUFile *f, void *opaque, uint64_t max_size,
+static void block_save_pending(void *opaque, uint64_t max_size,
uint64_t *res_precopy,
uint64_t *res_postcopy)
{
diff --git a/migration/migration.c b/migration/migration.c
index a4a18228c6..ffe868b86f 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -3738,8 +3738,7 @@ static MigIterateState
migration_iteration_run(MigrationState *s)
uint64_t pending_size, pend_pre, pend_post;
bool in_postcopy = s->state == MIGRATION_STATUS_POSTCOPY_ACTIVE;
- qemu_savevm_state_pending(s->to_dst_file, s->threshold_size, &pend_pre,
- &pend_post);
+ qemu_savevm_state_pending(s->threshold_size, &pend_pre, &pend_post);
pending_size = pend_pre + pend_post;
trace_migrate_pending(pending_size, s->threshold_size, pend_pre,
pend_post);
diff --git a/migration/ram.c b/migration/ram.c
index 20167e1102..48a31b87c8 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -3434,7 +3434,7 @@ static int ram_save_complete(QEMUFile *f, void *opaque)
return 0;
}
-static void ram_save_pending(QEMUFile *f, void *opaque, uint64_t max_size,
+static void ram_save_pending(void *opaque, uint64_t max_size,
uint64_t *res_precopy, uint64_t *res_postcopy)
{
RAMState **temp = opaque;
diff --git a/migration/savevm.c b/migration/savevm.c
index 4d02887f25..9ddcbba4e3 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -1471,8 +1471,7 @@ flush:
* the result is split into the amount for units that can and
* for units that can't do postcopy.
*/
-void qemu_savevm_state_pending(QEMUFile *f, uint64_t threshold_size,
- uint64_t *res_precopy,
+void qemu_savevm_state_pending(uint64_t threshold_size, uint64_t *res_precopy,
uint64_t *res_postcopy)
{
SaveStateEntry *se;
@@ -1489,7 +1488,7 @@ void qemu_savevm_state_pending(QEMUFile *f, uint64_t
threshold_size,
continue;
}
}
- se->ops->save_live_pending(f, se->opaque, threshold_size,
+ se->ops->save_live_pending(se->opaque, threshold_size,
res_precopy, res_postcopy);
}
}
diff --git a/migration/savevm.h b/migration/savevm.h
index 9bd55c336c..98fae6f9b3 100644
--- a/migration/savevm.h
+++ b/migration/savevm.h
@@ -40,7 +40,7 @@ void qemu_savevm_state_cleanup(void);
void qemu_savevm_state_complete_postcopy(QEMUFile *f);
int qemu_savevm_state_complete_precopy(QEMUFile *f, bool iterable_only,
bool inactivate_disks);
-void qemu_savevm_state_pending(QEMUFile *f, uint64_t max_size,
+void qemu_savevm_state_pending(uint64_t max_size,
uint64_t *res_precopy, uint64_t *res_postcopy);
void qemu_savevm_send_ping(QEMUFile *f, uint32_t value);
void qemu_savevm_send_open_return_path(QEMUFile *f);
--
2.21.3
- [PATCH v3 08/17] migration/qemu-file: Add qemu_file_get_to_fd(), (continued)
[PATCH v3 17/17] vfio/migration: Query device data size in vfio_save_pending(), Avihai Horon, 2022/11/03
[PATCH v3 15/17] vfio: Alphabetize migration section of VFIO trace-events file, Avihai Horon, 2022/11/03
[PATCH v3 02/17] migration: No save_live_pending() method uses the QEMUFile parameter,
Avihai Horon <=
[PATCH v3 16/17] docs/devel: Align vfio-migration docs to VFIO migration v2, Avihai Horon, 2022/11/03
[PATCH v3 09/17] vfio/common: Change vfio_devices_all_running_and_saving() logic to equivalent one, Avihai Horon, 2022/11/03
[PATCH v3 12/17] vfio/migration: Implement VFIO migration protocol v2, Avihai Horon, 2022/11/03