Skip to content

Commit a523bc5

Browse files
yliu80Fabiano Rosas
authored andcommitted
multifd: bugfix for incorrect migration data with qatzip compression
When QPL compression is enabled on the migration channel and the same dirty page changes from a normal page to a zero page in the iterative memory copy, the dirty page will not be updated to a zero page again on the target side, resulting in incorrect memory data on the source and target sides. The root cause is that the target side does not record the normal pages to the receivedmap. The solution is to add ramblock_recv_bitmap_set_offset in target side to record the normal pages. Signed-off-by: Yuan Liu <[email protected]> Reviewed-by: Jason Zeng <[email protected]> Reviewed-by: Peter Xu <[email protected]> Message-Id: <[email protected]> Signed-off-by: Fabiano Rosas <[email protected]>
1 parent 2588a5f commit a523bc5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

migration/multifd-qatzip.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ static int qatzip_recv(MultiFDRecvParams *p, Error **errp)
373373
/* Copy each page to its appropriate location. */
374374
for (int i = 0; i < p->normal_num; i++) {
375375
memcpy(p->host + p->normal[i], q->out_buf + page_size * i, page_size);
376+
ramblock_recv_bitmap_set_offset(p->block, p->normal[i]);
376377
}
377378
return 0;
378379
}

0 commit comments

Comments
 (0)