Skip to content

Commit

Permalink
minios: implement minios_hypercall
Browse files Browse the repository at this point in the history
Signed-off-by: Wei Liu <liuw@liuw.name>
  • Loading branch information
liuw committed Jun 24, 2015
1 parent cd13e77 commit ed7d413
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
19 changes: 19 additions & 0 deletions platform/xen/xen/hypervisor.c
Expand Up @@ -120,3 +120,22 @@ inline void minios_clear_evtchn(uint32_t port)
shared_info_t *s = HYPERVISOR_shared_info;
synch_clear_bit(port, &s->evtchn_pending[0]);
}

int minios_hypercall(unsigned op, unsigned long a0,
unsigned long a1, unsigned long a2,
unsigned long a3, unsigned long a4)
{
multicall_entry_t call;
int ret;

call.op = op;
call.args[0] = a0;
call.args[1] = a1;
call.args[2] = a2;
call.args[3] = a3;
call.args[4] = a4;

ret = HYPERVISOR_multicall(&call, 1);

return ret;
}
3 changes: 3 additions & 0 deletions platform/xen/xen/include/mini-os/hypervisor.h
Expand Up @@ -41,6 +41,9 @@ void minios_do_hypervisor_callback(struct pt_regs *regs);
void minios_mask_evtchn(uint32_t port);
void minios_unmask_evtchn(uint32_t port);
void minios_clear_evtchn(uint32_t port);
int minios_hypercall(unsigned op, unsigned long a0,
unsigned long a1, unsigned long a2,
unsigned long a3, unsigned long a4);

extern int _minios_in_hypervisor_callback;

Expand Down

0 comments on commit ed7d413

Please sign in to comment.