iommu: fix iommu_ops initialization
authorJuergen Gross <jgross@suse.com>
Tue, 12 Feb 2019 10:54:07 +0000 (11:54 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 12 Feb 2019 10:54:07 +0000 (11:54 +0100)
commit88b92c3820cffed4b4abeb139edc2cbd8286cb12
treedc0bbbbca68182e87b664bf091a1927341c4e1a3
parent09fc4de4a8ebb389641b8b8a632efcb7ca880e08
iommu: fix iommu_ops initialization

Commit 32a5ea00ec75ef53e ("IOMMU/x86: remove indirection from certain
IOMMU hook accesses") introduced iommu_ops initialized at boot time
with data declared as __initconstrel.

On Intel systems there is another path where iommu_ops is initialized
and this path is relevant on resume after returning from system suspend.
As the initialization data is no longer accessible in this case that
second initialization must be dropped in case the system isn't just
booting.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
xen/drivers/passthrough/vtd/intremap.c