summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/book3s_hv_rmhandlers.S
diff options
context:
space:
mode:
authorPaul Mackerras2014-03-25 00:47:06 +0100
committerPaul Mackerras2014-03-29 09:58:35 +0100
commit797f9c07eb4cbc2d0ff27fac165a0b885da38840 (patch)
treeca135c3f5a5b2f37c702e69b55352b766764d4a6 /arch/powerpc/kvm/book3s_hv_rmhandlers.S
parentKVM: PPC: Book3S HV: Return ENODEV error rather than EIO (diff)
downloadkernel-qcow2-linux-797f9c07eb4cbc2d0ff27fac165a0b885da38840.tar.gz
kernel-qcow2-linux-797f9c07eb4cbc2d0ff27fac165a0b885da38840.tar.xz
kernel-qcow2-linux-797f9c07eb4cbc2d0ff27fac165a0b885da38840.zip
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/powerpc/kvm/book3s_hv_rmhandlers.S')
0 files changed, 0 insertions, 0 deletions