1
0
Fork 0
remarkable-linux/virt/kvm/arm
Christoffer Dall f3662e3325 KVM: arm/arm64: Fix vgic init race
[ Upstream commit 1d47191de7 ]

The vgic_init function can race with kvm_arch_vcpu_create() which does
not hold kvm_lock() and we therefore have no synchronization primitives
to ensure we're doing the right thing.

As the user is trying to initialize or run the VM while at the same time
creating more VCPUs, we just have to refuse to initialize the VGIC in
this case rather than silently failing with a broken VCPU.

Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-26 08:38:04 +02:00
..
hyp KVM: arm/arm64: Do not use kern_hyp_va() with kvm_vgic_global_state 2018-07-22 14:28:50 +02:00
vgic KVM: arm/arm64: Fix vgic init race 2018-09-26 08:38:04 +02:00
aarch32.c KVM: arm64: Make kvm_condition_valid32() accessible from EL2 2017-06-15 09:44:58 +01:00
arch_timer.c KVM: arm/arm64: Reduce verbosity of KVM init log 2018-03-21 12:06:43 +01:00
arm.c arm64: KVM: Add ARCH_WORKAROUND_2 support for guests 2018-07-22 14:28:51 +02:00
mmio.c KVM: Fix stack-out-of-bounds read in write_mmio 2018-01-17 09:45:17 +01:00
mmu.c KVM: arm/arm64: Skip updating PTE entry if no change 2018-09-05 09:26:36 +02:00
perf.c KVM: arm/arm64: Move shared files to virt/kvm/arm 2017-05-04 13:57:26 +02:00
pmu.c KVM: arm/arm64: PMU: Fix overflow interrupt injection 2017-07-25 14:18:01 +01:00
psci.c arm64: KVM: Add ARCH_WORKAROUND_2 discovery through ARCH_FEATURES_FUNC_ID 2018-07-22 14:28:52 +02:00
trace.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00