aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lguest/lg.h
diff options
context:
space:
mode:
authorGlauber de Oliveira Costa <gcosta@redhat.com>2008-01-07 08:05:37 -0500
committerRusty Russell <rusty@rustcorp.com.au>2008-01-30 06:50:14 -0500
commit1713608f280002d9ffc6de89d7de5cf367072d63 (patch)
tree332e7bdbe7ccccad408b309a4dd00b706b04082f /drivers/lguest/lg.h
parent5e232f4f428c4266ba5cdae9f23ba19a0913dcf9 (diff)
lguest: per-vcpu lguest pgdir management
this patch makes the pgdir management per-vcpu. The pgdirs pool is still guest-wide (although it'll probably need to grow when we are really executing more vcpus), but the pgdidx index is gone, since it makes no sense anymore. Instead, we use a per-vcpu index. 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.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/lguest/lg.h b/drivers/lguest/lg.h
index 95b473cdd0e0..94e518da9aa8 100644
--- a/drivers/lguest/lg.h
+++ b/drivers/lguest/lg.h
@@ -57,6 +57,8 @@ struct lg_cpu {
57 unsigned long regs_page; 57 unsigned long regs_page;
58 struct lguest_regs *regs; 58 struct lguest_regs *regs;
59 59
60 int cpu_pgd; /* which pgd this cpu is currently using */
61
60 /* If a hypercall was asked for, this points to the arguments. */ 62 /* If a hypercall was asked for, this points to the arguments. */
61 struct hcall_args *hcall; 63 struct hcall_args *hcall;
62 u32 next_hcall; 64 u32 next_hcall;
@@ -92,8 +94,6 @@ struct lguest
92 int changed; 94 int changed;
93 struct lguest_pages *last_pages; 95 struct lguest_pages *last_pages;
94 96
95 /* We keep a small number of these. */
96 u32 pgdidx;
97 struct pgdir pgdirs[4]; 97 struct pgdir pgdirs[4];
98 98
99 unsigned long noirq_start, noirq_end; 99 unsigned long noirq_start, noirq_end;
@@ -169,13 +169,13 @@ void free_guest_pagetable(struct lguest *lg);
169void guest_new_pagetable(struct lg_cpu *cpu, unsigned long pgtable); 169void guest_new_pagetable(struct lg_cpu *cpu, unsigned long pgtable);
170void guest_set_pmd(struct lguest *lg, unsigned long gpgdir, u32 i); 170void guest_set_pmd(struct lguest *lg, unsigned long gpgdir, u32 i);
171void guest_pagetable_clear_all(struct lg_cpu *cpu); 171void guest_pagetable_clear_all(struct lg_cpu *cpu);
172void guest_pagetable_flush_user(struct lguest *lg); 172void guest_pagetable_flush_user(struct lg_cpu *cpu);
173void guest_set_pte(struct lguest *lg, unsigned long gpgdir, 173void guest_set_pte(struct lguest *lg, unsigned long gpgdir,
174 unsigned long vaddr, pte_t val); 174 unsigned long vaddr, pte_t val);
175void map_switcher_in_guest(struct lg_cpu *cpu, struct lguest_pages *pages); 175void map_switcher_in_guest(struct lg_cpu *cpu, struct lguest_pages *pages);
176int demand_page(struct lguest *info, unsigned long cr2, int errcode); 176int demand_page(struct lg_cpu *cpu, unsigned long cr2, int errcode);
177void pin_page(struct lguest *lg, unsigned long vaddr); 177void pin_page(struct lg_cpu *cpu, unsigned long vaddr);
178unsigned long guest_pa(struct lguest *lg, unsigned long vaddr); 178unsigned long guest_pa(struct lg_cpu *cpu, unsigned long vaddr);
179void page_table_guest_data_init(struct lguest *lg); 179void page_table_guest_data_init(struct lguest *lg);
180 180
181/* <arch>/core.c: */ 181/* <arch>/core.c: */