linux/virt/kvm/arm/vgic
Andre Przywara bf308242ab KVM: arm/arm64: VGIC/ITS: protect kvm_read_guest() calls with SRCU lock
kvm_read_guest() will eventually look up in kvm_memslots(), which requires
either to hold the kvm->slots_lock or to be inside a kvm->srcu critical
section.
In contrast to x86 and s390 we don't take the SRCU lock on every guest
exit, so we have to do it individually for each kvm_read_guest() call.

Provide a wrapper which does that and use that everywhere.

Note that ending the SRCU critical section before returning from the
kvm_read_guest() wrapper is safe, because the data has been *copied*, so
we don't need to rely on valid references to the memslot anymore.

Cc: Stable <stable@vger.kernel.org> # 4.8+
Reported-by: Jan Glauber <jan.glauber@caviumnetworks.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-05-15 13:36:49 +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
vgic-debug.c KVM: arm/arm64: Properly protect VGIC locks from IRQs 2018-05-15 13:36:27 +02:00
vgic-init.c KVM: arm/arm64: vgic_init: Cleanup reference to process_maintenance 2018-05-04 16:44:54 +01:00
vgic-irqfd.c KVM: arm/arm64: vgic-irqfd: Fix MSI entry allocation 2017-11-29 16:46:12 +01:00
vgic-its.c KVM: arm/arm64: VGIC/ITS: protect kvm_read_guest() calls with SRCU lock 2018-05-15 13:36:49 +02:00
vgic-kvm-device.c KVM: arm/arm64: Register iodevs when setting redist base and creating VCPUs 2017-05-09 12:19:36 +02:00
vgic-mmio-v2.c KVM: arm/arm64: vgic: fix possible spectre-v1 in vgic_mmio_read_apr() 2018-04-26 17:06:00 +01:00
vgic-mmio-v3.c KVM: arm/arm64: GICv4: Add property field and per-VM predicate 2017-11-10 09:06:45 +01:00
vgic-mmio.c KVM: arm/arm64: vgic: Fix source vcpu issues for GICv2 SGI 2018-04-27 12:39:09 +01:00
vgic-mmio.h KVM: arm/arm64: Separate guest and uaccess writes to dist {sc}active 2017-05-23 12:48:11 +02:00
vgic-v2.c KVM: arm/arm64: vgic: Fix source vcpu issues for GICv2 SGI 2018-04-27 12:39:09 +01:00
vgic-v3.c KVM: arm/arm64: vgic: Fix source vcpu issues for GICv2 SGI 2018-04-27 12:39:09 +01:00
vgic-v4.c KVM: arm64: Fix GICv4 init when called from vgic_its_create 2018-01-12 11:40:21 +01:00
vgic.c KVM: arm/arm64: Properly protect VGIC locks from IRQs 2018-05-15 13:36:27 +02:00
vgic.h KVM: arm/arm64: vgic: Fix source vcpu issues for GICv2 SGI 2018-04-27 12:39:09 +01:00