diff options
author | Wei Yang <richardw.yang@linux.intel.com> | 2019-10-05 21:50:20 +0800 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2019-10-11 14:28:19 +0100 |
commit | 3414322a83be11b86166d2a53432615092bdcbb8 (patch) | |
tree | d6e30a47e93afa8f4e3516bbd81cc05e5df6edc4 /migration/postcopy-ram.h | |
parent | fb14a42ade228e2d6123af56c0015262fd83250d (diff) | |
download | qemu-3414322a83be11b86166d2a53432615092bdcbb8.zip qemu-3414322a83be11b86166d2a53432615092bdcbb8.tar.gz qemu-3414322a83be11b86166d2a53432615092bdcbb8.tar.bz2 |
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>
Diffstat (limited to 'migration/postcopy-ram.h')
-rw-r--r-- | migration/postcopy-ram.h | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/migration/postcopy-ram.h b/migration/postcopy-ram.h index 9c8bd2b..fb4cd11 100644 --- a/migration/postcopy-ram.h +++ b/migration/postcopy-ram.h @@ -100,13 +100,6 @@ typedef enum { POSTCOPY_INCOMING_END } PostcopyState; -/* - * Allocate a page of memory that can be mapped at a later point in time - * using postcopy_place_page - * Returns: Pointer to allocated page - */ -void *postcopy_get_tmp_page(MigrationIncomingState *mis); - PostcopyState postcopy_state_get(void); /* Set the state and return the old state */ PostcopyState postcopy_state_set(PostcopyState new_state); |