From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v2] xen/passthrough: Support a single iommu_domain per xen domain per SMMU Date: Tue, 24 Mar 2015 15:19:17 +0000 Message-ID: <55118075.80404@linaro.org> References: <1427118384-7312-1-git-send-email-robert.vanvossen@dornerworks.com> <55108B3C.2030708@linaro.org> <55117DCF.9070504@dornerworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YaQbw-0003hS-Lb for xen-devel@lists.xenproject.org; Tue, 24 Mar 2015 15:19:20 +0000 Received: by wgra20 with SMTP id a20so173832344wgr.3 for ; Tue, 24 Mar 2015 08:19:19 -0700 (PDT) In-Reply-To: <55117DCF.9070504@dornerworks.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Robert VanVossen , xen-devel@lists.xenproject.org Cc: julien.grall@citrix.com, edgar.iglesias@xilinx.com, Josh.Whitehead@dornerworks.com, Ian.Campbell@citrix.com, Stefano.Stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On 24/03/2015 15:07, Robert VanVossen wrote: > Hello Julien, Hello Robert, > On 3/23/2015 5:53 PM, Julien Grall wrote: > But don't we need to handle the failure of attach_dev differently based on which > fails? If the attach_dev fails on a new iommu_domain, then the iommu_domain > should be destroyed. If it fails on a preexisting iommu_domain that is already > attached to another device, then you don't want to destroy the iommu_domain. It should be covered by if (failed && atomic == 0) destroy iommu_domain. If you prefer to keep the 2 possible case separate, I would still like to have a separate helper to get the domain. Regards, -- Julien Grall