Commit bd42f5af authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Yu Zhang
Browse files

KVM: PPC: Book3S HV: Fix conversion to gfn-based MMU notifier callbacks

mainline inclusion
from mainline-v5.13-rc2
commit 34114136
category: feature
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I7S3VQ
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=34114136f725cbd0c83e7b5a0c8a977976cd82f7



----------------------------------------------------------------------

Commit b1c5356e ("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: b1c5356e ("KVM: PPC: Convert to the gfn-based MMU notifier callbacks")
Reported-by: default avatarBharata B Rao <bharata@linux.ibm.com>
Tested-by: default avatarBharata B Rao <bharata@linux.ibm.com>
Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Message-Id: <20210505121509.1470207-1-npiggin@gmail.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: default avatarYu Zhang <yu.c.zhang@linux.intel.com>
parent ba2975f2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment