From: "Jan Beulich" Subject: Re: [PATCH v2 18/21] xen/passthrough: dt: Add new domctl XEN_DOMCTL_assign_dt_device Date: Fri, 01 Aug 2014 10:05:28 +0100 Message-ID: <53DB74780200007800028537@mail.emea.novell.com> References: <1406818852-31856-1-git-send-email-julien.grall@linaro.org> <1406818852-31856-19-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 1XD8mH-0004lw-QA for xen-devel@lists.xenproject.org; Fri, 01 Aug 2014 09:05:29 +0000 In-Reply-To: <1406818852-31856-19-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: ian.campbell@citrix.com, Stefano Stabellini , tim@xen.org, Ian Jackson , stefano.stabellini@citrix.com, xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org >>> On 31.07.14 at 17:00, wrote: > --- a/xen/drivers/passthrough/iommu.c > +++ b/xen/drivers/passthrough/iommu.c > @@ -343,6 +343,13 @@ int iommu_do_domctl( > ret = iommu_do_pci_domctl(domctl, d, u_domctl); > #endif > > + if ( ret != -ENOSYS ) > + return ret; > + > +#ifdef HAS_DEVICE_TREE > + ret = iommu_do_dt_domctl(domctl, d, u_domctl); > +#endif I think the if() (with the condition inverted) should be moved inside the #ifdef. > --- a/xen/include/public/domctl.h > +++ b/xen/include/public/domctl.h > @@ -984,6 +984,14 @@ struct xen_domctl_dtdev_op { > typedef struct xen_domctl_dtdev_op xen_domctl_dtdev_op_t; > DEFINE_XEN_GUEST_HANDLE(xen_domctl_dtdev_op_t); > > +/* Device Tree: Assign a non-PCI device to a guest */ > +struct xen_domctl_assign_dt_device { > + uint32_t size; /* IN: Length of the path */ > + XEN_GUEST_HANDLE_64(char) path; /* IN: path to the device tree node */ Missing padding again? Also, no XSM adjustment needed this time? Jan