@@ -442,6 +442,14 @@ static int postcopy_outgoing_handle_req(PostcopyOutgoingState *s,
true, j);
}
}
+ if (s->ms->params.movebg) {
+ ram_addr_t last_offset =
+ (req->pgoffs[req->nr - 1] + s->ms->params.prefault_forward) <<
+ TARGET_PAGE_BITS;
+ last_offset = MIN(last_offset,
+ s->last_block_read->length - TARGET_PAGE_SIZE);
+ ram_save_set_last_block(s->last_block_read, last_offset);
+ }
/* backward prefault */
for (j = 1; j <= s->ms->params.prefault_backward; j++) {
for (i = 0; i < req->nr; i++) {
When movebg mode is enabled, the point to send background page is set to the next page to on-demand page. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> --- migration-postcopy.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)