mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-22 19:44:21 +01:00
8b6291f727
Signed-off-by: Mario Preksavec <mario@slackware.hr>
31 lines
1 KiB
Diff
31 lines
1 KiB
Diff
From: Oleksandr Tyshchenko <olekstysh@gmail.com>
|
|
Subject: IOMMU: always call teardown callback
|
|
|
|
There is a possible scenario when (d)->need_iommu remains unset
|
|
during guest domain execution. For example, when no devices
|
|
were assigned to it. Taking into account that teardown callback
|
|
is not called when (d)->need_iommu is unset we might have unreleased
|
|
resourses after destroying domain.
|
|
|
|
So, always call teardown callback to roll back actions
|
|
that were performed in init callback.
|
|
|
|
This is XSA-207.
|
|
|
|
Signed-off-by: Oleksandr Tyshchenko <olekstysh@gmail.com>
|
|
Reviewed-by: Jan Beulich <jbeulich@suse.com>
|
|
Tested-by: Jan Beulich <jbeulich@suse.com>
|
|
Tested-by: Julien Grall <julien.grall@arm.com>
|
|
|
|
--- a/xen/drivers/passthrough/iommu.c
|
|
+++ b/xen/drivers/passthrough/iommu.c
|
|
@@ -244,8 +244,7 @@ void iommu_domain_destroy(struct domain
|
|
if ( !iommu_enabled || !dom_iommu(d)->platform_ops )
|
|
return;
|
|
|
|
- if ( need_iommu(d) )
|
|
- iommu_teardown(d);
|
|
+ iommu_teardown(d);
|
|
|
|
arch_iommu_domain_destroy(d);
|
|
}
|