xen: do not allocate RAM during INMIGRATE runstate

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
This commit is contained in:
Anthony PERARD 2012-01-25 12:36:06 +00:00 committed by Stefano Stabellini
parent cd1ba7de23
commit c234572ded

View File

@ -190,6 +190,14 @@ void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, MemoryRegion *mr)
xen_pfn_t *pfn_list;
int i;
if (runstate_check(RUN_STATE_INMIGRATE)) {
/* RAM already populated in Xen */
fprintf(stderr, "%s: do not alloc "RAM_ADDR_FMT
" bytes of ram at "RAM_ADDR_FMT" when runstate is INMIGRATE\n",
__func__, size, ram_addr);
return;
}
if (mr == &ram_memory) {
return;
}