• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisão258f5c9825a9fb77aeae8a9d8c0877e714c090e2 (tree)
Hora2022-01-28 23:38:23
AutorPeter Xu <peterx@redh...>
CommiterJuan Quintela

Mensagem de Log

migration: No off-by-one for pss->page update in host page size

We used to do off-by-one fixup for pss->page when finished one host huge page
transfer. That seems to be unnecesary at all. Drop it.

Cc: Keqian Zhu <zhukeqian1@huawei.com>
Cc: Kunkun Jiang <jiangkunkun@huawei.com>
Cc: Andrey Gruzdev <andrey.gruzdev@virtuozzo.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>

Mudança Sumário

Diff

--- a/migration/ram.c
+++ b/migration/ram.c
@@ -1617,7 +1617,7 @@ static int ram_save_release_protection(RAMState *rs, PageSearchStatus *pss,
16171617 /* Check if page is from UFFD-managed region. */
16181618 if (pss->block->flags & RAM_UF_WRITEPROTECT) {
16191619 void *page_address = pss->block->host + (start_page << TARGET_PAGE_BITS);
1620- uint64_t run_length = (pss->page - start_page + 1) << TARGET_PAGE_BITS;
1620+ uint64_t run_length = (pss->page - start_page) << TARGET_PAGE_BITS;
16211621
16221622 /* Flush async buffers before un-protect. */
16231623 qemu_fflush(rs->f);
@@ -2230,7 +2230,7 @@ static int ram_save_host_page(RAMState *rs, PageSearchStatus *pss)
22302230 offset_in_ramblock(pss->block,
22312231 ((ram_addr_t)pss->page) << TARGET_PAGE_BITS));
22322232 /* The offset we leave with is the min boundary of host page and block */
2233- pss->page = MIN(pss->page, hostpage_boundary) - 1;
2233+ pss->page = MIN(pss->page, hostpage_boundary);
22342234
22352235 res = ram_save_release_protection(rs, pss, start_page);
22362236 return (res < 0 ? res : pages);