All of lore.kernel.org
 help / color / mirror / Atom feed
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: Thomas Leonard <talex5@gmail.com>
Cc: xen-devel@lists.xenproject.org, anil@recoil.org,
	Dave.Scott@eu.citrix.com, stefano.stabellini@eu.citrix.com
Subject: Re: [PATCH ARM v5 11/20] mini-os: added HYPERVISOR_xsm_op
Date: Thu, 26 Jun 2014 13:38:24 +0200	[thread overview]
Message-ID: <20140626113824.GE29700@type.bordeaux.inria.fr> (raw)
In-Reply-To: <1403782117-15125-12-git-send-email-talex5@gmail.com>

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@gmail.com>

Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

> ---
>  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

  reply	other threads:[~2014-06-26 11:38 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-26 11:28 [PATCH ARM v5 00/20] mini-os: initial ARM support Thomas Leonard
2014-06-26 11:28 ` [PATCH ARM v5 01/20] mini-os: build fixes Thomas Leonard
2014-06-26 11:28 ` [PATCH ARM v5 02/20] mini-os: fixed shutdown thread Thomas Leonard
2014-06-26 11:28 ` [PATCH ARM v5 03/20] mini-os: fixed format string error in unbind_evtchn Thomas Leonard
2014-06-26 11:28 ` [PATCH ARM v5 04/20] mini-os: use unbind_evtchn in unbind_all_ports Thomas Leonard
2014-06-26 11:28 ` [PATCH ARM v5 05/20] mini-os: made off_t type signed Thomas Leonard
2014-06-26 11:28 ` [PATCH ARM v5 06/20] mini-os: switched initial C entry point to arch_init Thomas Leonard
2014-06-26 11:28 ` [PATCH ARM v5 07/20] mini-os: whitespace Thomas Leonard
2014-06-26 11:35   ` Samuel Thibault
2014-06-26 11:28 ` [PATCH ARM v5 08/20] mini-os: added arch_init_gnttab Thomas Leonard
2014-06-26 11:36   ` Samuel Thibault
2014-06-26 11:28 ` [PATCH ARM v5 09/20] mini-os: don't require XEN_HAVE_PV_UPCALL_MASK Thomas Leonard
2014-06-26 11:37   ` Samuel Thibault
2014-06-26 11:28 ` [PATCH ARM v5 10/20] mini-os: add missing casts to MM printk Thomas Leonard
2014-06-26 11:37   ` Samuel Thibault
2014-06-26 11:28 ` [PATCH ARM v5 11/20] mini-os: added HYPERVISOR_xsm_op Thomas Leonard
2014-06-26 11:38   ` Samuel Thibault [this message]
2014-06-27 13:13     ` Ian Campbell
2014-06-27 13:56       ` Thomas Leonard
2014-06-27 15:43         ` Thomas Leonard
2014-06-27 15:50           ` Samuel Thibault
2014-06-27 16:47         ` Ian Campbell
2014-06-26 11:28 ` [PATCH ARM v5 12/20] mini-os: added arch_unbind_ports Thomas Leonard
2014-06-26 11:38   ` Samuel Thibault
2014-06-26 11:28 ` [PATCH ARM v5 13/20] mini-os: moved __pte to x86 Thomas Leonard
2014-06-26 11:39   ` Samuel Thibault
2014-06-26 11:28 ` [PATCH ARM v5 14/20] mini-os: moved unlikely/likely macros to new compiler.h Thomas Leonard
2014-06-26 11:40   ` Samuel Thibault
2014-06-26 11:28 ` [PATCH ARM v5 15/20] mini-os: enable test_xenbus again Thomas Leonard
2014-06-26 11:40   ` Samuel Thibault
2014-06-27 11:05   ` Ian Campbell
2014-06-27 12:48     ` Thomas Leonard
2014-06-27 12:54       ` Ian Campbell
2014-06-26 11:28 ` [PATCH ARM v5 16/20] mini-os: use irqs_disabled() helper in schedule Thomas Leonard
2014-06-26 11:42   ` Samuel Thibault
2014-06-26 11:28 ` [PATCH ARM v5 17/20] mini-os: headers for ARM Thomas Leonard
2014-06-26 16:26   ` Julien Grall
2014-06-27 13:02     ` Thomas Leonard
2014-06-27 13:11       ` Ian Campbell
2014-06-26 11:28 ` [PATCH ARM v5 18/20] mini-os: import libfdt Thomas Leonard
2014-06-28 12:01   ` Julien Grall
2014-06-28 12:27     ` Thomas Leonard
2014-06-28 15:14       ` Julien Grall
2014-06-28 16:35         ` Anil Madhavapeddy
2014-06-28 16:45           ` Julien Grall
2014-06-26 11:28 ` [PATCH ARM v5 19/20] mini-os: initial ARM support Thomas Leonard
2014-06-28 18:31   ` Julien Grall
2014-06-30 19:12     ` Thomas Leonard
2014-06-30 21:08       ` Julien Grall
2014-07-02  8:41         ` Ian Campbell
2014-07-02  8:23       ` Ian Campbell
2014-07-02  9:22         ` karim.allah.ahmed
2014-06-26 11:28 ` [PATCH ARM v5 20/20] mini-os: arm: show registers, stack and exception vector on fault Thomas Leonard
2014-06-27 13:34 ` [PATCH ARM v5 00/20] mini-os: initial ARM support Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140626113824.GE29700@type.bordeaux.inria.fr \
    --to=samuel.thibault@ens-lyon.org \
    --cc=Dave.Scott@eu.citrix.com \
    --cc=anil@recoil.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=talex5@gmail.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.