linux/arch/arm/kvm
Andrew Jones 6c7a5dce22 KVM: arm/arm64: fix races in kvm_psci_vcpu_on
Fix potential races in kvm_psci_vcpu_on() by taking the kvm->lock
mutex.  In general, it's a bad idea to allow more than one PSCI_CPU_ON
to process the same target VCPU at the same time.  One such problem
that may arise is that one PSCI_CPU_ON could be resetting the target
vcpu, which fills the entire sys_regs array with a temporary value
including the MPIDR register, while another looks up the VCPU based
on the MPIDR value, resulting in no target VCPU found.  Resolves both
races found with the kvm-unit-tests/arm/psci unit test.

Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Christoffer Dall <cdall@linaro.org>
Reported-by: Levente Kurusa <lkurusa@redhat.com>
Suggested-by: Christoffer Dall <cdall@linaro.org>
Signed-off-by: Andrew Jones <drjones@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Christoffer Dall <cdall@linaro.org>
2017-04-19 17:28:11 +02:00
..
hyp ARM: KVM: Allow the main HYP code to use the init hyp stub implementation 2017-04-09 07:49:29 -07:00
arm.c KVM: arm/arm64: Advertise support for KVM_CAP_ARM_USER_IRQ 2017-04-09 07:49:40 -07:00
coproc_a7.c arm/arm64: KVM: Use set/way op trapping to track the state of the caches 2015-01-29 23:24:56 +01:00
coproc_a15.c arm/arm64: KVM: Use set/way op trapping to track the state of the caches 2015-01-29 23:24:56 +01:00
coproc.c arm: KVM: Treat CP15 accessors returning false as successful 2017-04-09 07:49:17 -07:00
coproc.h arm: KVM: Make unexpected register accesses inject an undef 2017-04-09 07:49:16 -07:00
emulate.c arm: KVM: Add Virtual Abort injection helper 2016-09-08 12:53:00 +02:00
guest.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
handle_exit.c ARM: KVM: Gracefully handle hyp-stubs being restored from under our feet 2017-04-09 07:49:31 -07:00
init.S ARM: hyp-stub: Zero r0 on successful stub handling 2017-04-09 07:49:36 -07:00
interrupts.S ARM: hyp-stub/KVM: Kill __hyp_get_vectors 2017-04-09 07:49:34 -07:00
irq.h KVM: arm/arm64: Enable irqchip routing 2016-07-22 18:52:01 +01:00
Kconfig ARM: KVM: Support vGICv3 ITS 2016-11-14 10:32:54 +00:00
Makefile KVM: arm/arm64: vgic: Implement VGICv3 CPU interface access 2017-01-30 13:47:25 +00:00
mmio.c arm/arm64: KVM: Remove external abort test from MMIO handling 2016-09-08 12:53:00 +02:00
mmu.c arm/arm64: KVM: Remove kvm_get_idmap_start 2017-04-09 07:49:32 -07:00
perf.c ARM: KVM: add support for minimal host vs guest profiling 2013-04-28 21:44:01 -07:00
psci.c KVM: arm/arm64: fix races in kvm_psci_vcpu_on 2017-04-19 17:28:11 +02:00
reset.c KVM: arm/arm64: Initialize the emulated EL1 physical timer 2017-02-08 15:13:34 +00:00
trace.h arm/arm64: KVM: Improve kvm_exit tracepoint 2015-10-22 23:01:47 +02:00
vgic-v3-coproc.c KVM: arm/arm64: vgic: Implement VGICv3 CPU interface access 2017-01-30 13:47:25 +00:00