Skip to content

Commit

Permalink
lguest: use PGDIR_SHIFT for PAE code to allow different PAGE_OFFSET
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rusty Russell committed Sep 23, 2009
1 parent 4c1ea3d commit fb100d7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/lguest/page_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
/*
Expand Down

0 comments on commit fb100d7

Please sign in to comment.