amd/iommu: assign iommu devices to Xen
authorRoger Pau Monné <roger.pau@citrix.com>
Fri, 30 Nov 2018 11:09:09 +0000 (12:09 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 30 Nov 2018 11:09:09 +0000 (12:09 +0100)
commitb6bd02b7a877f9fac2de69e64d8245d56f92ab25
tree327045706b1812d33d7bb2ef87c1fcaaf87c301b
parent01cab9d775b908457a3a5849373cf4d4dbcce95c
amd/iommu: assign iommu devices to Xen

AMD IOMMU devices are exposed on the PCI bus, and thus are assigned by
default to the hardware domain. This can cause issues because the
IOMMU devices themselves are not behind an IOMMU, so update_paging_mode will
return an error if Xen tries to expand the page tables of a domain
that has assigned devices not behind an IOMMU. update_paging_mode
failing will cause the domain to be destroyed.

Fix this by hiding PCI IOMMU devices, so they are not assigned to the
hardware domain.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Brian Woods <brian.woods@amd.com>
xen/drivers/passthrough/amd/iommu_init.c