]> git.ipfire.org Git - thirdparty/qemu.git/commit
vfio/iommufd: Move realize() after attachment
authorZhenzhong Duan <zhenzhong.duan@intel.com>
Wed, 23 Apr 2025 07:28:21 +0000 (15:28 +0800)
committerCédric Le Goater <clg@redhat.com>
Fri, 25 Apr 2025 07:01:38 +0000 (09:01 +0200)
commitc45d88b8a2f25600c69748bfcf37911412c396ab
tree54b6028f0e8777bef22e55e4f8cb18333f56aca0
parent436114cc4390ff46535229e67e43056196a971c1
vfio/iommufd: Move realize() after attachment

Previously device attaching depends on realize() getting host IOMMU
capabilities to check dirty tracking support.

Now we have a separate call to ioctl(IOMMU_GET_HW_INFO) to get host
IOMMU capabilities and check that for dirty tracking support, there
is no dependency any more, move realize() call after attachment
succeed.

Suggested-by: Cédric Le Goater <clg@redhat.com>
Suggested-by: Donald Dutile <ddutile@redhat.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250423072824.3647952-3-zhenzhong.duan@intel.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
hw/vfio/iommufd.c