代码拉取完成,页面将自动刷新
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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。