diff options
author | Juan Quintela <quintela@redhat.com> | 2021-12-21 10:28:16 +0100 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2022-01-28 15:38:23 +0100 |
commit | 20d549cb0b6c8a9df8690d8e97505aa785036472 (patch) | |
tree | 721a4ba65a85c2fec82fccd728448afff409e0d6 /migration/ram.c | |
parent | 0189c722917ce3626e21bcad675871228626d61b (diff) |
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>
Diffstat (limited to 'migration/ram.c')
-rw-r--r-- | migration/ram.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/migration/ram.c b/migration/ram.c index 881fe4974e..fa49d22e69 100644 --- 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, ram_addr_t offset, uint8_t *source_buf) { RAMState *rs = ram_state; - uint8_t *p = block->host + (offset & TARGET_PAGE_MASK); + uint8_t *p = block->host + offset; bool zero_page = false; int ret; @@ -1365,7 +1365,7 @@ static bool do_compress_ram_page(QEMUFile *f, z_stream *stream, RAMBlock *block, } exit: - ram_release_page(block->idstr, offset & TARGET_PAGE_MASK); + ram_release_page(block->idstr, offset); return zero_page; } |