Skip to content

Commit

Permalink
cpr: relax vhost migration blockers
Browse files Browse the repository at this point in the history
vhost blocks migration if logging is not supported to track dirty
memory, and vhost-user blocks it if the log cannot be saved to a shm fd.

vhost-vdpa blocks migration if both hosts do not support all the device's
features using a shadow VQ, for tracking requests and dirty memory.

vhost-scsi blocks migration if storage cannot be shared across hosts,
or if state cannot be migrated.

None of these conditions apply if the old and new qemu processes do
not run concurrently, and if new qemu starts on the same host as old,
which is the case for cpr.

Narrow the scope of these blockers so they only apply to normal mode.
They will not block cpr modes when they are added in subsequent patches.

No functional change until a new mode is added.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <1698263069-406971-5-git-send-email-steven.sistare@oracle.com>
  • Loading branch information
Steve Sistare authored and Juan Quintela committed Nov 1, 2023
1 parent e0ee3a8 commit 8941579
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hw/scsi/vhost-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ static void vhost_scsi_realize(DeviceState *dev, Error **errp)
"When external environment supports it (Orchestrator migrates "
"target SCSI device state or use shared storage over network), "
"set 'migratable' property to true to enable migration.");
if (migrate_add_blocker(&vsc->migration_blocker, errp) < 0) {
if (migrate_add_blocker_normal(&vsc->migration_blocker, errp) < 0) {
goto free_virtio;
}
}
Expand Down
2 changes: 1 addition & 1 deletion hw/virtio/vhost.c
Original file line number Diff line number Diff line change
Expand Up @@ -1527,7 +1527,7 @@ int vhost_dev_init(struct vhost_dev *hdev, void *opaque,
}

if (hdev->migration_blocker != NULL) {
r = migrate_add_blocker(&hdev->migration_blocker, errp);
r = migrate_add_blocker_normal(&hdev->migration_blocker, errp);
if (r < 0) {
goto fail_busyloop;
}
Expand Down

0 comments on commit 8941579

Please sign in to comment.