linux/arch/powerpc
Paul Mackerras 797f9c07eb 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>
2014-03-29 19:58:35 +11:00
..
boot powerpc/512x: dts: disable MPC5125 usb module 2013-12-20 22:12:07 +01:00
configs powerpc/52xx: Re-enable bestcomm driver in defconfigs 2013-12-10 11:25:08 +11:00
crypto powerpc: Fix compile of sha1-powerpc-asm.S on 32-bit 2013-03-05 16:56:26 +11:00
include KVM: PPC: Book3S HV: Don't use kvm_memslots() in real mode 2014-03-29 19:58:35 +11:00
kernel Merge branch 'kvm-ppc-next' of git://github.com/agraf/linux-2.6 into kvm-queue 2014-01-29 18:29:01 +01:00
kvm KVM: PPC: Book3S HV: Don't use kvm_memslots() in real mode 2014-03-29 19:58:35 +11:00
lib powerpc: Make 64-bit non-VMX __copy_tofrom_user bi-endian 2013-12-30 14:02:30 +11:00
math-emu powerpc/math-emu: Fix load/store indexed emulation 2013-08-14 14:59:57 +10:00
mm memblock: make memblock_set_node() support different memblock_type 2014-01-21 16:19:44 -08:00
net bpf: do not use reciprocal divide 2014-01-15 17:02:08 -08:00
oprofile Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2013-09-06 10:49:42 -07:00
perf powerpc/perf: Fix handling of FAB events 2013-10-03 17:25:38 +10:00
platforms Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2014-01-22 21:21:55 -08:00
sysdev powerpc/44x: Fix ocm_block allocation 2013-12-10 11:25:04 +11:00
xmon powerpc/xmon: Fix printing of set of CPUs in xmon 2013-09-05 17:29:19 +10:00
Kconfig Merge branch 'kvm-ppc-next' of git://github.com/agraf/linux-2.6 into kvm-queue 2014-01-29 18:29:01 +01:00
Kconfig.debug Merge branch 'kconfig-diet' from Dave Hansen 2013-07-04 11:25:51 -07:00
Makefile powerpc: Fix error when cross building TAGS & cscope 2013-11-25 11:49:11 +11:00
relocs_check.pl Fix warning typo "CONFIG_RELCOATABLE" 2013-05-29 15:11:30 +02:00