]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
KVM: arm/arm64: VGIC/ITS save/restore: protect kvm_read_guest() calls
authorAndre Przywara <andre.przywara@arm.com>
Fri, 11 May 2018 14:20:15 +0000 (15:20 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 14 Aug 2018 10:27:14 +0000 (12:27 +0200)
commitbd065cd231df18404cc1e6c1e08743985456611a
tree8d840cda6631dd44ad7687f36b3d203df9c7675d
parentcbb4e31879fdd67d2793ea46edb5ae18da3b2ecd
KVM: arm/arm64: VGIC/ITS save/restore: protect kvm_read_guest() calls

BugLink: http://bugs.launchpad.net/bugs/1782846
commit 711702b57cc3c50b84bd648de0f1ca0a378805be upstream.

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.
Use the newly introduced wrapper for that.

Cc: Stable <stable@vger.kernel.org> # 4.12+
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
virt/kvm/arm/vgic/vgic-its.c
virt/kvm/arm/vgic/vgic-v3.c