linux/arch/powerpc
Paul Mackerras cf5f6f3125 KVM: PPC: Book3S HV: Hold kvm->lock around call to kvmppc_update_lpcr
Commit 468808bd35 ("KVM: PPC: Book3S HV: Set process table for HPT
guests on POWER9", 2017-01-30) added a call to kvmppc_update_lpcr()
which doesn't hold the kvm->lock mutex around the call, as required.
This adds the lock/unlock pair, and for good measure, includes
the kvmppc_setup_partition_table() call in the locked region, since
it is altering global state of the VM.

This error appears not to have any fatal consequences for the host;
the consequences would be that the VCPUs could end up running with
different LPCR values, or an update to the LPCR value by userspace
using the one_reg interface could get overwritten, or the update
done by kvmhv_configure_mmu() could get overwritten.

Cc: stable@vger.kernel.org # v4.10+
Fixes: 468808bd35 ("KVM: PPC: Book3S HV: Set process table for HPT guests on POWER9")
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
2017-09-12 16:02:27 +10:00
..
boot powerpc/boot: Fix 64-bit boot wrapper build with non-biarch compiler 2017-07-28 19:35:46 +10:00
configs powerpc/configs: Re-enable HARD/SOFT lockup detectors 2017-08-09 23:45:13 +10:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2017-05-02 15:53:46 -07:00
include Merge remote-tracking branch 'remotes/powerpc/topic/ppc-kvm' into kvm-ppc-next 2017-08-31 12:37:03 +10:00
kernel Merge branch 'kvm-ppc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2017-09-08 14:40:43 +02:00
kvm KVM: PPC: Book3S HV: Hold kvm->lock around call to kvmppc_update_lpcr 2017-09-12 16:02:27 +10:00
lib powerpc fixes for 4.13 #2 2017-07-14 15:33:15 -07:00
math-emu Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
mm Merge remote-tracking branch 'remotes/powerpc/topic/ppc-kvm' into kvm-ppc-next 2017-08-31 12:37:03 +10:00
net bpf: Add jited_len to struct bpf_prog 2017-06-06 15:41:24 -04:00
oprofile ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
perf powerpc/mm: Rename find_linux_pte_or_hugepte() 2017-08-17 23:13:46 +10:00
platforms powerpc/powernv/idle: Disable LOSE_FULL_CONTEXT states when stop-api fails 2017-08-08 20:21:23 +10:00
purgatory kexec, x86/purgatory: Unbreak it and clean it up 2017-03-10 20:55:09 +01:00
sysdev powerpc updates for 4.13 2017-07-07 13:55:45 -07:00
tools powerpc/64: Tool to check head sections location sanity 2017-05-30 14:59:51 +10:00
xmon powerpc/xmon: Add patch_instruction() support for xmon 2017-07-03 23:12:19 +10:00
Kconfig kernel/watchdog: fix Kconfig constraints for perf hardlockup watchdog 2017-08-18 15:32:01 -07:00
Kconfig.debug powerpc/xmon: Enable disassembly files (compilation changes) 2017-02-15 20:02:42 +11:00
Makefile powerpc/Makefile: Fix ld version check with 64-bit LE-only toolchain 2017-07-26 16:41:54 +10:00
Makefile.postlink powerpc/64: Tool to check head sections location sanity 2017-05-30 14:59:51 +10:00