mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
vhost: add migration block if memfd failed
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Tested-by: Thibaut Collet <thibaut.collet@6wind.com>
This commit is contained in:
parent
de1372d466
commit
31190ed781
3 changed files with 27 additions and 0 deletions
|
@ -1019,6 +1019,9 @@ int vhost_dev_init(struct vhost_dev *hdev, void *opaque,
|
|||
if (!(hdev->features & (0x1ULL << VHOST_F_LOG_ALL))) {
|
||||
error_setg(&hdev->migration_blocker,
|
||||
"Migration disabled: vhost lacks VHOST_F_LOG_ALL feature.");
|
||||
} else if (!qemu_memfd_check()) {
|
||||
error_setg(&hdev->migration_blocker,
|
||||
"Migration disabled: failed to allocate shared memory");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue