From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: [RFC 13/19] xen/iommu: arm: Wire iommu DOMCTL for ARM Date: Mon, 16 Jun 2014 17:18:00 +0100 Message-ID: <1402935486-29136-14-git-send-email-julien.grall@linaro.org> References: <1402935486-29136-1-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.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WwZcB-0006q1-1W for xen-devel@lists.xenproject.org; Mon, 16 Jun 2014 16:18:35 +0000 Received: by mail-wi0-f180.google.com with SMTP id hi2so4386998wib.1 for ; Mon, 16 Jun 2014 09:18:33 -0700 (PDT) In-Reply-To: <1402935486-29136-1-git-send-email-julien.grall@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Keir Fraser , ian.campbell@citrix.com, Julien Grall , tim@xen.org, stefano.stabellini@citrix.com, Jan Beulich List-Id: xen-devel@lists.xenproject.org The call iommu_do_domctl is similar as the x86 one. Move this code to the common code and protected by HAS_PASSTHROUGH. Signed-off-by: Julien Grall Cc: Keir Fraser Cc: Jan Beulich --- xen/arch/x86/domctl.c | 2 +- xen/common/domctl.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c index 437ba11..ffecc15 100644 --- 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; } -- 1.7.10.4