]> xenbits.xensource.com Git - xen.git/commit
AMD IOMMU: don't free page table prematurely
authorJan Beulich <jbeulich@suse.com>
Wed, 28 May 2014 07:50:33 +0000 (09:50 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 28 May 2014 07:50:33 +0000 (09:50 +0200)
commit6b4d71d028f445cba7426a144751fddc8bfdd67b
tree35862fffdf9f93bd6bb2074647e8b6b4c0fd13ca
parentaf06d66ee32b6298f326b130664bfe066fbc1d89
AMD IOMMU: don't free page table prematurely

iommu_merge_pages() still wants to look at the next level page table,
the TLB flush necessary before freeing too happens in that function,
and if it fails no free should happen at all. Hence the freeing must
be done after that function returned successfully, not before it's
being called.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Tested-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
xen/drivers/passthrough/amd/iommu_map.c