From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [RFC 13/19] xen/iommu: arm: Wire iommu DOMCTL for ARM Date: Tue, 17 Jun 2014 14:05:27 +0100 Message-ID: <53A03D17.7070406@linaro.org> References: <1402935486-29136-1-git-send-email-julien.grall@linaro.org> <1402935486-29136-14-git-send-email-julien.grall@linaro.org> <53A01744020000780001AE18@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" 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 1Wwt4t-0006dv-KW for xen-devel@lists.xenproject.org; Tue, 17 Jun 2014 13:05:31 +0000 Received: by mail-wi0-f171.google.com with SMTP id n15so5797028wiw.16 for ; Tue, 17 Jun 2014 06:05:29 -0700 (PDT) In-Reply-To: <53A01744020000780001AE18@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 Cc: xen-devel@lists.xenproject.org, Keir Fraser , stefano.stabellini@citrix.com, ian.campbell@citrix.com, tim@xen.org List-Id: xen-devel@lists.xenproject.org Hi Jan, On 06/17/2014 09:24 AM, Jan Beulich wrote: >>>> On 16.06.14 at 18:18, wrote: >> --- a/xen/arch/x86/domctl.c >> +++ b/xen/arch/x86/domctl.c >> @@ -1320,7 +1320,7 @@ long arch_do_domctl( >> break; >> >> default: >> - ret = iommu_do_domctl(domctl, d, u_domctl); >> + ret = -ENOSYS; >> break; >> } >> >> diff --git a/xen/common/domctl.c b/xen/common/domctl.c >> index 5d3ac87..85866b7 100644 >> --- a/xen/common/domctl.c >> +++ b/xen/common/domctl.c >> @@ -1028,6 +1028,10 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl) >> >> default: >> ret = arch_do_domctl(op, d, u_domctl); >> +#ifdef HAS_PASSTHROUGH >> + if ( ret == -ENOSYS ) >> + ret = iommu_do_domctl(op, d, u_domctl); >> +#endif >> break; >> } >> > > To be honest I'm not convinced of this approach. I'd prefer ARM's > arch_do_domctl() to invoke iommu_do_domctl() just like x86's does. > In particular I'm neither in favor of checking for specific error codes > before chaining, nor do I think that - despite there being a number > of such cases in the tree - ENOSYS is the right error value for not > implemented sub-hypercalls (to me only top level hypercalls may > produce this). Ok. I will add the iommu_do_domctl call directh in arch_do_domctl. Regards, -- Julien Grall