修订版 | 20d549cb0b6c8a9df8690d8e97505aa785036472 (tree) |
---|---|
时间 | 2022-01-28 23:38:23 |
作者 | Juan Quintela <quintela@redh...> |
Commiter | Juan Quintela |
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>
@@ -1340,7 +1340,7 @@ static bool do_compress_ram_page(QEMUFile *f, z_stream *stream, RAMBlock *block, | ||
1340 | 1340 | ram_addr_t offset, uint8_t *source_buf) |
1341 | 1341 | { |
1342 | 1342 | RAMState *rs = ram_state; |
1343 | - uint8_t *p = block->host + (offset & TARGET_PAGE_MASK); | |
1343 | + uint8_t *p = block->host + offset; | |
1344 | 1344 | bool zero_page = false; |
1345 | 1345 | int ret; |
1346 | 1346 |
@@ -1365,7 +1365,7 @@ static bool do_compress_ram_page(QEMUFile *f, z_stream *stream, RAMBlock *block, | ||
1365 | 1365 | } |
1366 | 1366 | |
1367 | 1367 | exit: |
1368 | - ram_release_page(block->idstr, offset & TARGET_PAGE_MASK); | |
1368 | + ram_release_page(block->idstr, offset); | |
1369 | 1369 | return zero_page; |
1370 | 1370 | } |
1371 | 1371 |