[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 07/16] vfio/ccw: Don't initialize HOST_IOMMU_DEVICE with mdev
From: |
Cédric Le Goater |
Subject: |
[PULL 07/16] vfio/ccw: Don't initialize HOST_IOMMU_DEVICE with mdev |
Date: |
Tue, 23 Jul 2024 16:00:10 +0200 |
From: Zhenzhong Duan <zhenzhong.duan@intel.com>
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
1f8e1272c7555cd0a770481d1ae92988f6e2e62e..115862f43036442d99c33f0328e5bc599ba1f2b9
100644
--- a/hw/vfio/ccw.c
+++ b/hw/vfio/ccw.c
@@ -675,6 +675,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.45.2
- [PULL 00/16] vfio queue, Cédric Le Goater, 2024/07/23
- [PULL 01/16] hw/vfio/container: Fix SIGSEV on vfio_container_instance_finalize(), Cédric Le Goater, 2024/07/23
- [PULL 02/16] vfio/pci: Extract mdev check into an helper, Cédric Le Goater, 2024/07/23
- [PULL 04/16] backends/iommufd: Extend iommufd_backend_get_device_info() to fetch HW capabilities, Cédric Le Goater, 2024/07/23
- [PULL 03/16] vfio/iommufd: Don't initialize nor set a HOST_IOMMU_DEVICE with mdev, Cédric Le Goater, 2024/07/23
- [PULL 05/16] vfio/iommufd: Return errno in iommufd_cdev_attach_ioas_hwpt(), Cédric Le Goater, 2024/07/23
- [PULL 06/16] vfio/ap: Don't initialize HOST_IOMMU_DEVICE with mdev, Cédric Le Goater, 2024/07/23
- [PULL 07/16] vfio/ccw: Don't initialize HOST_IOMMU_DEVICE with mdev,
Cédric Le Goater <=
- [PULL 08/16] vfio/iommufd: Introduce auto domain creation, Cédric Le Goater, 2024/07/23
- [PULL 09/16] vfio/{iommufd,container}: Remove caps::aw_bits, Cédric Le Goater, 2024/07/23
- [PULL 10/16] vfio/iommufd: Add hw_caps field to HostIOMMUDeviceCaps, Cédric Le Goater, 2024/07/23
- [PULL 12/16] vfio/iommufd: Probe and request hwpt dirty tracking capability, Cédric Le Goater, 2024/07/23
- [PULL 11/16] vfio/{iommufd, container}: Invoke HostIOMMUDevice::realize() during attach_device(), Cédric Le Goater, 2024/07/23
- [PULL 13/16] vfio/iommufd: Implement VFIOIOMMUClass::set_dirty_tracking support, Cédric Le Goater, 2024/07/23
- Re: [PULL 00/16] vfio queue, Cédric Le Goater, 2024/07/23