summaryrefslogtreecommitdiffstats
path: root/drivers/lguest/core.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2015-02-11 05:45:09 +0100
committerRusty Russell <rusty@rustcorp.com.au>2015-02-11 07:17:30 +0100
commit69a09dc1742ffbb3b02f3a1e03da4801e96452e9 (patch)
treec9887c6b6150810ba103b76cf9d4376af3edd5e5 /drivers/lguest/core.c
parentlguest: add operations to get/set a register from the Launcher. (diff)
downloadlinux-69a09dc1742ffbb3b02f3a1e03da4801e96452e9.tar.xz
linux-69a09dc1742ffbb3b02f3a1e03da4801e96452e9.zip
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/core.c')
-rw-r--r--drivers/lguest/core.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/lguest/core.c b/drivers/lguest/core.c
index cdb2f9aa5860..9159dbc583f6 100644
--- a/drivers/lguest/core.c
+++ b/drivers/lguest/core.c
@@ -229,16 +229,17 @@ int run_guest(struct lg_cpu *cpu, unsigned long __user *user)
* It's possible the Guest did a NOTIFY hypercall to the
* Launcher.
*/
- if (cpu->pending_notify) {
+ if (cpu->pending.trap) {
/*
* Does it just needs to write to a registered
* eventfd (ie. the appropriate virtqueue thread)?
*/
if (!send_notify_to_eventfd(cpu)) {
/* OK, we tell the main Launcher. */
- if (put_user(cpu->pending_notify, user))
+ if (copy_to_user(user, &cpu->pending,
+ sizeof(cpu->pending)))
return -EFAULT;
- return sizeof(cpu->pending_notify);
+ return sizeof(cpu->pending);
}
}