int xc_flask_op(xc_interface *xch, xen_flask_op_t *op) { int ret = -1; DECLARE_HYPERCALL_BOUNCE(op, sizeof(*op), XC_HYPERCALL_BUFFER_BOUNCE_BOTH); op->interface_version = XEN_FLASK_INTERFACE_VERSION; if ( xc_hypercall_bounce_pre(xch, op) ) { PERROR("Could not bounce memory for flask op hypercall"); goto out; } ret = xencall1(xch->xcall, __HYPERVISOR_xsm_op, HYPERCALL_BUFFER_AS_ARG(op)); if ( ret < 0 ) { if ( errno == EACCES ) fprintf(stderr, "XSM operation failed!\n"); } xc_hypercall_bounce_post(xch, op); out: return ret; }
int xc_mca_op(xc_interface *xch, struct xen_mc *mc) { int ret = 0; DECLARE_HYPERCALL_BOUNCE(mc, sizeof(*mc), XC_HYPERCALL_BUFFER_BOUNCE_BOTH); if ( xc_hypercall_bounce_pre(xch, mc) ) { PERROR("Could not bounce xen_mc memory buffer"); return -1; } mc->interface_version = XEN_MCA_INTERFACE_VERSION; ret = xencall1(xch->xcall, __HYPERVISOR_mca, HYPERCALL_BUFFER_AS_ARG(mc)); xc_hypercall_bounce_post(xch, mc); return ret; }
static int do_tmem_op(xc_interface *xch, tmem_op_t *op) { int ret; DECLARE_HYPERCALL_BOUNCE(op, sizeof(*op), XC_HYPERCALL_BUFFER_BOUNCE_BOTH); if ( xc_hypercall_bounce_pre(xch, op) ) { PERROR("Could not bounce buffer for tmem op hypercall"); return -EFAULT; } ret = xencall1(xch->xcall, __HYPERVISOR_tmem_op, HYPERCALL_BUFFER_AS_ARG(op)); if ( ret < 0 ) { if ( errno == EACCES ) DPRINTF("tmem operation failed -- need to" " rebuild the user-space tool set?\n"); } xc_hypercall_bounce_post(xch, op); return ret; }
int HYPERVISOR_fpu_taskswitch(void) { return xencall1(__HYPERVISOR_fpu_taskswitch); }