[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/2] vfio/ccw: Don't initialize HOST_IOMMU_DEVICE with mdev
From: |
Eric Farman |
Subject: |
Re: [PATCH 2/2] vfio/ccw: Don't initialize HOST_IOMMU_DEVICE with mdev |
Date: |
Mon, 22 Jul 2024 10:57:28 -0400 |
User-agent: |
Evolution 3.52.3 (3.52.3-1.fc40) |
On Mon, 2024-07-22 at 15:07 +0800, Zhenzhong Duan wrote:
> 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.
Hmm, picking the two commits that Cedric mentioned in his cover-letter reply
[1] doesn't "fail the entire provisioning of the guest" for me.
Applying this patch on top of that causes the call from vfio_attach_device() to
hiod_legacy_vfio_realize() to be skipped, which seems odd. What am I missing?
[1]
4c9a184b-514c-4276-95ca-9ed86623b9a4@redhat.com/">https://lore.kernel.org/qemu-devel/4c9a184b-514c-4276-95ca-9ed86623b9a4@redhat.com/
>
> Fixes: 930589520128 ("vfio/iommufd: Implement HostIOMMUDeviceClass::realize()
> handler")
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
> ---
> hw/vfio/ccw.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c
> index 1f8e1272c7..70934b01d5 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
Re: [PATCH 0/2] Don't initialize HOST_IOMMU_DEVICE with mdev, Eric Auger, 2024/07/22
Re: [PATCH 0/2] Don't initialize HOST_IOMMU_DEVICE with mdev, Cédric Le Goater, 2024/07/22
Re: [PATCH 0/2] Don't initialize HOST_IOMMU_DEVICE with mdev, Cédric Le Goater, 2024/07/22