20 Star 29 Fork 145

src-openEuler/qemu
关闭

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vfio-container-Initialize-VFIOIOMMUOps-under-vfio_in.patch 1.94 KB
一键复制 编辑 原始数据 按行查看 历史
Jiabo Feng 提交于 2025-04-22 14:34 +08:00 . QEMU update to version 8.2.0-30:
From 7a81c3919dda48b4e12b83ceb661896523cce6ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= <clg@redhat.com>
Date: Tue, 19 Dec 2023 07:58:18 +0100
Subject: [PATCH] vfio/container: Initialize VFIOIOMMUOps under
vfio_init_container()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
vfio_init_container() already defines the IOMMU type of the container.
Do the same for the VFIOIOMMUOps struct. This prepares ground for the
following patches that will deduce the associated VFIOIOMMUOps struct
from the IOMMU type.
Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Tested-by: Eric Farman <farman@linux.ibm.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
---
hw/vfio/container.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/vfio/container.c b/hw/vfio/container.c
index 27ce31c883..dc805ceb12 100644
--- a/hw/vfio/container.c
+++ b/hw/vfio/container.c
@@ -430,7 +430,7 @@ static int vfio_get_iommu_type(VFIOContainer *container,
}
static int vfio_init_container(VFIOContainer *container, int group_fd,
- Error **errp)
+ VFIOAddressSpace *space, Error **errp)
{
int iommu_type, dirty_log_manual_clear, ret;
@@ -467,7 +467,7 @@ static int vfio_init_container(VFIOContainer *container, int group_fd,
if (dirty_log_manual_clear) {
container->dirty_log_manual_clear = dirty_log_manual_clear;
}
-
+ vfio_container_init(&container->bcontainer, space, &vfio_legacy_ops);
return 0;
}
@@ -679,7 +679,7 @@ static int vfio_connect_container(VFIOGroup *group, AddressSpace *as,
bcontainer = &container->bcontainer;
vfio_container_init(bcontainer, space, &vfio_legacy_ops);
- ret = vfio_init_container(container, group->fd, errp);
+ ret = vfio_init_container(container, group->fd, space, errp);
if (ret) {
goto free_container_exit;
}
--
2.41.0.windows.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/qemu.git
git@gitee.com:src-openeuler/qemu.git
src-openeuler
qemu
qemu
master

搜索帮助