From b410e7b1499c49513cab18275db8a8ab549d9e09 Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Mon, 22 Oct 2007 11:03:31 +1000 Subject: Make hypercalls arch-independent. Clean up the hypercall code to make the code in hypercalls.c architecture independent. First process the common hypercalls and then call lguest_arch_do_hcall() if the call hasn't been handled. Rename struct hcall_ring to hcall_args. This patch requires the previous patch which reorganize the layout of struct lguest_regs on i386 so they match the layout of struct hcall_args. Signed-off-by: Jes Sorensen Signed-off-by: Rusty Russell --- drivers/lguest/lg.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/lguest/lg.h') diff --git a/drivers/lguest/lg.h b/drivers/lguest/lg.h index 662994b776cc..00c869bd9f79 100644 --- a/drivers/lguest/lg.h +++ b/drivers/lguest/lg.h @@ -107,7 +107,7 @@ struct lguest u8 ss1; /* If a hypercall was asked for, this points to the arguments. */ - struct lguest_regs *hcall; + struct hcall_args *hcall; /* Do we need to stop what we're doing and return to userspace? */ int break_out; @@ -197,6 +197,8 @@ void lguest_arch_host_init(void); void lguest_arch_host_fini(void); void lguest_arch_run_guest(struct lguest *lg); void lguest_arch_handle_trap(struct lguest *lg); +int lguest_arch_init_hypercalls(struct lguest *lg); +int lguest_arch_do_hcall(struct lguest *lg, struct hcall_args *args); /* /switcher.S: */ extern char start_switcher_text[], end_switcher_text[], switch_to_guest[]; -- cgit v1.2.3