From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v3 20/24] xen/passthrough: Extend XEN_DOMCTL_assign_device to support DT device Date: Wed, 11 Mar 2015 14:11:18 +0000 Message-ID: <55004D06.5090701@linaro.org> References: <1421159133-31526-1-git-send-email-julien.grall@linaro.org> <1421159133-31526-21-git-send-email-julien.grall@linaro.org> <1424452643.30924.368.camel@citrix.com> <54FF1CF6.5030702@linaro.org> <1426077434.21353.237.camel@citrix.com> <55004819.8090401@linaro.org> <1426082154.21353.246.camel@citrix.com> <550059300200007800068907@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" 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 1YVhM2-00071g-Oe for xen-devel@lists.xenproject.org; Wed, 11 Mar 2015 14:11:22 +0000 Received: by wggx13 with SMTP id x13so9476094wgg.12 for ; Wed, 11 Mar 2015 07:11:20 -0700 (PDT) In-Reply-To: <550059300200007800068907@mail.emea.novell.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: Jan Beulich , Ian Campbell Cc: Wei Liu , Ian Jackson , tim@xen.org, stefano.stabellini@citrix.com, xen-devel@lists.xenproject.org, Daniel De Graaf List-Id: xen-devel@lists.xenproject.org Hi Jan, On 11/03/2015 14:03, Jan Beulich wrote: >>>> On 11.03.15 at 14:55, wrote: >> On Wed, 2015-03-11 at 13:50 +0000, Julien Grall wrote: >>> Hmmm I think I got you point now. Do you mean have something like: >> >> That's one option I'd be happy with, yes. Jan might disagree. > > Looks quite reasonable to except for ... > >>> switch (domctl->u.assign_device.dev) >>> { >>> #ifdef HAS_PCI >>> case XEN_DOMCTL_DEV_PCI: >>> ret = iommu_do_pci_domctl(); >>> break; >>> #endif >>> #ifdef HAS_DEVICE_TREE >>> case XEN_DOMCTL_DEV_DT: >>> ret = iommu_do_dt_domctl() >>> break; >>> #endif >>> >>> default: >>> ret = -ENOSYS; > > ... the -ENOSYS here: We commonly use e.g. -EOPNOTSUPP in > such situations. Ok I will use it. Regards, -- Julien Grall