aboutsummaryrefslogtreecommitdiff
path: root/drivers/lguest/hypercalls.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2015-02-11 15:15:09 +1030
committerRusty Russell <rusty@rustcorp.com.au>2015-02-11 16:47:30 +1030
commit69a09dc1742ffbb3b02f3a1e03da4801e96452e9 (patch)
treec9887c6b6150810ba103b76cf9d4376af3edd5e5 /drivers/lguest/hypercalls.c
parent18c137371b2ea86d263b75665a4904a0b8872990 (diff)
lguest: write more information to userspace about pending traps.
This is preparation for userspace handling MMIO and ioport accesses. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/lguest/hypercalls.c')
-rw-r--r--drivers/lguest/hypercalls.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/lguest/hypercalls.c b/drivers/lguest/hypercalls.c
index 83511eb0923d..5dd1fb8a6610 100644
--- a/drivers/lguest/hypercalls.c
+++ b/drivers/lguest/hypercalls.c
@@ -118,7 +118,8 @@ static void do_hcall(struct lg_cpu *cpu, struct hcall_args *args)
cpu->halted = 1;
break;
case LHCALL_NOTIFY:
- cpu->pending_notify = args->arg1;
+ cpu->pending.trap = LGUEST_TRAP_ENTRY;
+ cpu->pending.addr = args->arg1;
break;
default:
/* It should be an architecture-specific hypercall. */
@@ -189,7 +190,7 @@ static void do_async_hcalls(struct lg_cpu *cpu)
* Stop doing hypercalls if they want to notify the Launcher:
* it needs to service this first.
*/
- if (cpu->pending_notify)
+ if (cpu->pending.trap)
break;
}
}
@@ -280,7 +281,7 @@ void do_hypercalls(struct lg_cpu *cpu)
* NOTIFY to the Launcher, we want to return now. Otherwise we do
* the hypercall.
*/
- if (!cpu->pending_notify) {
+ if (!cpu->pending.trap) {
do_hcall(cpu, cpu->hcall);
/*
* Tricky point: we reset the hcall pointer to mark the