aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lguest/lg.h
diff options
context:
space:
mode:
authorGlauber de Oliveira Costa <gcosta@redhat.com>2008-01-07 08:05:33 -0500
committerRusty Russell <rusty@rustcorp.com.au>2008-01-30 06:50:11 -0500
commitfc708b3e407dfd2e12ba9a6cf35bd0bffad1796d (patch)
treee9a6df9c9b8cf4077c98198c3f5d3bc6dc991c0f /drivers/lguest/lg.h
parenta53a35a8b485b9c16b73e5177bddaa4321971199 (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.h19
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
106extern struct mutex lguest_lock; 106extern 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: */
140void maybe_do_interrupt(struct lg_cpu *cpu); 140void maybe_do_interrupt(struct lg_cpu *cpu);
141int deliver_trap(struct lg_cpu *cpu, unsigned int num); 141int deliver_trap(struct lg_cpu *cpu, unsigned int num);
142void load_guest_idt_entry(struct lguest *lg, unsigned int i, u32 low, u32 hi); 142void load_guest_idt_entry(struct lg_cpu *cpu, unsigned int i,
143 u32 low, u32 hi);
143void guest_set_stack(struct lguest *lg, u32 seg, u32 esp, unsigned int pages); 144void guest_set_stack(struct lguest *lg, u32 seg, u32 esp, unsigned int pages);
144void pin_stack_pages(struct lguest *lg); 145void pin_stack_pages(struct lguest *lg);
145void setup_default_idt_entries(struct lguest_ro_state *state, 146void setup_default_idt_entries(struct lguest_ro_state *state,
146 const unsigned long *def); 147 const unsigned long *def);
147void copy_traps(const struct lguest *lg, struct desc_struct *idt, 148void copy_traps(const struct lg_cpu *cpu, struct desc_struct *idt,
148 const unsigned long *def); 149 const unsigned long *def);
149void guest_set_clockevent(struct lg_cpu *cpu, unsigned long delta); 150void guest_set_clockevent(struct lg_cpu *cpu, unsigned long delta);
150void init_clockdev(struct lg_cpu *cpu); 151void init_clockdev(struct lg_cpu *cpu);
@@ -154,11 +155,11 @@ void free_interrupts(void);
154 155
155/* segments.c: */ 156/* segments.c: */
156void setup_default_gdt_entries(struct lguest_ro_state *state); 157void setup_default_gdt_entries(struct lguest_ro_state *state);
157void setup_guest_gdt(struct lguest *lg); 158void setup_guest_gdt(struct lg_cpu *cpu);
158void load_guest_gdt(struct lguest *lg, unsigned long table, u32 num); 159void load_guest_gdt(struct lg_cpu *cpu, unsigned long table, u32 num);
159void guest_load_tls(struct lguest *lg, unsigned long tls_array); 160void guest_load_tls(struct lg_cpu *cpu, unsigned long tls_array);
160void copy_gdt(const struct lguest *lg, struct desc_struct *gdt); 161void copy_gdt(const struct lg_cpu *cpu, struct desc_struct *gdt);
161void copy_gdt_tls(const struct lguest *lg, struct desc_struct *gdt); 162void copy_gdt_tls(const struct lg_cpu *cpu, struct desc_struct *gdt);
162 163
163/* page_tables.c: */ 164/* page_tables.c: */
164int init_guest_pagetable(struct lguest *lg, unsigned long pgtable); 165int init_guest_pagetable(struct lguest *lg, unsigned long pgtable);