37 lines
1.3 KiB
Diff
37 lines
1.3 KiB
Diff
|
|
From ffcda8cc141e14528fd73aea750be822575eedcc Mon Sep 17 00:00:00 2001
|
||
|
|
From: Zhenzhong Duan <zhenzhong.duan@intel.com>
|
||
|
|
Date: Mon, 22 Jul 2024 15:07:13 +0800
|
||
|
|
Subject: [PATCH] vfio/ccw: Don't initialize HOST_IOMMU_DEVICE with mdev
|
||
|
|
|
||
|
|
mdevs aren't "physical" devices and when asking for backing IOMMU info,
|
||
|
|
it fails the entire provisioning of the guest. Fix that by setting
|
||
|
|
vbasedev->mdev true so skipping HostIOMMUDevice initialization in the
|
||
|
|
presence of mdevs.
|
||
|
|
|
||
|
|
Fixes: 930589520128 ("vfio/iommufd: Implement HostIOMMUDeviceClass::realize() handler")
|
||
|
|
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
|
||
|
|
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
|
||
|
|
Acked-by: Eric Farman <farman@linux.ibm.com>
|
||
|
|
Reviewed-by: Eric Auger <eric.auger@redhat.com>
|
||
|
|
---
|
||
|
|
hw/vfio/ccw.c | 3 +++
|
||
|
|
1 file changed, 3 insertions(+)
|
||
|
|
|
||
|
|
diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c
|
||
|
|
index 90e4a53437..257e9723cf 100644
|
||
|
|
--- a/hw/vfio/ccw.c
|
||
|
|
+++ b/hw/vfio/ccw.c
|
||
|
|
@@ -683,6 +683,9 @@ static void vfio_ccw_instance_init(Object *obj)
|
||
|
|
VFIOCCWDevice *vcdev = VFIO_CCW(obj);
|
||
|
|
VFIODevice *vbasedev = &vcdev->vdev;
|
||
|
|
|
||
|
|
+ /* CCW device is mdev type device */
|
||
|
|
+ vbasedev->mdev = true;
|
||
|
|
+
|
||
|
|
/*
|
||
|
|
* All vfio-ccw devices are believed to operate in a way compatible with
|
||
|
|
* discarding of memory in RAM blocks, ie. pages pinned in the host are
|
||
|
|
--
|
||
|
|
2.41.0.windows.1
|
||
|
|
|