From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Mackerras Date: Fri, 31 May 2019 06:35:43 +0000 Subject: Re: [PATCH] KVM: PPC: Book3S HV: XIVE: introduce a KVM device lock Message-Id: <20190531063543.GD26651@blackberry> List-Id: References: <20190524132030.6349-1-clg@kaod.org> In-Reply-To: <20190524132030.6349-1-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: =?iso-8859-1?Q?C=E9dric?= Le Goater Cc: Alexey Kardashevskiy , David Gibson , Greg Kurz , kvm@vger.kernel.org, kvm-ppc@vger.kernel.org On Fri, May 24, 2019 at 03:20:30PM +0200, C=E9dric Le Goater wrote: > The XICS-on-XIVE KVM device needs to allocate XIVE event queues when a > priority is used by the OS. This is referred as EQ provisioning and it > is done under the hood when : >=20 > 1. a CPU is hot-plugged in the VM > 2. the "set-xive" is called at VM startup > 3. sources are restored at VM restore >=20 > The kvm->lock mutex is used to protect the different XIVE structures > being modified but in some contextes, kvm->lock is taken under the > vcpu->mutex which is a forbidden sequence by KVM. >=20 > Introduce a new mutex 'lock' for the KVM devices for them to > synchronize accesses to the XIVE device structures. >=20 > Signed-off-by: C=E9dric Le Goater Thanks, patch applied to my kvm-ppc-fixes branch (with the headline "KVM: PPC: Book3S HV: XIVE: Introduce a new mutex for the XIVE device"). Paul.