diff options
author | Glauber de Oliveira Costa <gcosta@redhat.com> | 2008-01-07 08:05:32 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-01-30 06:50:11 -0500 |
commit | a53a35a8b485b9c16b73e5177bddaa4321971199 (patch) | |
tree | 8ed96838cb47d1263f63aba6dd6921b3c811f46c /drivers/lguest/lg.h | |
parent | a3863f68b0d7fe2073c0f4efe534ec87a685c4fa (diff) |
lguest: make registers per-vcpu
This is the most obvious per-vcpu field: registers.
So this patch moves it from struct lguest to struct vcpu,
and patch the places in which they are used, accordingly
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 | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/lguest/lg.h b/drivers/lguest/lg.h index 072d0d4fd0b9..35b331230c55 100644 --- a/drivers/lguest/lg.h +++ b/drivers/lguest/lg.h | |||
@@ -44,6 +44,10 @@ struct lg_cpu { | |||
44 | unsigned int id; | 44 | unsigned int id; |
45 | struct lguest *lg; | 45 | struct lguest *lg; |
46 | 46 | ||
47 | /* At end of a page shared mapped over lguest_pages in guest. */ | ||
48 | unsigned long regs_page; | ||
49 | struct lguest_regs *regs; | ||
50 | |||
47 | /* If a hypercall was asked for, this points to the arguments. */ | 51 | /* If a hypercall was asked for, this points to the arguments. */ |
48 | struct hcall_args *hcall; | 52 | struct hcall_args *hcall; |
49 | u32 next_hcall; | 53 | u32 next_hcall; |
@@ -58,9 +62,6 @@ struct lg_cpu { | |||
58 | /* The private info the thread maintains about the guest. */ | 62 | /* The private info the thread maintains about the guest. */ |
59 | struct lguest | 63 | struct lguest |
60 | { | 64 | { |
61 | /* At end of a page shared mapped over lguest_pages in guest. */ | ||
62 | unsigned long regs_page; | ||
63 | struct lguest_regs *regs; | ||
64 | struct lguest_data __user *lguest_data; | 65 | struct lguest_data __user *lguest_data; |
65 | struct task_struct *tsk; | 66 | struct task_struct *tsk; |
66 | struct mm_struct *mm; /* == tsk->mm, but that becomes NULL on exit */ | 67 | struct mm_struct *mm; /* == tsk->mm, but that becomes NULL on exit */ |
@@ -181,7 +182,7 @@ void lguest_arch_run_guest(struct lg_cpu *cpu); | |||
181 | void lguest_arch_handle_trap(struct lg_cpu *cpu); | 182 | void lguest_arch_handle_trap(struct lg_cpu *cpu); |
182 | int lguest_arch_init_hypercalls(struct lg_cpu *cpu); | 183 | int lguest_arch_init_hypercalls(struct lg_cpu *cpu); |
183 | int lguest_arch_do_hcall(struct lg_cpu *cpu, struct hcall_args *args); | 184 | 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); | 185 | void lguest_arch_setup_regs(struct lg_cpu *cpu, unsigned long start); |
185 | 186 | ||
186 | /* <arch>/switcher.S: */ | 187 | /* <arch>/switcher.S: */ |
187 | extern char start_switcher_text[], end_switcher_text[], switch_to_guest[]; | 188 | extern char start_switcher_text[], end_switcher_text[], switch_to_guest[]; |