[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH ARM v5 11/20] mini-os: added HYPERVISOR_xsm_op



Thomas Leonard, le Thu 26 Jun 2014 12:28:28 +0100, a écrit :
> Avoids using _hypercall1 in events.c.
> 
> Signed-off-by: Thomas Leonard <talex5@xxxxxxxxx>

Acked-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>

> ---
>  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 = FLASK_GET_PEER_SID;
>      op.interface_version = XEN_FLASK_INTERFACE_VERSION;
>      op.u.peersid.evtchn = local_port;
> -    rc = _hypercall1(int, xsm_op, &op);
> +    rc = HYPERVISOR_xsm_op(&op);
>      if (rc)
>          return rc;
>      sid = 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 = sid;
>      op.u.sid_context.size = size;
>      set_xen_guest_handle(op.u.sid_context.context, ctx);
> -    rc = _hypercall1(int, xsm_op, &op);
> +    rc = 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 <mini-os/types.h>
>  #include <mini-os/hypervisor.h>
>  #include <mini-os/kernel.h>
> +#include <xen/xsm/flask_op.h>
>  
>  #define USED    __attribute__ ((used))
>  
> @@ -563,6 +564,12 @@ static __inline__ int synch_var_test_bit(int nr, 
> volatile 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
<s> T'as pas de portable ?
<m> J'ai un nokia, dans le bassin d'arcachon

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.