• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

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

Commit MetaInfo

修订版20d549cb0b6c8a9df8690d8e97505aa785036472 (tree)
时间2022-01-28 23:38:23
作者Juan Quintela <quintela@redh...>
CommiterJuan Quintela

Log Message

migration: Remove masking for compression

Remove the mask in the call to ram_release_pages(). Nothing else does
it, and if the offset has that bits set, we have a lot of trouble.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

更改概述

差异

--- a/migration/ram.c
+++ b/migration/ram.c
@@ -1340,7 +1340,7 @@ static bool do_compress_ram_page(QEMUFile *f, z_stream *stream, RAMBlock *block,
13401340 ram_addr_t offset, uint8_t *source_buf)
13411341 {
13421342 RAMState *rs = ram_state;
1343- uint8_t *p = block->host + (offset & TARGET_PAGE_MASK);
1343+ uint8_t *p = block->host + offset;
13441344 bool zero_page = false;
13451345 int ret;
13461346
@@ -1365,7 +1365,7 @@ static bool do_compress_ram_page(QEMUFile *f, z_stream *stream, RAMBlock *block,
13651365 }
13661366
13671367 exit:
1368- ram_release_page(block->idstr, offset & TARGET_PAGE_MASK);
1368+ ram_release_page(block->idstr, offset);
13691369 return zero_page;
13701370 }
13711371