summaryrefslogtreecommitdiff
path: root/arch/arm64/mm
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2014-03-25 10:47:06 +1100
committerPaul Mackerras <paulus@samba.org>2014-03-29 19:58:35 +1100
commit797f9c07eb4cbc2d0ff27fac165a0b885da38840 (patch)
treeca135c3f5a5b2f37c702e69b55352b766764d4a6 /arch/arm64/mm
parent739e2425fea6349ac674e93648953b3a08985f2f (diff)
KVM: PPC: Book3S HV: Don't use kvm_memslots() in real mode
With HV KVM, some high-frequency hypercalls such as H_ENTER are handled in real mode, and need to access the memslots array for the guest. Accessing the memslots array is safe, because we hold the SRCU read lock for the whole time that a guest vcpu is running. However, the checks that kvm_memslots() does when lockdep is enabled are potentially unsafe in real mode, when only the linear mapping is available. Furthermore, kvm_memslots() can be called from a secondary CPU thread, which is an offline CPU from the point of view of the host kernel, and is not running the task which holds the SRCU read lock. To avoid false positives in the checks in kvm_memslots(), and to avoid possible side effects from doing the checks in real mode, this replaces kvm_memslots() with kvm_memslots_raw() in all the places that execute in real mode. kvm_memslots_raw() is a new function that is like kvm_memslots() but uses rcu_dereference_raw_notrace() instead of kvm_dereference_check(). Signed-off-by: Paul Mackerras <paulus@samba.org> Acked-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'arch/arm64/mm')
0 files changed, 0 insertions, 0 deletions