Documentation: kvm: fix SRCU locking order docs
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 9 Jan 2023 11:02:16 +0000 (06:02 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 11 Jan 2023 18:31:33 +0000 (13:31 -0500)
commit3a9ae31ac26a58d33008c42f6cd022afc2af2dc0
tree82860bd99ec8342e5f8fd67ac4d51ca7117d1fb3
parent45e966fcca03ecdcccac7cb236e16eea38cc18af
Documentation: kvm: fix SRCU locking order docs

kvm->srcu is taken in KVM_RUN and several other vCPU ioctls, therefore
vcpu->mutex is susceptible to the same deadlock that is documented
for kvm->slots_lock.  The same holds for kvm->lock, since kvm->lock
is held outside vcpu->mutex.  Fix the documentation and rearrange it
to highlight the difference between these locks and kvm->slots_arch_lock,
and how kvm->slots_arch_lock can be useful while processing a vmexit.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Documentation/virt/kvm/locking.rst