linux/arch/powerpc
Paul Mackerras 0d4ee88d92 KVM: PPC: Book3S HV: Use new mutex to synchronize MMU setup
Currently the HV KVM code uses kvm->lock in conjunction with a flag,
kvm->arch.mmu_ready, to synchronize MMU setup and hold off vcpu
execution until the MMU-related data structures are ready.  However,
this means that kvm->lock is being taken inside vcpu->mutex, which
is contrary to Documentation/virtual/kvm/locking.txt and results in
lockdep warnings.

To fix this, we add a new mutex, kvm->arch.mmu_setup_lock, which nests
inside the vcpu mutexes, and is taken in the places where kvm->lock
was taken that are related to MMU setup.

Additionally we take the new mutex in the vcpu creation code at the
point where we are creating a new vcore, in order to provide mutual
exclusion with kvmppc_update_lpcr() and ensure that an update to
kvm->arch.lpcr doesn't get missed, which could otherwise lead to a
stale vcore->lpcr value.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
2019-05-29 13:44:36 +10:00
..
boot treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 40 2019-05-24 17:27:12 +02:00
configs This pull request contains the following changes for MTD: 2019-05-12 17:57:52 -04:00
crypto treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
include KVM: PPC: Book3S HV: Use new mutex to synchronize MMU setup 2019-05-29 13:44:36 +10:00
kernel treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61 2019-05-24 17:36:45 +02:00
kvm KVM: PPC: Book3S HV: Use new mutex to synchronize MMU setup 2019-05-29 13:44:36 +10:00
lib powerpc: disable KASAN instrumentation on early/critical files. 2019-05-03 01:20:26 +10:00
math-emu powerpc: math-emu: remove unneeded header search paths 2019-01-14 20:39:27 +11:00
mm powerpc fixes for 5.2 #2 2019-05-19 10:10:15 -07:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf 2019-03-16 12:20:08 -07:00
oprofile Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
perf treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 112 2019-05-24 17:39:01 +02:00
platforms treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 118 2019-05-24 17:39:02 +02:00
purgatory powerpc: disable KASAN instrumentation on early/critical files. 2019-05-03 01:20:26 +10:00
sysdev treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61 2019-05-24 17:36:45 +02:00
tools powerpc/tools/checkpatch: Ignore DT_SPLIT_BINDING_PATCH 2018-12-04 19:45:01 +11:00
xmon treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 76 2019-05-24 17:37:51 +02:00
Kbuild
Kconfig mm: memblock: make keeping memblock memory opt-in rather than opt-out 2019-05-14 09:47:50 -07:00
Kconfig.debug powerpc/xmon: add read-only mode 2019-05-03 02:54:57 +10:00
Makefile treewide: prefix header search paths with $(srctree)/ 2019-05-18 11:49:57 +09:00
Makefile.postlink