diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2015-02-10 23:45:10 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2015-02-11 01:17:33 -0500 |
commit | 7313d5217e6b9817897172d6a6ff477bdc415ed6 (patch) | |
tree | 448fc79d9048af296aeb6c6fbbf5da84dc6f7046 /drivers/lguest/lg.h | |
parent | d1c29465b8a52d8fc5a59aac92c6b206b69fe631 (diff) |
lguest: add iomem region, where guest page faults get sent to userspace.
This lets us implement PCI.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/lguest/lg.h')
-rw-r--r-- | drivers/lguest/lg.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/lguest/lg.h b/drivers/lguest/lg.h index 9da4f351e077..eb81abc05995 100644 --- a/drivers/lguest/lg.h +++ b/drivers/lguest/lg.h | |||
@@ -97,8 +97,12 @@ struct lguest { | |||
97 | struct lg_cpu cpus[NR_CPUS]; | 97 | struct lg_cpu cpus[NR_CPUS]; |
98 | unsigned int nr_cpus; | 98 | unsigned int nr_cpus; |
99 | 99 | ||
100 | /* Valid guest memory pages must be < this. */ | ||
100 | u32 pfn_limit; | 101 | u32 pfn_limit; |
101 | 102 | ||
103 | /* Device memory is >= pfn_limit and < device_limit. */ | ||
104 | u32 device_limit; | ||
105 | |||
102 | /* | 106 | /* |
103 | * This provides the offset to the base of guest-physical memory in the | 107 | * This provides the offset to the base of guest-physical memory in the |
104 | * Launcher. | 108 | * Launcher. |
@@ -200,7 +204,8 @@ void guest_pagetable_flush_user(struct lg_cpu *cpu); | |||
200 | void guest_set_pte(struct lg_cpu *cpu, unsigned long gpgdir, | 204 | void guest_set_pte(struct lg_cpu *cpu, unsigned long gpgdir, |
201 | unsigned long vaddr, pte_t val); | 205 | unsigned long vaddr, pte_t val); |
202 | void map_switcher_in_guest(struct lg_cpu *cpu, struct lguest_pages *pages); | 206 | void map_switcher_in_guest(struct lg_cpu *cpu, struct lguest_pages *pages); |
203 | bool demand_page(struct lg_cpu *cpu, unsigned long cr2, int errcode); | 207 | bool demand_page(struct lg_cpu *cpu, unsigned long cr2, int errcode, |
208 | unsigned long *iomem); | ||
204 | void pin_page(struct lg_cpu *cpu, unsigned long vaddr); | 209 | void pin_page(struct lg_cpu *cpu, unsigned long vaddr); |
205 | bool __guest_pa(struct lg_cpu *cpu, unsigned long vaddr, unsigned long *paddr); | 210 | bool __guest_pa(struct lg_cpu *cpu, unsigned long vaddr, unsigned long *paddr); |
206 | unsigned long guest_pa(struct lg_cpu *cpu, unsigned long vaddr); | 211 | unsigned long guest_pa(struct lg_cpu *cpu, unsigned long vaddr); |