From: "Dr. David Alan Gilbert" <dgilb...@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilb...@redhat.com> --- include/migration/migration.h | 1 + migration.c | 9 +++++++++ qapi-schema.json | 6 +++++- 3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/include/migration/migration.h b/include/migration/migration.h index a1ed7a3..35ad1f6 100644 --- a/include/migration/migration.h +++ b/include/migration/migration.h @@ -171,6 +171,7 @@ void migrate_add_blocker(Error *reason); */ void migrate_del_blocker(Error *reason); +bool migrate_postcopy_ram(void); bool migrate_rdma_pin_all(void); bool migrate_zero_blocks(void); diff --git a/migration.c b/migration.c index e69a49e..67cdfd6 100644 --- a/migration.c +++ b/migration.c @@ -612,6 +612,15 @@ bool migrate_rdma_pin_all(void) return s->enabled_capabilities[MIGRATION_CAPABILITY_RDMA_PIN_ALL]; } +bool migrate_postcopy_ram(void) +{ + MigrationState *s; + + s = migrate_get_current(); + + return s->enabled_capabilities[MIGRATION_CAPABILITY_X_POSTCOPY_RAM]; +} + bool migrate_auto_converge(void) { MigrationState *s; diff --git a/qapi-schema.json b/qapi-schema.json index b11aad2..eac3739 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -491,10 +491,14 @@ # @auto-converge: If enabled, QEMU will automatically throttle down the guest # to speed up convergence of RAM migration. (since 1.6) # +# @x-postcopy-ram: Start executing on the migration target before all of RAM has been +# migrated, pulling the remaining pages along as needed. NOTE: If the +# migration fails during postcopy the VM will fail. (since 2.2) +# # Since: 1.2 ## { 'enum': 'MigrationCapability', - 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks'] } + 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks', 'x-postcopy-ram'] } ## # @MigrationCapabilityStatus -- 1.9.3