From: Paul Mackerras Date: Thu, 23 May 2019 06:34:24 +0000 Subject: [PATCH 0/4] KVM: PPC: Book3S: Fix potential deadlocks Message-Id: <20190523063424.GB19655@blackberry> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org Cc: kvm-ppc@vger.kernel.org, =?iso-8859-1?Q?C=E9dric?= Le Goater Recent reports of lockdep splats in the HV KVM code revealed that it was taking the kvm->lock mutex in several contexts where a vcpu mutex was already held. Lockdep has only started warning since I added code to take the vcpu mutexes in the XIVE device release functions, but since Documentation/virtual/kvm/locking.txt specifies that the vcpu mutexes nest inside kvm->lock, it seems that the new code is correct and it is most of the old uses of kvm->lock that are wrong. This series should fix the problems, by adding new mutexes that nest inside the vcpu mutexes and using them instead of kvm->lock. Paul.