diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2015-02-11 07:45:09 +0300 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2015-02-11 09:17:30 +0300 |
commit | 69a09dc1742ffbb3b02f3a1e03da4801e96452e9 (patch) | |
tree | c9887c6b6150810ba103b76cf9d4376af3edd5e5 /drivers/lguest/core.c | |
parent | 18c137371b2ea86d263b75665a4904a0b8872990 (diff) | |
download | linux-69a09dc1742ffbb3b02f3a1e03da4801e96452e9.tar.xz |
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.c | 7 |
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); } } |