intel_iommu: Check compatibility with host IOMMU capabilities
commit77f6efc0ab93718da2bc3f908b7ff7fffa489ea1
authorZhenzhong Duan <zhenzhong.duan@intel.com>
Wed, 5 Jun 2024 08:30:43 +0000 (5 16:30 +0800)
committerCédric Le Goater <clg@redhat.com>
Mon, 24 Jun 2024 21:15:30 +0000 (24 23:15 +0200)
treee2c340ee7f20da045db0cc6c1398c36a7410029a
parenta20910ca3e283b10585c71061746ea6b1fa6ca91
intel_iommu: Check compatibility with host IOMMU capabilities

If check fails, host device (either VFIO or VDPA device) is not
compatible with current vIOMMU config and should not be passed to
guest.

Only aw_bits is checked for now, we don't care about other caps
before scalable modern mode is introduced.

Signed-off-by: Yi Liu <yi.l.liu@intel.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
hw/i386/intel_iommu.c