mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
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>
This commit is contained in:
parent
fb14a42ade
commit
3414322a83
3 changed files with 11 additions and 38 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue