That's an old way to enable backend-transfer feature for vhost-user-blk. I just kept it unchanged since v1 of the series.
At least, it should be migration-parameter instead of capability. But currently, there is discussion on final API in context of "[PATCH v8 00/19] virtio-net: live-TAP local migration", here: https://lore.kernel.org/qemu-devel/[email protected]/ So, consider this one as temporary patch, which will be replaced by some other API. Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]> --- migration/options.c | 7 +++++++ migration/options.h | 1 + qapi/migration.json | 11 +++++++++-- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/migration/options.c b/migration/options.c index 5183112775..3a013b9898 100644 --- a/migration/options.c +++ b/migration/options.c @@ -262,6 +262,13 @@ bool migrate_mapped_ram(void) return s->capabilities[MIGRATION_CAPABILITY_MAPPED_RAM]; } +bool migrate_local_vhost_user_blk(void) +{ + MigrationState *s = migrate_get_current(); + + return s->capabilities[MIGRATION_CAPABILITY_LOCAL_VHOST_USER_BLK]; +} + bool migrate_ignore_shared(void) { MigrationState *s = migrate_get_current(); diff --git a/migration/options.h b/migration/options.h index 82d839709e..95a3f482bc 100644 --- a/migration/options.h +++ b/migration/options.h @@ -30,6 +30,7 @@ bool migrate_colo(void); bool migrate_dirty_bitmaps(void); bool migrate_events(void); bool migrate_mapped_ram(void); +bool migrate_local_vhost_user_blk(void); bool migrate_ignore_shared(void); bool migrate_late_block_activate(void); bool migrate_multifd(void); diff --git a/qapi/migration.json b/qapi/migration.json index be0f3fcc12..d29a4915b4 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -517,9 +517,15 @@ # each RAM page. Requires a migration URI that supports seeking, # such as a file. (since 9.0) # +# @local-vhost-user-blk: Migrate vhost-user-blk locally, keeping +# backend alive. Open file descriptors and backend-related state +# are migrated. Only may be used when migration channel is UNIX +# domain socket. (since 10.2) +# # Features: # -# @unstable: Members @x-colo and @x-ignore-shared are experimental. +# @unstable: Members @x-colo, @x-ignore-shared, +# @local-vhost-user-blk are experimental. # @deprecated: Member @zero-blocks is deprecated as being part of # block migration which was already removed. # @@ -536,7 +542,8 @@ { 'name': 'x-ignore-shared', 'features': [ 'unstable' ] }, 'validate-uuid', 'background-snapshot', 'zero-copy-send', 'postcopy-preempt', 'switchover-ack', - 'dirty-limit', 'mapped-ram'] } + 'dirty-limit', 'mapped-ram', + { 'name': 'local-vhost-user-blk', 'features': [ 'unstable' ] } ] } ## # @MigrationCapabilityStatus: -- 2.48.1
