linux-stable/arch/powerpc
Paul Mackerras 2c9097e4c1 KVM: PPC: Book3S HV: Take the SRCU read lock before looking up memslots
The generic KVM code uses SRCU (sleeping RCU) to protect accesses
to the memslots data structures against updates due to userspace
adding, modifying or removing memory slots.  We need to do that too,
both to avoid accessing stale copies of the memslots and to avoid
lockdep warnings.  This therefore adds srcu_read_lock/unlock pairs
around code that accesses and uses memslots.

Since the real-mode handlers for H_ENTER, H_REMOVE and H_BULK_REMOVE
need to access the memslots, and we don't want to call the SRCU code
in real mode (since we have no assurance that it would only access
the linear mapping), we hold the SRCU read lock for the VM while
in the guest.  This does mean that adding or removing memory slots
while some vcpus are executing in the guest will block for up to
two jiffies.  This tradeoff is acceptable since adding/removing
memory slots only happens rarely, while H_ENTER/H_REMOVE/H_BULK_REMOVE
are performance-critical hot paths.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
2012-10-05 23:38:51 +02:00
..
boot powerpc/p4080ds: dts - add usb controller version info and port0 2012-08-10 07:47:02 -05:00
configs Revert "powerpc: Update g5_defconfig" 2012-08-24 20:55:55 +10:00
include/asm KVM: PPC: bookehv: Allow duplicate calls of DO_KVM macro 2012-10-05 23:38:50 +02:00
kernel powerpc/epapr: export epapr_hypercall_start 2012-10-05 23:38:40 +02:00
kvm KVM: PPC: Book3S HV: Take the SRCU read lock before looking up memslots 2012-10-05 23:38:51 +02:00
lib powerpc: Fix VMX in interrupt check in POWER7 copy loops 2012-08-24 20:26:09 +10:00
math-emu
mm KVM: PPC: Add cache flush on page map 2012-08-16 14:14:53 +02:00
net powerpc: Start using ___PPC_RA/B/S/T where necessary 2012-07-10 19:18:25 +10:00
oprofile Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
perf powerpc/perf: Use pmc_overflow() to detect rolled back events 2012-08-24 20:26:10 +10:00
platforms PPC: select EPAPR_PARAVIRT for all users of epapr hcalls 2012-10-05 23:38:37 +02:00
sysdev powerpc/fsl-soc: use CONFIG_EPAPR_PARAVIRT for hcalls 2012-10-05 23:38:38 +02:00
xmon powerpc: Fixup whitespace in xmon 2012-08-24 20:26:03 +10:00
Kconfig ipc: use Kconfig options for __ARCH_WANT_[COMPAT_]IPC_PARSE_VERSION 2012-07-30 17:25:21 -07:00
Kconfig.debug powerpc: IOMMU fault injection 2012-07-10 19:18:59 +10:00
Makefile crypto: nx - move nx build to driver/crypto Makefile 2012-06-27 14:42:00 +08:00
relocs_check.pl powerpc: Process dynamic relocations for kernel 2011-12-20 10:21:08 -05:00