On 09.10.25 22:09, Raphael Norwitz wrote:
A small question here but will review more thoroughly pending feedback
on my overall comments.


I really hope you didn't spent much time on these 28-31 patches :/

On Wed, Aug 13, 2025 at 12:53 PM Vladimir Sementsov-Ogievskiy
<[email protected]> wrote:


[..]

--- a/migration/options.c
+++ b/migration/options.c
@@ -269,6 +269,13 @@ bool migrate_local_char_socket(void)
      return s->capabilities[MIGRATION_CAPABILITY_LOCAL_CHAR_SOCKET];
  }

+bool migrate_local_vhost_user_blk(void)
+{
+    MigrationState *s = migrate_get_current();
+

Where was MIGRATION_CAPABILITY_LOCAL_VHOST_USER_BLK added/defined?

It is generated by QAPI code generator.

Exactly, it's defined by 'local-vhost-user-blk' member inside 
'MigrationCapability':

{ 'enum': 'MigrationCapability',
  'data': ['xbzrle', 'rdma-pin-all', 'auto-converge',

           ...

           { 'name': 'local-vhost-user-blk', 'features': [ 'unstable' ] } ] }


and after build, the generated code is in build/qapi/qapi-types-migration.h, as 
a enum:

typedef enum MigrationCapability {
    MIGRATION_CAPABILITY_XBZRLE,

    ,,,

    MIGRATION_CAPABILITY_LOCAL_VHOST_USER_BLK,
    MIGRATION_CAPABILITY__MAX,
} MigrationCapability;


In v2, I'll follow the interface of virtio-net series, look at

https://patchew.org/QEMU/[email protected]/[email protected]/

so, it would be migration parameter instead of capability, like

    QMP migrate-set-parameters {... backend-transfer = ["vhost-user-blk"] }

and to enable both vhost-user-blk and virtio-net-tap together:

    QMP migrate-set-parameters {... backend-transfer = ["vhost-user-blk", 
"virtio-net-tap"] }



+    return s->capabilities[MIGRATION_CAPABILITY_LOCAL_VHOST_USER_BLK];
+}
+

[..]


--
Best regards,
Vladimir

Reply via email to