diff options
author | Glauber de Oliveira Costa <gcosta@redhat.com> | 2008-01-07 08:05:33 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-01-30 06:50:11 -0500 |
commit | fc708b3e407dfd2e12ba9a6cf35bd0bffad1796d (patch) | |
tree | e9a6df9c9b8cf4077c98198c3f5d3bc6dc991c0f /drivers/lguest/lg.h | |
parent | a53a35a8b485b9c16b73e5177bddaa4321971199 (diff) |
lguest: replace lguest_arch with lg_cpu_arch.
The fields found in lguest_arch are not really per-guest,
but per-cpu (gdt, idt, etc). So this patch turns lguest_arch
into lg_cpu_arch.
It makes sense to have a per-guest per-arch struct, but this
can be addressed later, when the need arrives.
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 | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/lguest/lg.h b/drivers/lguest/lg.h index 35b331230c55..d08b85342b92 100644 --- a/drivers/lguest/lg.h +++ b/drivers/lguest/lg.h | |||
@@ -57,6 +57,8 @@ struct lg_cpu { | |||
57 | 57 | ||
58 | /* Pending virtual interrupts */ | 58 | /* Pending virtual interrupts */ |
59 | DECLARE_BITMAP(irqs_pending, LGUEST_IRQS); | 59 | DECLARE_BITMAP(irqs_pending, LGUEST_IRQS); |
60 | |||
61 | struct lg_cpu_arch arch; | ||
60 | }; | 62 | }; |
61 | 63 | ||
62 | /* The private info the thread maintains about the guest. */ | 64 | /* The private info the thread maintains about the guest. */ |
@@ -99,8 +101,6 @@ struct lguest | |||
99 | 101 | ||
100 | /* Dead? */ | 102 | /* Dead? */ |
101 | const char *dead; | 103 | const char *dead; |
102 | |||
103 | struct lguest_arch arch; | ||
104 | }; | 104 | }; |
105 | 105 | ||
106 | extern struct mutex lguest_lock; | 106 | extern struct mutex lguest_lock; |
@@ -139,12 +139,13 @@ int run_guest(struct lg_cpu *cpu, unsigned long __user *user); | |||
139 | /* interrupts_and_traps.c: */ | 139 | /* interrupts_and_traps.c: */ |
140 | void maybe_do_interrupt(struct lg_cpu *cpu); | 140 | void maybe_do_interrupt(struct lg_cpu *cpu); |
141 | int deliver_trap(struct lg_cpu *cpu, unsigned int num); | 141 | int deliver_trap(struct lg_cpu *cpu, unsigned int num); |
142 | void load_guest_idt_entry(struct lguest *lg, unsigned int i, u32 low, u32 hi); | 142 | void load_guest_idt_entry(struct lg_cpu *cpu, unsigned int i, |
143 | u32 low, u32 hi); | ||
143 | void guest_set_stack(struct lguest *lg, u32 seg, u32 esp, unsigned int pages); | 144 | void guest_set_stack(struct lguest *lg, u32 seg, u32 esp, unsigned int pages); |
144 | void pin_stack_pages(struct lguest *lg); | 145 | void pin_stack_pages(struct lguest *lg); |
145 | void setup_default_idt_entries(struct lguest_ro_state *state, | 146 | void setup_default_idt_entries(struct lguest_ro_state *state, |
146 | const unsigned long *def); | 147 | const unsigned long *def); |
147 | void copy_traps(const struct lguest *lg, struct desc_struct *idt, | 148 | void copy_traps(const struct lg_cpu *cpu, struct desc_struct *idt, |
148 | const unsigned long *def); | 149 | const unsigned long *def); |
149 | void guest_set_clockevent(struct lg_cpu *cpu, unsigned long delta); | 150 | void guest_set_clockevent(struct lg_cpu *cpu, unsigned long delta); |
150 | void init_clockdev(struct lg_cpu *cpu); | 151 | void init_clockdev(struct lg_cpu *cpu); |
@@ -154,11 +155,11 @@ void free_interrupts(void); | |||
154 | 155 | ||
155 | /* segments.c: */ | 156 | /* segments.c: */ |
156 | void setup_default_gdt_entries(struct lguest_ro_state *state); | 157 | void setup_default_gdt_entries(struct lguest_ro_state *state); |
157 | void setup_guest_gdt(struct lguest *lg); | 158 | void setup_guest_gdt(struct lg_cpu *cpu); |
158 | void load_guest_gdt(struct lguest *lg, unsigned long table, u32 num); | 159 | void load_guest_gdt(struct lg_cpu *cpu, unsigned long table, u32 num); |
159 | void guest_load_tls(struct lguest *lg, unsigned long tls_array); | 160 | void guest_load_tls(struct lg_cpu *cpu, unsigned long tls_array); |
160 | void copy_gdt(const struct lguest *lg, struct desc_struct *gdt); | 161 | void copy_gdt(const struct lg_cpu *cpu, struct desc_struct *gdt); |
161 | void copy_gdt_tls(const struct lguest *lg, struct desc_struct *gdt); | 162 | void copy_gdt_tls(const struct lg_cpu *cpu, struct desc_struct *gdt); |
162 | 163 | ||
163 | /* page_tables.c: */ | 164 | /* page_tables.c: */ |
164 | int init_guest_pagetable(struct lguest *lg, unsigned long pgtable); | 165 | int init_guest_pagetable(struct lguest *lg, unsigned long pgtable); |