]> xenbits.xensource.com Git - xen.git/commit
iommu: fix check for autotranslated hardware domain
authorRoger Pau Monné <roger.pau@citrix.com>
Thu, 5 Mar 2020 09:43:46 +0000 (10:43 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 5 Mar 2020 09:43:46 +0000 (10:43 +0100)
commitfaf0d606a6eb911449075b83ea0ad085960c9acb
tree0399a146307688397518da86b192618c91cf8308
parent73b47eea21045556dc5334e4f17d0c05c23f3c16
iommu: fix check for autotranslated hardware domain

The current position of the check_hwdom_reqs is wrong, as there's a
is_iommu_enabled at the top of the function that will prevent getting
to the check on systems without an IOMMU, because the hardware domain
won't have the XEN_DOMCTL_CDF_iommu flag set.

Move the position of the check so it's done before the
is_iommu_enabled one, and thus attempts to create a translated
hardware domain without an IOMMU can be detected.

Fixes: f89f555827a ('remove late (on-demand) construction of IOMMU page tables')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/drivers/passthrough/iommu.c