diff options
author | Glauber de Oliveira Costa <gcosta@redhat.com> | 2008-01-07 08:05:27 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-01-30 06:50:08 -0500 |
commit | 73044f05a4ac65f2df42753e9566444b9d2a660f (patch) | |
tree | 80a3e1d1bda31a769554a8c51f8c189ccec0b9f8 /drivers/lguest/lg.h | |
parent | 7ea07a1500f05e06ebf0136763c781244f77a2a1 (diff) |
lguest: make hypercalls use the vcpu struct
this patch changes do_hcall() and do_async_hcall() interfaces (and obviously their
callers) to get a vcpu struct. Again, a vcpu services the hypercall, not the whole
guest
Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/lguest/lg.h')
-rw-r--r-- | drivers/lguest/lg.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/lguest/lg.h b/drivers/lguest/lg.h index bfca2716ad11..a4ebd415fa27 100644 --- a/drivers/lguest/lg.h +++ b/drivers/lguest/lg.h | |||
@@ -43,6 +43,10 @@ struct lguest; | |||
43 | struct lg_cpu { | 43 | struct lg_cpu { |
44 | unsigned int id; | 44 | unsigned int id; |
45 | struct lguest *lg; | 45 | struct lguest *lg; |
46 | |||
47 | /* If a hypercall was asked for, this points to the arguments. */ | ||
48 | struct hcall_args *hcall; | ||
49 | u32 next_hcall; | ||
46 | }; | 50 | }; |
47 | 51 | ||
48 | /* The private info the thread maintains about the guest. */ | 52 | /* The private info the thread maintains about the guest. */ |
@@ -65,13 +69,9 @@ struct lguest | |||
65 | u32 cr2; | 69 | u32 cr2; |
66 | int halted; | 70 | int halted; |
67 | int ts; | 71 | int ts; |
68 | u32 next_hcall; | ||
69 | u32 esp1; | 72 | u32 esp1; |
70 | u8 ss1; | 73 | u8 ss1; |
71 | 74 | ||
72 | /* If a hypercall was asked for, this points to the arguments. */ | ||
73 | struct hcall_args *hcall; | ||
74 | |||
75 | /* Do we need to stop what we're doing and return to userspace? */ | 75 | /* Do we need to stop what we're doing and return to userspace? */ |
76 | int break_out; | 76 | int break_out; |
77 | wait_queue_head_t break_wq; | 77 | wait_queue_head_t break_wq; |
@@ -178,9 +178,9 @@ void page_table_guest_data_init(struct lguest *lg); | |||
178 | void lguest_arch_host_init(void); | 178 | void lguest_arch_host_init(void); |
179 | void lguest_arch_host_fini(void); | 179 | void lguest_arch_host_fini(void); |
180 | void lguest_arch_run_guest(struct lg_cpu *cpu); | 180 | void lguest_arch_run_guest(struct lg_cpu *cpu); |
181 | void lguest_arch_handle_trap(struct lguest *lg); | 181 | void lguest_arch_handle_trap(struct lg_cpu *cpu); |
182 | int lguest_arch_init_hypercalls(struct lguest *lg); | 182 | int lguest_arch_init_hypercalls(struct lg_cpu *cpu); |
183 | int lguest_arch_do_hcall(struct lguest *lg, struct hcall_args *args); | 183 | int lguest_arch_do_hcall(struct lg_cpu *cpu, struct hcall_args *args); |
184 | void lguest_arch_setup_regs(struct lguest *lg, unsigned long start); | 184 | void lguest_arch_setup_regs(struct lguest *lg, unsigned long start); |
185 | 185 | ||
186 | /* <arch>/switcher.S: */ | 186 | /* <arch>/switcher.S: */ |
@@ -191,7 +191,7 @@ int lguest_device_init(void); | |||
191 | void lguest_device_remove(void); | 191 | void lguest_device_remove(void); |
192 | 192 | ||
193 | /* hypercalls.c: */ | 193 | /* hypercalls.c: */ |
194 | void do_hypercalls(struct lguest *lg); | 194 | void do_hypercalls(struct lg_cpu *cpu); |
195 | void write_timestamp(struct lguest *lg); | 195 | void write_timestamp(struct lguest *lg); |
196 | 196 | ||
197 | /*L:035 | 197 | /*L:035 |