]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S HV: Use __gfn_to_pfn_memslot in HPT page fault handler
authorPaul Mackerras <paulus@ozlabs.org>
Mon, 26 Aug 2019 06:20:47 +0000 (16:20 +1000)
committerPaul Mackerras <paulus@ozlabs.org>
Thu, 19 Mar 2020 05:39:52 +0000 (16:39 +1100)
commit2e7512d6b58217233638e5b72f2d4bb9e599e29f
treea6478bebe2aa750d63cb18df69efc92a34b5f367
parent237e2ba4e6735c33060bfb18a181f7dfb64c9aec
KVM: PPC: Book3S HV: Use __gfn_to_pfn_memslot in HPT page fault handler

This makes the same changes in the page fault handler for HPT guests
that commits f8e39e49d67c ("KVM: PPC: Book3S HV: Use __gfn_to_pfn_memslot()
in page fault handler", 2018-03-01), af8c96cf2b63 ("KVM: PPC: Book3S HV:
Don't use compound_order to determine host mapping size", 2018-09-11)
and 54d1a419b819 ("KVM: PPC: Book3S HV: Avoid crash from THP collapse
during radix page fault", 2018-10-04) made for the page fault handler
for radix guests.

In summary, where we used to call get_user_pages_fast() and then do
special handling for VM_PFNMAP vmas, we now call __get_user_pages_fast()
and then __gfn_to_pfn_memslot() if that fails, followed by reading the
Linux PTE to get the host PFN, host page size and mapping attributes.

This also brings in the change from SetPageDirty() to set_page_dirty_lock()
which was done for the radix page fault handler in commit 728f4ad09d47
("KVM: PPC: Book3S HV: Fix handling of large pages in radix page fault
handler", 2018-02-23).

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/book3s_64_mmu_hv.c