加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vhost-add-vhost_dev_suspend-resume_op.patch 1.43 KB
一键复制 编辑 原始数据 按行查看 历史
Jiabo Feng 提交于 2024-04-07 10:21 . QEMU update to version 8.2.0-5
From b0a62a84bd1c6ad5d4c11463371fcf267b56d902 Mon Sep 17 00:00:00 2001
From: libai <libai12@huawei.com>
Date: Mon, 4 Dec 2023 15:13:41 +0800
Subject: [PATCH] vhost: add vhost_dev_suspend/resume_op
Introduce new vhost interface to support vhost device suspend & resume
Signed-off-by: libai <libai12@huawei.com>
---
include/hw/virtio/vhost-backend.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/hw/virtio/vhost-backend.h b/include/hw/virtio/vhost-backend.h
index 71b02e4a12..84b8fa1075 100644
--- a/include/hw/virtio/vhost-backend.h
+++ b/include/hw/virtio/vhost-backend.h
@@ -155,6 +155,9 @@ typedef int (*vhost_set_device_state_fd_op)(struct vhost_dev *dev,
Error **errp);
typedef int (*vhost_check_device_state_op)(struct vhost_dev *dev, Error **errp);
+typedef int (*vhost_dev_suspend_op)(struct vhost_dev *dev);
+typedef int (*vhost_dev_resume_op)(struct vhost_dev *dev);
+
typedef struct VhostOps {
VhostBackendType backend_type;
vhost_backend_init vhost_backend_init;
@@ -208,6 +211,8 @@ typedef struct VhostOps {
vhost_supports_device_state_op vhost_supports_device_state;
vhost_set_device_state_fd_op vhost_set_device_state_fd;
vhost_check_device_state_op vhost_check_device_state;
+ vhost_dev_suspend_op vhost_dev_suspend;
+ vhost_dev_resume_op vhost_dev_resume;
} VhostOps;
int vhost_backend_update_device_iotlb(struct vhost_dev *dev,
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化