diff options
| author | Peter Xu <peterx@redhat.com> | 2025-04-11 17:15:30 +0530 |
|---|---|---|
| committer | Peter Xu <peterx@redhat.com> | 2025-05-02 11:09:36 -0400 |
| commit | 1d481116015428c02f7e3635f9bc0b88b0978fdc (patch) | |
| tree | debaee999fa9f0b9d4ebefe2ceba89f3956da4dc /migration/savevm.h | |
| parent | 00f3fcef1981eb23f98b956d9cda2df528bfef40 (diff) | |
| download | focaccia-qemu-1d481116015428c02f7e3635f9bc0b88b0978fdc.tar.gz focaccia-qemu-1d481116015428c02f7e3635f9bc0b88b0978fdc.zip | |
migration: Add save_postcopy_prepare() savevm handler
Add a savevm handler for a module to opt-in sending extra sections right before postcopy starts, and before VM is stopped. RAM will start to use this new savevm handler in the next patch to do flush and sync for multifd pages. Note that we choose to do it before VM stopped because the current only potential user is not sensitive to VM status, so doing it before VM is stopped is preferred to enlarge any postcopy downtime. It is still a bit unfortunate that we need to introduce such a new savevm handler just for the only use case, however it's so far the cleanest. Signed-off-by: Peter Xu <peterx@redhat.com> Signed-off-by: Prasad Pandit <pjp@fedoraproject.org> Reviewed-by: Fabiano Rosas <farosas@suse.de> Message-ID: <20250411114534.3370816-4-ppandit@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
Diffstat (limited to 'migration/savevm.h')
| -rw-r--r-- | migration/savevm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/migration/savevm.h b/migration/savevm.h index 138c39a7f9..2d5e9c7166 100644 --- a/migration/savevm.h +++ b/migration/savevm.h @@ -45,6 +45,7 @@ void qemu_savevm_state_pending_exact(uint64_t *must_precopy, void qemu_savevm_state_pending_estimate(uint64_t *must_precopy, uint64_t *can_postcopy); int qemu_savevm_state_complete_precopy_iterable(QEMUFile *f, bool in_postcopy); +bool qemu_savevm_state_postcopy_prepare(QEMUFile *f, Error **errp); void qemu_savevm_send_ping(QEMUFile *f, uint32_t value); void qemu_savevm_send_open_return_path(QEMUFile *f); int qemu_savevm_send_packaged(QEMUFile *f, const uint8_t *buf, size_t len); |