summaryrefslogtreecommitdiff
path: root/include/uapi/linux/vhost.h
diff options
context:
space:
mode:
authorSebastien Boeuf <sebastien.boeuf@intel.com>2023-01-03 13:51:07 +0300
committerMichael S. Tsirkin <mst@redhat.com>2023-02-21 03:26:56 +0300
commit3b688d7a086d0438649ea37990c6e811954fc780 (patch)
treebccd58f19543398649064ed4e3f9e3c30416f5f9 /include/uapi/linux/vhost.h
parent69106b6fb3d73bd4252daa48ae96e600c9701147 (diff)
downloadlinux-3b688d7a086d0438649ea37990c6e811954fc780.tar.xz
vhost-vdpa: uAPI to resume the device
This new ioctl adds support for resuming the device from userspace. This is required when trying to restore the device in a functioning state after it's been suspended. It is already possible to reset a suspended device, but that means the device must be reconfigured and all the IOMMU/IOTLB mappings must be recreated. This new operation allows the device to be resumed without going through a full reset. This is particularly useful when trying to perform offline migration of a virtual machine (also known as snapshot/restore) as it allows the VMM to resume the virtual machine back to a running state after the snapshot is performed. Acked-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com> Message-Id: <73b75fb87d25cff59768b4955a81fe7ffe5b4770.1672742878.git.sebastien.boeuf@intel.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Diffstat (limited to 'include/uapi/linux/vhost.h')
-rw-r--r--include/uapi/linux/vhost.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/uapi/linux/vhost.h b/include/uapi/linux/vhost.h
index f9f115a7c75b..92e1b700b51c 100644
--- a/include/uapi/linux/vhost.h
+++ b/include/uapi/linux/vhost.h
@@ -180,4 +180,12 @@
*/
#define VHOST_VDPA_SUSPEND _IO(VHOST_VIRTIO, 0x7D)
+/* Resume a device so it can resume processing virtqueue requests
+ *
+ * After the return of this ioctl the device will have restored all the
+ * necessary states and it is fully operational to continue processing the
+ * virtqueue descriptors.
+ */
+#define VHOST_VDPA_RESUME _IO(VHOST_VIRTIO, 0x7E)
+
#endif