]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S HV: Fix conversion to gfn-based MMU notifier callbacks
authorNicholas Piggin <npiggin@gmail.com>
Wed, 5 May 2021 12:15:09 +0000 (22:15 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 5 May 2021 14:25:42 +0000 (00:25 +1000)
commit5d1c105b7ef45a0b3d26bda5b5364ffd849dca82
tree2c1898cbe0a30fe1d5064ea7797f781395dc2a7f
parent7130fc063fd8714f1c7faac860d0de44758443e3
KVM: PPC: Book3S HV: Fix conversion to gfn-based MMU notifier callbacks

Commit 8c4f27dbce08 ("KVM: PPC: Convert to the gfn-based MMU notifier
callbacks") causes unmap_gfn_range and age_gfn callbacks to only work
on the first gfn in the range. It also makes the aging callbacks call
into both radix and hash aging functions for radix guests. Fix this.

Add warnings for the single-gfn calls that have been converted to range
callbacks, in case they ever receieve ranges greater than 1.

Fixes: 8c4f27dbce08 ("KVM: PPC: Convert to the gfn-based MMU notifier callbacks")
Reported-by: Bharata B Rao <bharata@linux.ibm.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Tested-by: Bharata B Rao <bharata@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210505121509.1470207-1-npiggin@gmail.com
arch/powerpc/include/asm/kvm_book3s.h
arch/powerpc/kvm/book3s_64_mmu_hv.c
arch/powerpc/kvm/book3s_64_mmu_radix.c