summaryrefslogtreecommitdiff
path: root/drivers/lguest
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2009-08-13 10:26:11 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2009-08-13 10:26:11 +1000
commit73aa68ebe03dedbf91ed973fa240ca418ce6527a (patch)
treee2bd61e1e5094fb34b77d2d5066dac3fecc434dc /drivers/lguest
parent5d00538b6b445caf8bb9968c88aea0485e3d7d8c (diff)
lguest:PAE-dont-assume-PAGE_OFFSET
We still assume the Guest and Host have the same PAGE_OFFSET settings, but now we don't assume 0xC0000000. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Matias Zabaljauregui <zabaljauregui@gmail.com>
Diffstat (limited to 'drivers/lguest')
-rw-r--r--drivers/lguest/page_tables.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/lguest/page_tables.c b/drivers/lguest/page_tables.c
index 232fba6a4882..bf37a31c0e05 100644
--- a/drivers/lguest/page_tables.c
+++ b/drivers/lguest/page_tables.c
@@ -996,11 +996,9 @@ static unsigned long setup_pagetables(struct lguest *lg,
if (copy_to_user(&pgdir[0], &pgd, sizeof(pgd)) != 0)
return -EFAULT;
/*
- * And the third PGD entry (ie. addresses 3G-4G).
- *
- * FIXME: This assumes that PAGE_OFFSET for the Guest is 0xC0000000.
+ * And the other PGD entry to make the linear mapping at PAGE_OFFSET
*/
- if (copy_to_user(&pgdir[3], &pgd, sizeof(pgd)) != 0)
+ if (copy_to_user(&pgdir[KERNEL_PGD_BOUNDARY], &pgd, sizeof(pgd)))
return -EFAULT;
#else
/*