diff options
author | Joerg Roedel <jroedel@suse.de> | 2014-11-12 21:46:09 -0500 |
---|---|---|
committer | Oded Gabbay <oded.gabbay@amd.com> | 2014-11-12 21:46:09 -0500 |
commit | 34ee645e83b60ae3d5955f70ab9ab9a159136673 (patch) | |
tree | 49aa485f580cd9594f89f0b761dd685b2c2981af /mm/hugetlb.c | |
parent | 1897bdc4d33167e9036460631d1349e59d841f2d (diff) |
mmu_notifier: call mmu_notifier_invalidate_range() from VMM
Add calls to the new mmu_notifier_invalidate_range() function to all
places in the VMM that need it.
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Reviewed-by: Andrea Arcangeli <aarcange@redhat.com>
Reviewed-by: Jérôme Glisse <jglisse@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Rik van Riel <riel@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Johannes Weiner <jweiner@redhat.com>
Cc: Jay Cornwall <Jay.Cornwall@amd.com>
Cc: Oded Gabbay <Oded.Gabbay@amd.com>
Cc: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
Diffstat (limited to 'mm/hugetlb.c')
-rw-r--r-- | mm/hugetlb.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 9fd722769927..2e6add04fa1b 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -2598,8 +2598,11 @@ int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src, | |||
2598 | } | 2598 | } |
2599 | set_huge_pte_at(dst, addr, dst_pte, entry); | 2599 | set_huge_pte_at(dst, addr, dst_pte, entry); |
2600 | } else { | 2600 | } else { |
2601 | if (cow) | 2601 | if (cow) { |
2602 | huge_ptep_set_wrprotect(src, addr, src_pte); | 2602 | huge_ptep_set_wrprotect(src, addr, src_pte); |
2603 | mmu_notifier_invalidate_range(src, mmun_start, | ||
2604 | mmun_end); | ||
2605 | } | ||
2603 | entry = huge_ptep_get(src_pte); | 2606 | entry = huge_ptep_get(src_pte); |
2604 | ptepage = pte_page(entry); | 2607 | ptepage = pte_page(entry); |
2605 | get_page(ptepage); | 2608 | get_page(ptepage); |
@@ -2899,6 +2902,7 @@ retry_avoidcopy: | |||
2899 | 2902 | ||
2900 | /* Break COW */ | 2903 | /* Break COW */ |
2901 | huge_ptep_clear_flush(vma, address, ptep); | 2904 | huge_ptep_clear_flush(vma, address, ptep); |
2905 | mmu_notifier_invalidate_range(mm, mmun_start, mmun_end); | ||
2902 | set_huge_pte_at(mm, address, ptep, | 2906 | set_huge_pte_at(mm, address, ptep, |
2903 | make_huge_pte(vma, new_page, 1)); | 2907 | make_huge_pte(vma, new_page, 1)); |
2904 | page_remove_rmap(old_page); | 2908 | page_remove_rmap(old_page); |
@@ -3374,6 +3378,7 @@ unsigned long hugetlb_change_protection(struct vm_area_struct *vma, | |||
3374 | * and that page table be reused and filled with junk. | 3378 | * and that page table be reused and filled with junk. |
3375 | */ | 3379 | */ |
3376 | flush_tlb_range(vma, start, end); | 3380 | flush_tlb_range(vma, start, end); |
3381 | mmu_notifier_invalidate_range(mm, start, end); | ||
3377 | mutex_unlock(&vma->vm_file->f_mapping->i_mmap_mutex); | 3382 | mutex_unlock(&vma->vm_file->f_mapping->i_mmap_mutex); |
3378 | mmu_notifier_invalidate_range_end(mm, start, end); | 3383 | mmu_notifier_invalidate_range_end(mm, start, end); |
3379 | 3384 | ||