mirror of https://github.com/xemu-project/xemu.git
migration: control_save_page() can take block through pss
Reviewed-by: Lukas Straub <lukasstraub2@web.de> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
d637a182b9
commit
944853c201
|
@ -1186,12 +1186,12 @@ static int save_zero_page(RAMState *rs, PageSearchStatus *pss, RAMBlock *block,
|
||||||
*
|
*
|
||||||
* Return true if the pages has been saved, otherwise false is returned.
|
* Return true if the pages has been saved, otherwise false is returned.
|
||||||
*/
|
*/
|
||||||
static bool control_save_page(PageSearchStatus *pss, RAMBlock *block,
|
static bool control_save_page(PageSearchStatus *pss,
|
||||||
ram_addr_t offset, int *pages)
|
ram_addr_t offset, int *pages)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = rdma_control_save_page(pss->pss_channel, block->offset, offset,
|
ret = rdma_control_save_page(pss->pss_channel, pss->block->offset, offset,
|
||||||
TARGET_PAGE_SIZE);
|
TARGET_PAGE_SIZE);
|
||||||
if (ret == RAM_SAVE_CONTROL_NOT_SUPP) {
|
if (ret == RAM_SAVE_CONTROL_NOT_SUPP) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -2111,7 +2111,7 @@ static int ram_save_target_page_legacy(RAMState *rs, PageSearchStatus *pss)
|
||||||
ram_addr_t offset = ((ram_addr_t)pss->page) << TARGET_PAGE_BITS;
|
ram_addr_t offset = ((ram_addr_t)pss->page) << TARGET_PAGE_BITS;
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
if (control_save_page(pss, block, offset, &res)) {
|
if (control_save_page(pss, offset, &res)) {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue