c2d5c4a7cb
Implement the outgoing migration side for the 'mapped-ram' capability. A bitmap is introduced to track which pages have been written in the migration file. Pages are written at a fixed location for every ramblock. Zero pages are ignored as they'd be zero in the destination migration as well. The migration stream is altered to put the dirty pages for a ramblock after its header instead of having a sequential stream of pages that follow the ramblock headers. Without mapped-ram (current): With mapped-ram (new): --------------------- -------------------------------- | ramblock 1 header | | ramblock 1 header | --------------------- -------------------------------- | ramblock 2 header | | ramblock 1 mapped-ram header | --------------------- -------------------------------- | ... | | padding to next 1MB boundary | --------------------- | ... | | ramblock n header | -------------------------------- --------------------- | ramblock 1 pages | | RAM_SAVE_FLAG_EOS | | ... | --------------------- -------------------------------- | stream of pages | | ramblock 2 header | | (iter 1) | -------------------------------- | ... | | ramblock 2 mapped-ram header | --------------------- -------------------------------- | RAM_SAVE_FLAG_EOS | | padding to next 1MB boundary | --------------------- | ... | | stream of pages | -------------------------------- | (iter 2) | | ramblock 2 pages | | ... | | ... | --------------------- -------------------------------- | ... | | ... | --------------------- -------------------------------- | RAM_SAVE_FLAG_EOS | -------------------------------- | ... | -------------------------------- where: - ramblock header: the generic information for a ramblock, such as idstr, used_len, etc. - ramblock mapped-ram header: the new information added by this feature: bitmap of pages written, bitmap size and offset of pages in the migration file. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de> Link: https://lore.kernel.org/r/20240229153017.2221-10-farosas@suse.de Signed-off-by: Peter Xu <peterx@redhat.com> |
||
---|---|---|
.. | ||
user | ||
address-spaces.h | ||
confidential-guest-support.h | ||
cpu_ldst.h | ||
cpu-all.h | ||
cpu-common.h | ||
cpu-defs.h | ||
cputlb.h | ||
exec-all.h | ||
gdbstub.h | ||
helper-gen-common.h | ||
helper-gen.h | ||
helper-gen.h.inc | ||
helper-head.h | ||
helper-info.c.inc | ||
helper-proto-common.h | ||
helper-proto.h | ||
helper-proto.h.inc | ||
hwaddr.h | ||
ioport.h | ||
log.h | ||
memattrs.h | ||
memop.h | ||
memopidx.h | ||
memory_ldst_cached.h.inc | ||
memory_ldst_phys.h.inc | ||
memory_ldst.h.inc | ||
memory-internal.h | ||
memory.h | ||
page-vary.h | ||
plugin-gen.h | ||
poison.h | ||
ram_addr.h | ||
ramblock.h | ||
ramlist.h | ||
replay-core.h | ||
target_long.h | ||
target_page.h | ||
tb-flush.h | ||
tlb-common.h | ||
translate-all.h | ||
translation-block.h | ||
translator.h | ||
tswap.h | ||
vaddr.h |