From: "Jan Beulich" Subject: Re: [PATCH v3 16/24] xen/passthrough: Introduce iommu_construct Date: Mon, 19 Jan 2015 17:02:46 +0000 Message-ID: <54BD46C60200007800056A6B@mail.emea.novell.com> References: <1421159133-31526-1-git-send-email-julien.grall@linaro.org> <1421159133-31526-17-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 1YDFj1-0002PW-5B for xen-devel@lists.xenproject.org; Mon, 19 Jan 2015 17:02:51 +0000 In-Reply-To: <1421159133-31526-17-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 13.01.15 at 15:25, wrote: > --- a/xen/drivers/passthrough/device_tree.c > +++ b/xen/drivers/passthrough/device_tree.c > @@ -41,6 +41,10 @@ int iommu_assign_dt_device(struct domain *d, struct dt_device_node *dev) > if ( !list_empty(&dev->domain_list) ) > goto fail; > > + rc = iommu_construct(d); > + if ( rc ) > + goto fail; Considering that the only (current) caller of this it domain_build.c I'm afraid you're going to get into trouble if you get back -ERESTART here. Note that on x86 Dom0 setup works via iommu_hwdom_init(), which deals with the preemption needs (at that point in time) by calling process_pending_softirqs() every once in a while. Jan