On 09.10.25 22:09, Raphael Norwitz wrote:
Just a naming nit.
On Wed, Aug 13, 2025 at 12:54 PM Vladimir Sementsov-Ogievskiy
<[email protected]> wrote:
In case of local backend migration, skip backend-related
initialization, but instead get the state from migration
channel (including secondary channel file descriptor).
[..]
@@ -2273,6 +2275,10 @@ static int vhost_user_backend_init(struct vhost_dev
*dev, void *opaque,
u->dev = dev;
dev->opaque = u;
+ if (dev->migrating_backend) {
+ goto out;
+ }
+
err = vhost_user_get_features(dev, &features);
if (err < 0) {
error_setg_errno(errp, -err, "vhost_backend_init failed");
@@ -2387,6 +2393,7 @@ static int vhost_user_backend_init(struct vhost_dev *dev,
void *opaque,
}
}
Maybe call the goto target migrating_backend_out or something else to
indicate what it's for.
I've get rid of this goto in upcoming v2.
+out:
u->postcopy_notifier.notify = vhost_user_postcopy_notifier;
postcopy_add_notifier(&u->postcopy_notifier);
@@ -2936,6 +2943,10 @@ void vhost_user_async_close(DeviceState *d,
static int vhost_user_dev_start(struct vhost_dev *dev, bool started)
{
[..]
--
Best regards,
Vladimir