mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -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
|
@ -101,7 +101,7 @@ void global_dirty_log_change(unsigned int flag, bool start)
|
|||
static void global_dirty_log_sync(unsigned int flag, bool one_shot)
|
||||
{
|
||||
qemu_mutex_lock_iothread();
|
||||
memory_global_dirty_log_sync();
|
||||
memory_global_dirty_log_sync(false);
|
||||
if (one_shot) {
|
||||
memory_global_dirty_log_stop(flag);
|
||||
}
|
||||
|
@ -581,7 +581,7 @@ static void calculate_dirtyrate_dirty_bitmap(struct DirtyRateConfig config)
|
|||
* skip it unconditionally and start dirty tracking
|
||||
* from 2'round of log sync
|
||||
*/
|
||||
memory_global_dirty_log_sync();
|
||||
memory_global_dirty_log_sync(false);
|
||||
|
||||
/*
|
||||
* reset page protect manually and unconditionally.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue