From: "Jan Beulich" Subject: Re: [RFC 11/19] xen/passthrough: Call arch_iommu_domain_destroy before calling iommu_teardown Date: Tue, 17 Jun 2014 09:07:50 +0100 Message-ID: <53A01376020000780001AE02@mail.emea.novell.com> References: <1402935486-29136-1-git-send-email-julien.grall@linaro.org> <1402935486-29136-12-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WwoR0-0000S4-GH for xen-devel@lists.xenproject.org; Tue, 17 Jun 2014 08:08:02 +0000 In-Reply-To: <1402935486-29136-12-git-send-email-julien.grall@linaro.org> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: xen-devel@lists.xenproject.org, stefano.stabellini@citrix.com, ian.campbell@citrix.com, tim@xen.org List-Id: xen-devel@lists.xenproject.org >>> On 16.06.14 at 18:17, wrote: > --- a/xen/drivers/passthrough/iommu.c > +++ b/xen/drivers/passthrough/iommu.c > @@ -219,10 +219,10 @@ void iommu_domain_destroy(struct domain *d) > if ( !iommu_enabled || !hd->platform_ops ) > return; > > + arch_iommu_domain_destroy(d); > + > if ( need_iommu(d) ) > iommu_teardown(d); > - > - arch_iommu_domain_destroy(d); At the first glance this doesn't look right, including the explanation you gave (why would devices still be assigned to a guest at this point). And it's rather hard to properly decide with the series here depending on two other series, i.e. there not being a arch_iommu_domain_destroy() at all in current staging. Jan