migration: Rename ram_handle_compressed() to ram_handle_zero()

Now that we know it only handles zero, we can remove the ch parameter.

Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231019085259.13307-3-quintela@redhat.com>
This commit is contained in:
Juan Quintela 2023-10-19 10:52:59 +02:00
parent 413d64fedc
commit 7091dabeb4
3 changed files with 7 additions and 7 deletions

View file

@ -3446,7 +3446,7 @@ static inline void *colo_cache_from_block_offset(RAMBlock *block,
}
/**
* ram_handle_compressed: handle the zero page case
* ram_handle_zero: handle the zero page case
*
* If a page (or a whole RDMA chunk) has been
* determined to be zero, then zap it.
@ -3455,10 +3455,10 @@ static inline void *colo_cache_from_block_offset(RAMBlock *block,
* @ch: what the page is filled from. We only support zero
* @size: size of the zero page
*/
void ram_handle_compressed(void *host, uint8_t ch, uint64_t size)
void ram_handle_zero(void *host, uint64_t size)
{
if (ch != 0 || !buffer_is_zero(host, size)) {
memset(host, ch, size);
if (!buffer_is_zero(host, size)) {
memset(host, 0, size);
}
}
@ -4037,7 +4037,7 @@ static int ram_load_precopy(QEMUFile *f)
ret = -EINVAL;
break;
}
ram_handle_compressed(host, ch, TARGET_PAGE_SIZE);
ram_handle_zero(host, TARGET_PAGE_SIZE);
break;
case RAM_SAVE_FLAG_PAGE: