diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2007-10-22 03:03:30 +0200 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2007-10-23 07:49:52 +0200 |
commit | cc6d4fbcef328acdc9fa7023e69f39f753f72fe1 (patch) | |
tree | 860672e7da1a3516e36dd40f962552451ef0bcf2 /drivers/lguest/lg.h | |
parent | Reorder guest saved regs to match hyperall order (diff) | |
download | linux-cc6d4fbcef328acdc9fa7023e69f39f753f72fe1.tar.xz linux-cc6d4fbcef328acdc9fa7023e69f39f753f72fe1.zip |
Introduce "hcall" pointer to indicate pending hypercall.
Currently we look at the "trapnum" to see if the Guest wants a
hypercall. But once the hypercall is done we have to reset trapnum to
a bogus value, otherwise if we exit to userspace and return, we'd run
the same hypercall twice (that was a nasty bug to find!).
This has two main effects:
1) When Jes's patch changes the hypercall args to be a generic "struct
hcall_args" we simply change the type of "lg->hcall". It's set by
arch code, so if it has to copy args or something it can do so, and
point "hcall" into lg->arch somewhere.
2) Async hypercalls only get run when an actual hypercall is pending.
This simplfies the code a little and is a more logical semantic.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/lguest/lg.h')
-rw-r--r-- | drivers/lguest/lg.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/lguest/lg.h b/drivers/lguest/lg.h index 203d3100c3b4..662994b776cc 100644 --- a/drivers/lguest/lg.h +++ b/drivers/lguest/lg.h @@ -106,6 +106,9 @@ struct lguest u32 esp1; u8 ss1; + /* If a hypercall was asked for, this points to the arguments. */ + struct lguest_regs *hcall; + /* Do we need to stop what we're doing and return to userspace? */ int break_out; wait_queue_head_t break_wq; |