diff options
-rw-r--r-- | arch/x86/lguest/boot.c | 2 | ||||
-rw-r--r-- | drivers/lguest/page_tables.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c index 9c27c104d83c..a104c532ff70 100644 --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c | |||
@@ -480,7 +480,7 @@ static void lguest_set_pmd(pmd_t *pmdp, pmd_t pmdval) | |||
480 | { | 480 | { |
481 | *pmdp = pmdval; | 481 | *pmdp = pmdval; |
482 | lazy_hcall(LHCALL_SET_PMD, __pa(pmdp)&PAGE_MASK, | 482 | lazy_hcall(LHCALL_SET_PMD, __pa(pmdp)&PAGE_MASK, |
483 | (__pa(pmdp)&(PAGE_SIZE-1)), 0); | 483 | (__pa(pmdp)&(PAGE_SIZE-1))/4, 0); |
484 | } | 484 | } |
485 | 485 | ||
486 | /* There are a couple of legacy places where the kernel sets a PTE, but we | 486 | /* There are a couple of legacy places where the kernel sets a PTE, but we |
diff --git a/drivers/lguest/page_tables.c b/drivers/lguest/page_tables.c index 275f23c2deb4..a7f64a9d67e0 100644 --- a/drivers/lguest/page_tables.c +++ b/drivers/lguest/page_tables.c | |||
@@ -391,7 +391,7 @@ static unsigned int find_pgdir(struct lguest *lg, unsigned long pgtable) | |||
391 | { | 391 | { |
392 | unsigned int i; | 392 | unsigned int i; |
393 | for (i = 0; i < ARRAY_SIZE(lg->pgdirs); i++) | 393 | for (i = 0; i < ARRAY_SIZE(lg->pgdirs); i++) |
394 | if (lg->pgdirs[i].gpgdir == pgtable) | 394 | if (lg->pgdirs[i].pgdir && lg->pgdirs[i].gpgdir == pgtable) |
395 | break; | 395 | break; |
396 | return i; | 396 | return i; |
397 | } | 397 | } |