}
/**
- * 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.
* @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);
}
}
ret = -EINVAL;
break;
}
- ram_handle_compressed(host, ch, TARGET_PAGE_SIZE);
+ ram_handle_zero(host, TARGET_PAGE_SIZE);
break;
case RAM_SAVE_FLAG_PAGE:
int ram_postcopy_incoming_init(MigrationIncomingState *mis);
int ram_load_postcopy(QEMUFile *f, int channel);
-void ram_handle_compressed(void *host, uint8_t ch, uint64_t size);
+void ram_handle_zero(void *host, uint64_t size);
void ram_transferred_add(uint64_t bytes);
void ram_release_page(const char *rbname, uint64_t offset);
comp->value);
goto err;
}
- ram_handle_compressed(host_addr, comp->value, comp->length);
+ ram_handle_zero(host_addr, comp->length);
break;
case RDMA_CONTROL_REGISTER_FINISHED: