On 21.07.26 09:47, Markus Armbruster wrote:
Vladimir Sementsov-Ogievskiy <[email protected]> writes:

We are going to implement local-migration feature: some devices will be
able to transfer open file descriptors through migration stream (which
must UNIX domain socket for that purpose).  This allows to transfer the
whole backend state without reconnecting and restarting the backend
service. For example, virtio-net will migrate its attached TAP netdev,
together with its connected file descriptors.

In this commit we introduce a migration parameter, which enables
the feature for devices that support it (none at the moment).

Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]>
Acked-by: Markus Armbruster <[email protected]>
Acked-by: Peter Xu <[email protected]>
Reviewed-by: Ben Chaney <[email protected]>

[...]

diff --git a/qapi/migration.json b/qapi/migration.json
index 66bd900465a..813c1f76e46 100644
--- a/qapi/migration.json
+++ b/qapi/migration.json
@@ -830,7 +830,8 @@
             'zero-page-detection',
             'direct-io',
             { 'name': 'x-rdma-chunk-size', 'features': [ 'unstable' ] },
-           'cpr-exec-command'] }
+           'cpr-exec-command',
+           'local'] }
##
  # @migrate-set-parameters:
@@ -1012,6 +1013,15 @@
  #     Must be set to the same value on both source and destination
  #     before migration starts.  (Since 11.1)
  #
+# @local: Permit the use of optimizations for local migration.
+#     This must only be set when both the source and destination
+#     QEMU processes are on the same OS and directly connected

I think "on the same OS" is less than clear.  Does it mean both ends run
Linux, or both ends run Windows?  That doesn't make sense.  Recommend to
scratch it, because what matters is the UNIX domain socket.

Agree.


With that, my Acked-by stands.

Ignorant question you may well have covered before: could we forgo
@local and simply use "is a UNIX domain socket"?

My mistake is still not having the answer in commit message.

We can't because, UNIX socket may be only a first part of transfer
channel to the remote target.

https://lore.kernel.org/qemu-devel/[email protected]/



+#     with a UNIX domain socket as the migration channel to enable
+#     use of file descriptor passing.  Individual device backends
+#     may need additional configuration flags set  to enable local
+#     migration optimizations.  This will be documented against the
+#     device backends where it applies.  (Since 11.2)
+#
  # Features:
  #
  # @unstable: Members @x-checkpoint-delay, @x-rdma-chunk-size, and
@@ -1053,7 +1063,8 @@
              '*direct-io': 'bool',
              '*x-rdma-chunk-size': { 'type': 'uint64',
                                      'features': [ 'unstable' ] },
-            '*cpr-exec-command': [ 'str' ]} }
+            '*cpr-exec-command': [ 'str' ],
+            '*local': 'bool' } }
##
  # @query-migrate-parameters:



--
Best regards,
Vladimir

Reply via email to