diff options
author | Matias Zabaljauregui <zabaljauregui@gmail.com> | 2009-06-13 00:27:06 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-06-12 08:57:06 -0400 |
commit | 90603d15fa95605d1d08235b73e220d766f04bb0 (patch) | |
tree | 669b5a41ebdb368e578898409d8a48021074746a /arch/x86/lguest | |
parent | ed1dc77810159a733240ba6751c1b31023bf8dd7 (diff) |
lguest: use native_set_* macros, which properly handle 64-bit entries when PAE is activated
Some cleanups and replace direct assignment with native_set_* macros which properly handle 64-bit entries when PAE is activated
Signed-off-by: Matias Zabaljauregui <zabaljauregui@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'arch/x86/lguest')
-rw-r--r-- | arch/x86/lguest/boot.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c index 514f4d0d2bfa..4f311e40d0aa 100644 --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c | |||
@@ -525,7 +525,7 @@ static void lguest_pte_update(struct mm_struct *mm, unsigned long addr, | |||
525 | static void lguest_set_pte_at(struct mm_struct *mm, unsigned long addr, | 525 | static void lguest_set_pte_at(struct mm_struct *mm, unsigned long addr, |
526 | pte_t *ptep, pte_t pteval) | 526 | pte_t *ptep, pte_t pteval) |
527 | { | 527 | { |
528 | *ptep = pteval; | 528 | native_set_pte(ptep, pteval); |
529 | lguest_pte_update(mm, addr, ptep); | 529 | lguest_pte_update(mm, addr, ptep); |
530 | } | 530 | } |
531 | 531 | ||
@@ -534,9 +534,9 @@ static void lguest_set_pte_at(struct mm_struct *mm, unsigned long addr, | |||
534 | * changed. */ | 534 | * changed. */ |
535 | static void lguest_set_pmd(pmd_t *pmdp, pmd_t pmdval) | 535 | static void lguest_set_pmd(pmd_t *pmdp, pmd_t pmdval) |
536 | { | 536 | { |
537 | *pmdp = pmdval; | 537 | native_set_pmd(pmdp, pmdval); |
538 | lazy_hcall2(LHCALL_SET_PMD, __pa(pmdp) & PAGE_MASK, | 538 | lazy_hcall2(LHCALL_SET_PMD, __pa(pmdp) & PAGE_MASK, |
539 | (__pa(pmdp) & (PAGE_SIZE - 1)) / 4); | 539 | (__pa(pmdp) & (PAGE_SIZE - 1)) / sizeof(pmd_t)); |
540 | } | 540 | } |
541 | 541 | ||
542 | /* There are a couple of legacy places where the kernel sets a PTE, but we | 542 | /* There are a couple of legacy places where the kernel sets a PTE, but we |
@@ -550,7 +550,7 @@ static void lguest_set_pmd(pmd_t *pmdp, pmd_t pmdval) | |||
550 | * which brings boot back to 0.25 seconds. */ | 550 | * which brings boot back to 0.25 seconds. */ |
551 | static void lguest_set_pte(pte_t *ptep, pte_t pteval) | 551 | static void lguest_set_pte(pte_t *ptep, pte_t pteval) |
552 | { | 552 | { |
553 | *ptep = pteval; | 553 | native_set_pte(ptep, pteval); |
554 | if (cr3_changed) | 554 | if (cr3_changed) |
555 | lazy_hcall1(LHCALL_FLUSH_TLB, 1); | 555 | lazy_hcall1(LHCALL_FLUSH_TLB, 1); |
556 | } | 556 | } |