]> git.proxmox.com Git - mirror_qemu.git/commit
migration/postcopy: allocate tmp_page in setup stage
authorWei Yang <richardw.yang@linux.intel.com>
Sat, 5 Oct 2019 13:50:20 +0000 (21:50 +0800)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Fri, 11 Oct 2019 13:28:19 +0000 (14:28 +0100)
commit3414322a83be11b86166d2a53432615092bdcbb8
treed6e30a47e93afa8f4e3516bbd81cc05e5df6edc4
parentfb14a42ade228e2d6123af56c0015262fd83250d
migration/postcopy: allocate tmp_page in setup stage

During migration, a tmp page is allocated so that we could place a whole
host page during postcopy.

Currently the page is allocated during load stage, this is a little bit
late. And more important, if we failed to allocate it, the error is not
checked properly. Even it is NULL, we would still use it.

This patch moves the allocation to setup stage and if failed error
message would be printed and caller would notice it.

Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
migration/postcopy-ram.c
migration/postcopy-ram.h
migration/ram.c