xen/iommu: fix dev assignment on ARM after 91d4eca7
authorStefano Stabellini <sstabellini@kernel.org>
Tue, 8 Jan 2019 18:47:19 +0000 (10:47 -0800)
committerStefano Stabellini <sstabellini@kernel.org>
Tue, 8 Jan 2019 18:47:19 +0000 (10:47 -0800)
commit1292f9a05943d32ef96eabb9f0c30cf681665c46
treefd65640b3358791e3db3f8fb22842de4d43d761b
parent525ef6584f85222d34b24f8043fd2760da49995d
xen/iommu: fix dev assignment on ARM after 91d4eca7

Fix device assignment on ARM after 91d4eca7 "mm / iommu: split
need_iommu() into has_iommu_pt() and need_iommu_pt_sync()".

arch_iommu_populate_page_table returns -ENOSYS which causes
iommu_construct to return early, although it is not an error.

hd->status needs to be set to IOMMU_STATUS_initializing before calling
iommu_use_hap_pt, otherwise iommu_use_hap_pt will return the wrong
value.

Signed-off-by: Stefano Stabellini <stefanos@xilinx.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/drivers/passthrough/iommu.c