xen/iommu: fix iommu_ops initialization
PATCH v2 1/1 xen/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.
--- xen/drivers/passthrough/vtd/intremap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
xen/drivers/passthrough/vtd/intremap.c +2 -2
@@ -893,12 +893,12 @@ int iommu_enable_x2apic_IR(void)if ( !platform_supports_x2apic () )return -ENXIO ; + + iommu_ops = intel_iommu_ops; }else if ( !x2apic_enabled )return -EOPNOTSUPP ; - iommu_ops = intel_iommu_ops; -for_each_drhd_unit ( drhd ) { iommu = drhd->iommu;
Signature · 7 lines
2.16.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 11 lines · Juergen Gross
Commit
32a5ea00ec75ef53e("IOMMU/x86: remove indirection from certain IOMMU hook accesses") introducediommu_opsinitialized at boot time with data declared as__initconstrel.On Intel systems there is another path where
iommu_opsis 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 <[email protected]>
And of course:
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 5 lines
Quoted 1 line
Quoted 1 line · On 01.02.19 at 17:29, <[email protected]> wrote:
Commit
32a5ea00ec75ef53e("IOMMU/x86: remove indirection from certain IOMMU hook accesses") introducediommu_opsinitialized at boot time with data declared as__initconstrel.
Quoted 7 lines
On Intel systems there is another path where
iommu_opsis 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 <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 8 lines
From: Juergen Gross [mailto:[email protected]]
Sent: Saturday, February 2, 2019 12:30 AMCommit
32a5ea00ec75ef53e("IOMMU/x86: remove indirection from certain
IOMMU hook accesses") introducediommu_opsinitialized at boot time with data declared as__initconstrel.
Quoted 7 lines
On Intel systems there is another path where
iommu_opsis 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 <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel