From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= Date: Mon, 03 Jun 2019 05:53:35 +0000 Subject: Re: [PATCH] KVM: PPC: Book3S HV: XIVE: introduce a KVM device lock Message-Id: <76b15b5f-c8cf-04ee-a00a-064c97c762fe@kaod.org> List-Id: References: <20190524132030.6349-1-clg@kaod.org> <20190531063543.GD26651@blackberry> In-Reply-To: <20190531063543.GD26651@blackberry> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: Paul Mackerras Cc: Alexey Kardashevskiy , David Gibson , Greg Kurz , kvm@vger.kernel.org, kvm-ppc@vger.kernel.org On 31/05/2019 08:35, Paul Mackerras wrote: > On Fri, May 24, 2019 at 03:20:30PM +0200, Cédric 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 : >> >> 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 >> >> 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. >> >> Introduce a new mutex 'lock' for the KVM devices for them to >> synchronize accesses to the XIVE device structures. >> >> Signed-off-by: Cédric 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"). Yes. That's a better tittle. Thanks for doing so. C.