mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
migration: Add last stage indicator to global dirty log
The global dirty log synchronization is used when KVM and dirty ring are enabled. There is a particularity for ARM64 where the backup bitmap is used to track dirty pages in non-running-vcpu situations. It means the dirty ring works with the combination of ring buffer and backup bitmap. The dirty bits in the backup bitmap needs to collected in the last stage of live migration. In order to identify the last stage of live migration and pass it down, an extra parameter is added to the relevant functions and callbacks. This last stage indicator isn't used until the dirty ring is enabled in the subsequent patches. No functional change intended. Signed-off-by: Gavin Shan <gshan@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Tested-by: Zhenyu Zhang <zhenyzha@redhat.com> Message-Id: <20230509022122.20888-2-gshan@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
ed8d95182b
commit
1e493be587
5 changed files with 25 additions and 20 deletions
|
@ -934,8 +934,11 @@ struct MemoryListener {
|
|||
* its @log_sync must be NULL. Vice versa.
|
||||
*
|
||||
* @listener: The #MemoryListener.
|
||||
* @last_stage: The last stage to synchronize the log during migration.
|
||||
* The caller should gurantee that the synchronization with true for
|
||||
* @last_stage is triggered for once after all VCPUs have been stopped.
|
||||
*/
|
||||
void (*log_sync_global)(MemoryListener *listener);
|
||||
void (*log_sync_global)(MemoryListener *listener, bool last_stage);
|
||||
|
||||
/**
|
||||
* @log_clear:
|
||||
|
@ -2422,8 +2425,10 @@ MemoryRegionSection memory_region_find(MemoryRegion *mr,
|
|||
* memory_global_dirty_log_sync: synchronize the dirty log for all memory
|
||||
*
|
||||
* Synchronizes the dirty page log for all address spaces.
|
||||
*
|
||||
* @last_stage: whether this is the last stage of live migration
|
||||
*/
|
||||
void memory_global_dirty_log_sync(void);
|
||||
void memory_global_dirty_log_sync(bool last_stage);
|
||||
|
||||
/**
|
||||
* memory_global_dirty_log_sync: synchronize the dirty log for all memory
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue