Why does qemu complain “No IOMMU found. Unable to assign device”?

When follow How to assign devices with VT-d in KVM tutorial in KVM site, you may encounter qemu-system-x86_64complains:

......No IOMMU found.  Unable to assign device......

The root cause is the KVM_DEVICE_ASSIGNMENT configuration option is deprecated, and the code in kernel KVM part is like this:

    case KVM_CAP_IOMMU:
        r = iommu_present(&pci_bus_type);

So you should use VFIO feature instead.

If you still to want to use KVM_DEVICE_ASSIGNMENT feature, please rebuild the kernel with KVM_DEVICE_ASSIGNMENT option on.

A question about “CONFIGKVMDEVICE_ASSIGNMENT” configuration