1
0
Fork 0
alistair23-linux/arch/arm/kvm
Suzuki K Poulose 8b3405e345 kvm: arm/arm64: Fix locking for kvm_free_stage2_pgd
In kvm_free_stage2_pgd() we don't hold the kvm->mmu_lock while calling
unmap_stage2_range() on the entire memory range for the guest. This could
cause problems with other callers (e.g, munmap on a memslot) trying to
unmap a range. And since we have to unmap the entire Guest memory range
holding a spinlock, make sure we yield the lock if necessary, after we
unmap each PUD range.

Fixes: commit d5d8184d35 ("KVM: ARM: Memory virtualization setup")
Cc: stable@vger.kernel.org # v3.10+
Cc: Paolo Bonzini <pbonzin@redhat.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Christoffer Dall <christoffer.dall@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
[ Avoid vCPU starvation and lockup detector warnings ]
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Christoffer Dall <cdall@linaro.org>
2017-04-04 14:33:50 +02:00
..
hyp arm/arm64: KVM: Perform local TLB invalidation when multiplexing vcpus on a single CPU 2016-11-04 17:56:28 +00: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
arm.c KVM: arm/arm64: Enable KVM_CAP_NR_MEMSLOTS on arm/arm64 2017-03-09 09:13:39 +00:00
coproc.c ARM: KVM: Support vgic-v3 2016-09-22 13:22:21 +02:00
coproc.h ARM: KVM: Rename struct coproc_reg::is_64 to is_64bit 2016-02-29 18:34:22 +00: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
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: Survive unknown traps from guests 2017-03-07 14:50:45 +00:00
init.S arm: KVM: Allow hyp teardown 2016-07-03 23:41:27 +02:00
interrupts.S ARM: KVM: Remove the old world switch 2016-02-29 18:34:14 +00:00
irq.h KVM: arm/arm64: Enable irqchip routing 2016-07-22 18:52:01 +01:00
mmio.c arm/arm64: KVM: Remove external abort test from MMIO handling 2016-09-08 12:53:00 +02:00
mmu.c kvm: arm/arm64: Fix locking for kvm_free_stage2_pgd 2017-04-04 14:33:50 +02:00
perf.c ARM: KVM: add support for minimal host vs guest profiling 2013-04-28 21:44:01 -07:00
psci.c KVM: Use simple waitqueue for vcpu->wq 2016-02-25 11:27:16 +01: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