summaryrefslogtreecommitdiffstats
path: root/drivers/lguest/lg.h
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2015-02-11 15:15:10 +1030
committerRusty Russell <rusty@rustcorp.com.au>2015-02-11 16:47:33 +1030
commit7313d5217e6b9817897172d6a6ff477bdc415ed6 (patch)
tree448fc79d9048af296aeb6c6fbbf5da84dc6f7046 /drivers/lguest/lg.h
parentd1c29465b8a52d8fc5a59aac92c6b206b69fe631 (diff)
downloadop-kernel-dev-7313d5217e6b9817897172d6a6ff477bdc415ed6.zip
op-kernel-dev-7313d5217e6b9817897172d6a6ff477bdc415ed6.tar.gz
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.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/lguest/lg.h b/drivers/lguest/lg.h
index 9da4f35..eb81abc 100644
--- a/drivers/lguest/lg.h
+++ b/drivers/lguest/lg.h
@@ -97,8 +97,12 @@ struct lguest {
struct lg_cpu cpus[NR_CPUS];
unsigned int nr_cpus;
+ /* Valid guest memory pages must be < this. */
u32 pfn_limit;
+ /* Device memory is >= pfn_limit and < device_limit. */
+ u32 device_limit;
+
/*
* This provides the offset to the base of guest-physical memory in the
* Launcher.
@@ -200,7 +204,8 @@ void guest_pagetable_flush_user(struct lg_cpu *cpu);
void guest_set_pte(struct lg_cpu *cpu, unsigned long gpgdir,
unsigned long vaddr, pte_t val);
void map_switcher_in_guest(struct lg_cpu *cpu, struct lguest_pages *pages);
-bool demand_page(struct lg_cpu *cpu, unsigned long cr2, int errcode);
+bool demand_page(struct lg_cpu *cpu, unsigned long cr2, int errcode,
+ unsigned long *iomem);
void pin_page(struct lg_cpu *cpu, unsigned long vaddr);
bool __guest_pa(struct lg_cpu *cpu, unsigned long vaddr, unsigned long *paddr);
unsigned long guest_pa(struct lg_cpu *cpu, unsigned long vaddr);
OpenPOWER on IntegriCloud