From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGqcP-0007gq-Ri for qemu-devel@nongnu.org; Mon, 11 Aug 2014 10:30:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XGqcJ-0000xI-BP for qemu-devel@nongnu.org; Mon, 11 Aug 2014 10:30:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26957) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGqcI-0000wp-84 for qemu-devel@nongnu.org; Mon, 11 Aug 2014 10:30:30 -0400 From: "Dr. David Alan Gilbert (git)" Date: Mon, 11 Aug 2014 15:29:30 +0100 Message-Id: <1407767399-3030-15-git-send-email-dgilbert@redhat.com> In-Reply-To: <1407767399-3030-1-git-send-email-dgilbert@redhat.com> References: <1407767399-3030-1-git-send-email-dgilbert@redhat.com> Subject: [Qemu-devel] [PATCH v2 14/43] Add migration-capability boolean for postcopy-ram. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aarcange@redhat.com, yamahata@private.email.ne.jp, lilei@linux.vnet.ibm.com, quintela@redhat.com From: "Dr. David Alan Gilbert" Signed-off-by: Dr. David Alan Gilbert --- 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 984d96c..ad02602 100644 --- a/include/migration/migration.h +++ b/include/migration/migration.h @@ -174,6 +174,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 c54d59e..bd7071a 100644 --- a/migration.c +++ b/migration.c @@ -632,6 +632,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 341f417..77e57bd 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