From d886a66fffb9f91901895a261beae9dec5cdd8aa Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Fri, 8 Aug 2014 16:47:31 +0100 Subject: [PATCH] mini-os: added HYPERVISOR_xsm_op Avoids using _hypercall1 in events.c. Signed-off-by: Thomas Leonard Acked-by: Samuel Thibault --- events.c | 4 ++-- include/x86/os.h | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/events.c b/events.c index 48742de..2a23042 100644 --- a/events.c +++ b/events.c @@ -245,7 +245,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; @@ -253,7 +253,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/include/x86/os.h b/include/x86/os.h index 192b23c..ee9050b 100644 --- a/include/x86/os.h +++ b/include/x86/os.h @@ -15,6 +15,7 @@ #include #include #include +#include #define USED __attribute__ ((used)) @@ -558,6 +559,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.39.5