36 lines
1.2 KiB
Diff
36 lines
1.2 KiB
Diff
|
|
From 44d573b10c45746e81d0d1786fe61d45160f2181 Mon Sep 17 00:00:00 2001
|
||
|
|
From: Zhenzhong Duan <zhenzhong.duan@intel.com>
|
||
|
|
Date: Mon, 22 Jul 2024 15:07:12 +0800
|
||
|
|
Subject: [PATCH] vfio/ap: 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>
|
||
|
|
Reviewed-by: Eric Auger <eric.auger@redhat.com>
|
||
|
|
---
|
||
|
|
hw/vfio/ap.c | 3 +++
|
||
|
|
1 file changed, 3 insertions(+)
|
||
|
|
|
||
|
|
diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c
|
||
|
|
index e157aa1ff7..6b2bc32549 100644
|
||
|
|
--- a/hw/vfio/ap.c
|
||
|
|
+++ b/hw/vfio/ap.c
|
||
|
|
@@ -234,6 +234,9 @@ static void vfio_ap_instance_init(Object *obj)
|
||
|
|
*/
|
||
|
|
vfio_device_init(vbasedev, VFIO_DEVICE_TYPE_AP, &vfio_ap_ops,
|
||
|
|
DEVICE(vapdev), true);
|
||
|
|
+
|
||
|
|
+ /* AP device is mdev type device */
|
||
|
|
+ vbasedev->mdev = true;
|
||
|
|
}
|
||
|
|
|
||
|
|
#ifdef CONFIG_IOMMUFD
|
||
|
|
--
|
||
|
|
2.41.0.windows.1
|
||
|
|
|