diff options
Diffstat (limited to 'include/migration')
-rw-r--r-- | include/migration/migration.h | 1 | ||||
-rw-r--r-- | include/migration/postcopy-ram.h | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/include/migration/migration.h b/include/migration/migration.h index 1491bf32ed..a48471e026 100644 --- a/include/migration/migration.h +++ b/include/migration/migration.h @@ -96,6 +96,7 @@ struct MigrationIncomingState { int userfault_fd; QEMUFile *to_src_file; QemuMutex rp_mutex; /* We send replies from multiple threads */ + void *postcopy_tmp_page; /* See savevm.c */ LoadStateEntry_Head loadvm_handlers; diff --git a/include/migration/postcopy-ram.h b/include/migration/postcopy-ram.h index b10c03db6e..d7c292fffa 100644 --- a/include/migration/postcopy-ram.h +++ b/include/migration/postcopy-ram.h @@ -69,4 +69,25 @@ void postcopy_discard_send_range(MigrationState *ms, PostcopyDiscardState *pds, void postcopy_discard_send_finish(MigrationState *ms, PostcopyDiscardState *pds); +/* + * Place a page (from) at (host) efficiently + * There are restrictions on how 'from' must be mapped, in general best + * to use other postcopy_ routines to allocate. + * returns 0 on success + */ +int postcopy_place_page(MigrationIncomingState *mis, void *host, void *from); + +/* + * Place a zero page at (host) atomically + * returns 0 on success + */ +int postcopy_place_page_zero(MigrationIncomingState *mis, void *host); + +/* + * 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); + #endif |