From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [RFC PATCH 10/13] xen: arm: implement platform hypercall Date: Tue, 07 Oct 2014 16:39:41 +0100 Message-ID: <5434093D.4010309@linaro.org> References: <1412691566-7320-1-git-send-email-oleksandr.dmytryshyn@globallogic.com> <1412691566-7320-11-git-send-email-oleksandr.dmytryshyn@globallogic.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1412691566-7320-11-git-send-email-oleksandr.dmytryshyn@globallogic.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: Oleksandr Dmytryshyn , Ian Campbell , Stefano Stabellini , Tim Deegan , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Hi Oleksandr, On 10/07/2014 03:19 PM, Oleksandr Dmytryshyn wrote: > +ret_t do_platform_op(XEN_GUEST_HANDLE_PARAM(xen_platform_op_t) u_xenpf_op) > +{ > + ret_t ret = 0; > + struct xen_platform_op curop, *op = &curop; > + > + if ( copy_from_guest(op, u_xenpf_op, 1) ) > + return -EFAULT; > + > + if ( op->interface_version != XENPF_INTERFACE_VERSION ) > + return -EACCES; Why did you drop the XSM check here? Overall, the skeleton of this function is very similar to the x86. I would move the common part in xen/common and add arch implementation when it's necessary. You can give a look to do_domctl and arch_do_domctl. Regards, -- Julien Grall