From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Thibault Subject: Re: [PATCH ARM v5 11/20] mini-os: added HYPERVISOR_xsm_op Date: Thu, 26 Jun 2014 13:38:24 +0200 Message-ID: <20140626113824.GE29700@type.bordeaux.inria.fr> References: <1403782117-15125-1-git-send-email-talex5@gmail.com> <1403782117-15125-12-git-send-email-talex5@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X080Y-0007pS-HB for xen-devel@lists.xenproject.org; Thu, 26 Jun 2014 11:38:26 +0000 Content-Disposition: inline In-Reply-To: <1403782117-15125-12-git-send-email-talex5@gmail.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: Thomas Leonard Cc: xen-devel@lists.xenproject.org, anil@recoil.org, Dave.Scott@eu.citrix.com, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org Thomas Leonard, le Thu 26 Jun 2014 12:28:28 +0100, a =E9crit : > Avoids using _hypercall1 in events.c. > = > Signed-off-by: Thomas Leonard Acked-by: Samuel Thibault > --- > extras/mini-os/events.c | 4 ++-- > extras/mini-os/include/x86/os.h | 7 +++++++ > 2 files changed, 9 insertions(+), 2 deletions(-) > = > diff --git a/extras/mini-os/events.c b/extras/mini-os/events.c > index 3c92d82..d07dbfb 100644 > --- a/extras/mini-os/events.c > +++ b/extras/mini-os/events.c > @@ -244,7 +244,7 @@ int evtchn_get_peercontext(evtchn_port_t local_port, = char *ctx, int size) > op.cmd =3D FLASK_GET_PEER_SID; > op.interface_version =3D XEN_FLASK_INTERFACE_VERSION; > op.u.peersid.evtchn =3D local_port; > - rc =3D _hypercall1(int, xsm_op, &op); > + rc =3D HYPERVISOR_xsm_op(&op); > if (rc) > return rc; > sid =3D op.u.peersid.sid; > @@ -252,7 +252,7 @@ int evtchn_get_peercontext(evtchn_port_t local_port, = char *ctx, int size) > op.u.sid_context.sid =3D sid; > op.u.sid_context.size =3D size; > set_xen_guest_handle(op.u.sid_context.context, ctx); > - rc =3D _hypercall1(int, xsm_op, &op); > + rc =3D HYPERVISOR_xsm_op(&op); > return rc; > } > = > diff --git a/extras/mini-os/include/x86/os.h b/extras/mini-os/include/x86= /os.h > index 73b8297..9e3f9bf 100644 > --- a/extras/mini-os/include/x86/os.h > +++ b/extras/mini-os/include/x86/os.h > @@ -20,6 +20,7 @@ > #include > #include > #include > +#include > = > #define USED __attribute__ ((used)) > = > @@ -563,6 +564,12 @@ static __inline__ int synch_var_test_bit(int nr, vol= atile void * addr) > synch_const_test_bit((nr),(addr)) : \ > synch_var_test_bit((nr),(addr))) > = > +static inline int > +HYPERVISOR_xsm_op( > + struct xen_flask_op *op) > +{ > + return _hypercall1(int, xsm_op, op); > +} > = > #undef ADDR > = > -- = > 2.0.0 > = -- = Samuel T'as pas de portable ? J'ai un nokia, dans le bassin d'arcachon