mirror of https://github.com/xemu-project/xemu.git
migration: Add pss_init()
Helper to init PSS structures. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
61717ea9d2
commit
ebd88a4973
|
@ -542,6 +542,14 @@ static bool do_compress_ram_page(QEMUFile *f, z_stream *stream, RAMBlock *block,
|
||||||
static void postcopy_preempt_restore(RAMState *rs, PageSearchStatus *pss,
|
static void postcopy_preempt_restore(RAMState *rs, PageSearchStatus *pss,
|
||||||
bool postcopy_requested);
|
bool postcopy_requested);
|
||||||
|
|
||||||
|
/* NOTE: page is the PFN not real ram_addr_t. */
|
||||||
|
static void pss_init(PageSearchStatus *pss, RAMBlock *rb, ram_addr_t page)
|
||||||
|
{
|
||||||
|
pss->block = rb;
|
||||||
|
pss->page = page;
|
||||||
|
pss->complete_round = false;
|
||||||
|
}
|
||||||
|
|
||||||
static void *do_data_compress(void *opaque)
|
static void *do_data_compress(void *opaque)
|
||||||
{
|
{
|
||||||
CompressParam *param = opaque;
|
CompressParam *param = opaque;
|
||||||
|
@ -2650,9 +2658,7 @@ static int ram_find_and_save_block(RAMState *rs)
|
||||||
rs->last_page = 0;
|
rs->last_page = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
pss.block = rs->last_seen_block;
|
pss_init(&pss, rs->last_seen_block, rs->last_page);
|
||||||
pss.page = rs->last_page;
|
|
||||||
pss.complete_round = false;
|
|
||||||
|
|
||||||
do {
|
do {
|
||||||
again = true;
|
again = true;
|
||||||
|
|
Loading…
Reference in New Issue