diff options
author | David Hildenbrand <david@redhat.com> | 2021-04-29 13:27:02 +0200 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2021-05-13 18:21:13 +0100 |
commit | c7c0e72408df5e7821c0e995122fb2fe0ac001f1 (patch) | |
tree | 4328611e971fa50c3a0c8c16dade8431c5f72fcb /migration/migration.h | |
parent | e15c7d1e8c34bbffec2aa88f8fe7cd9812b1c71f (diff) | |
download | qemu-c7c0e72408df5e7821c0e995122fb2fe0ac001f1.zip qemu-c7c0e72408df5e7821c0e995122fb2fe0ac001f1.tar.gz qemu-c7c0e72408df5e7821c0e995122fb2fe0ac001f1.tar.bz2 |
migration/ram: Handle RAM block resizes during precopy
Resizing while migrating is dangerous and does not work as expected.
The whole migration code works on the usable_length of ram blocks and does
not expect this to change at random points in time.
In the case of precopy, the ram block size must not change on the source,
after syncing the RAM block list in ram_save_setup(), so as long as the
guest is still running on the source.
Resizing can be trigger *after* (but not during) a reset in
ACPI code by the guest
- hw/arm/virt-acpi-build.c:acpi_ram_update()
- hw/i386/acpi-build.c:acpi_ram_update()
Use the ram block notifier to get notified about resizes. Let's simply
cancel migration and indicate the reason. We'll continue running on the
source. No harm done.
Update the documentation. Postcopy will be handled separately.
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20210429112708.12291-5-david@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Manual merge
Diffstat (limited to 'migration/migration.h')
-rw-r--r-- | migration/migration.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/migration/migration.h b/migration/migration.h index db67083..f7b388d 100644 --- a/migration/migration.h +++ b/migration/migration.h @@ -375,5 +375,6 @@ int foreach_not_ignored_block(RAMBlockIterFunc func, void *opaque); void migration_make_urgent_request(void); void migration_consume_urgent_request(void); bool migration_rate_limit(void); +void migration_cancel(void); #endif |