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. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C201C04AB6 for ; Mon, 3 Jun 2019 05:53:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 214FF27B75 for ; Mon, 3 Jun 2019 05:53:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726486AbfFCFxp (ORCPT ); Mon, 3 Jun 2019 01:53:45 -0400 Received: from 5.mo69.mail-out.ovh.net ([46.105.43.105]:56043 "EHLO 5.mo69.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726374AbfFCFxo (ORCPT ); Mon, 3 Jun 2019 01:53:44 -0400 Received: from player693.ha.ovh.net (unknown [10.108.57.226]) by mo69.mail-out.ovh.net (Postfix) with ESMTP id 6DF025BFCC for ; Mon, 3 Jun 2019 07:53:42 +0200 (CEST) Received: from kaod.org (lfbn-1-10649-41.w90-89.abo.wanadoo.fr [90.89.235.41]) (Authenticated sender: clg@kaod.org) by player693.ha.ovh.net (Postfix) with ESMTPSA id E4B4C65F84AB; Mon, 3 Jun 2019 05:53:35 +0000 (UTC) Subject: Re: [PATCH] KVM: PPC: Book3S HV: XIVE: introduce a KVM device lock To: Paul Mackerras Cc: Alexey Kardashevskiy , David Gibson , Greg Kurz , kvm@vger.kernel.org, kvm-ppc@vger.kernel.org References: <20190524132030.6349-1-clg@kaod.org> <20190531063543.GD26651@blackberry> From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= Message-ID: <76b15b5f-c8cf-04ee-a00a-064c97c762fe@kaod.org> Date: Mon, 3 Jun 2019 07:53:35 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190531063543.GD26651@blackberry> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 13107163766988639191 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduuddrudefiedguddttdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@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.