mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-07-21 18:34:33 +00:00
kvm: Mark full address range dirty on live migration start
As Avi correctly noted, last_ram_offset does not mark the last physical RAM address the guest may see (due to non-continuous memory regions). Ensure that we catch them all by marking the full possible address range dirty. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
de65fe0f9b
commit
9fa06385f6
|
@ -12,9 +12,11 @@
|
||||||
|
|
||||||
#if TARGET_PHYS_ADDR_BITS == 32
|
#if TARGET_PHYS_ADDR_BITS == 32
|
||||||
typedef uint32_t target_phys_addr_t;
|
typedef uint32_t target_phys_addr_t;
|
||||||
|
#define TARGET_PHYS_ADDR_MAX UINT32_MAX
|
||||||
#define TARGET_FMT_plx "%08x"
|
#define TARGET_FMT_plx "%08x"
|
||||||
#elif TARGET_PHYS_ADDR_BITS == 64
|
#elif TARGET_PHYS_ADDR_BITS == 64
|
||||||
typedef uint64_t target_phys_addr_t;
|
typedef uint64_t target_phys_addr_t;
|
||||||
|
#define TARGET_PHYS_ADDR_MAX UINT64_MAX
|
||||||
#define TARGET_FMT_plx "%016" PRIx64
|
#define TARGET_FMT_plx "%016" PRIx64
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
2
vl.c
2
vl.c
|
@ -3231,7 +3231,7 @@ static int ram_save_live(QEMUFile *f, int stage, void *opaque)
|
||||||
{
|
{
|
||||||
ram_addr_t addr;
|
ram_addr_t addr;
|
||||||
|
|
||||||
if (cpu_physical_sync_dirty_bitmap(0, last_ram_offset) != 0) {
|
if (cpu_physical_sync_dirty_bitmap(0, TARGET_PHYS_ADDR_MAX) != 0) {
|
||||||
qemu_file_set_error(f);
|
qemu_file_set_error(f);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue