]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/kvm/book3s: Use pte_present instead of opencoding _PAGE_PRESENT check
authorAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Tue, 5 May 2020 07:17:26 +0000 (12:47 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 5 May 2020 11:20:16 +0000 (21:20 +1000)
commitecb7da51751b75b75aa3f86963a2969f7b7a3e24
treeff9dcd216973b9e95419951d87ba377ff784ff30
parentf7b5849dde2f4737e937d913e55f8a0f98d5f6cc
powerpc/kvm/book3s: Use pte_present instead of opencoding _PAGE_PRESENT check

This adds _PAGE_PTE check and makes sure we validate the pte value returned via
find_kvm_host_pte.

NOTE: this also considers _PAGE_INVALID to the software valid bit.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200505071729.54912-20-aneesh.kumar@linux.ibm.com
arch/powerpc/include/asm/kvm_book3s_64.h