]> 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)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 7 May 2021 10:06:20 +0000 (06:06 -0400)
commit23f378b517269f2e77387f2b0b88e2e846b10905
tree2cabd7ddba32e644df1ee55d783e31125b9b8a40
parentba7e78cc76c0644b91a5c411a03e9ff8e1fafff0
KVM: PPC: Book3S HV: Fix conversion to gfn-based MMU notifier callbacks

Commit b0e3f18bf2f2 ("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: b0e3f18bf2f2 ("KVM: PPC: Convert to the gfn-based MMU notifier callbacks")
Reported-by: Bharata B Rao <bharata@linux.ibm.com>
Tested-by: Bharata B Rao <bharata@linux.ibm.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Message-Id: <20210505121509.1470207-1-npiggin@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/powerpc/include/asm/kvm_book3s.h
arch/powerpc/kvm/book3s_64_mmu_hv.c
arch/powerpc/kvm/book3s_64_mmu_radix.c