aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lguest/page_tables.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2009-09-24 00:26:46 -0400
committerRusty Russell <rusty@rustcorp.com.au>2009-09-23 08:56:46 -0400
commitfb100d78c04ff6053047625d0368d0d4b1d9912a (patch)
treebd07302aed54c75cc5c64af2503b29a21014103c /drivers/lguest/page_tables.c
parent4c1ea3dd718a1d93a726cb3e66665ac4170dcccd (diff)
lguest: use PGDIR_SHIFT for PAE code to allow different 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/page_tables.c')
-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,
996 if (copy_to_user(&pgdir[0], &pgd, sizeof(pgd)) != 0) 996 if (copy_to_user(&pgdir[0], &pgd, sizeof(pgd)) != 0)
997 return -EFAULT; 997 return -EFAULT;
998 /* 998 /*
999 * And the third PGD entry (ie. addresses 3G-4G). 999 * And the other PGD entry to make the linear mapping at PAGE_OFFSET
1000 *
1001 * FIXME: This assumes that PAGE_OFFSET for the Guest is 0xC0000000.
1002 */ 1000 */
1003 if (copy_to_user(&pgdir[3], &pgd, sizeof(pgd)) != 0) 1001 if (copy_to_user(&pgdir[KERNEL_PGD_BOUNDARY], &pgd, sizeof(pgd)))
1004 return -EFAULT; 1002 return -EFAULT;
1005#else 1003#else
1006 /* 1004 /*