]> xenbits.xensource.com Git - xen.git/commit
IOMMU: always call teardown callback
authorOleksandr Tyshchenko <olekstysh@gmail.com>
Wed, 15 Feb 2017 12:20:48 +0000 (12:20 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 15 Feb 2017 12:20:48 +0000 (12:20 +0000)
commitc24629612fea2d44c8f03f0a2583e44dbbfc5e05
tree4bb7aafaf940d997ae21e703d3710eece1eb4900
parent10baa197d218c222f298ac5ba0d4ef5afd1401ff
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>
xen/drivers/passthrough/iommu.c