K 10 svn:author V 4 neel K 8 svn:date V 27 2013-09-18T03:51:49.539627Z K 7 svn:log V 613 Destroy the iommu domain in vm_destroy() in preference to doing it when the last passthru device is detached from the virtual machine. There are code paths in vm_assign_pptdev() where we can return after creating the iommu domain but before the first passthru device is successfully attached. In this case there aren't any passthru devices attached to the virtual machine and therefore vm_unassign_pptdev() will not be called and the iommu domain is not destroyed. This is very easy to reproduce by trying to attach a non-existent passthru device to the virtual machine and then destroying the virtual machine. END