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=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 5CAF2C3404C for ; Thu, 20 Feb 2020 03:55:53 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 301B624656 for ; Thu, 20 Feb 2020 03:55:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Wqp9EUmc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 301B624656 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=S1DFZ6cpaXXzYkT3ehdZbgsjk6NGtBI0+n0lylaIc2M=; b=Wqp9EUmc7BLWuj7Tde3uHK3NG GvG3z9I38KVjfuksmvKdOF/BNxo5c3m4Gzi85cpRimgEJNvTuIS0ugQY4BIyWiCIiuYPjPdhzy7gH 9wOzcp3VaQjENextTq1tlK6lhCpBsupsW7562PNZOw5KSOIKk2Lzo8Rr814TP1kxkg+u2B4O53IIM 6hOoejgTt09+vdReTrTioYp2VMJ8U2ph4R8i3VI0akc73gCal6B6wKnlRoER2nTUQiHc7R7o6UWiQ sy7F3ph3ZIaJeaKNGsyXmoPjOBF8zLzLbdI94rUuNPMrPlLX4cJsUtAKXbR4GvKCL0SbAzSNsfRRF TChDEyXkA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j4cwB-0005zX-LU; Thu, 20 Feb 2020 03:55:43 +0000 Received: from szxga06-in.huawei.com ([45.249.212.32] helo=huawei.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j4cw8-0005yR-6W for linux-arm-kernel@lists.infradead.org; Thu, 20 Feb 2020 03:55:41 +0000 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 9FA318B7216BCCE18721; Thu, 20 Feb 2020 11:55:34 +0800 (CST) Received: from [127.0.0.1] (10.173.222.27) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.439.0; Thu, 20 Feb 2020 11:55:26 +0800 Subject: Re: [PATCH v4 16/20] KVM: arm64: GICv4.1: Allow SGIs to switch between HW and SW interrupts To: Marc Zyngier , , , , References: <20200214145736.18550-1-maz@kernel.org> <20200214145736.18550-17-maz@kernel.org> From: Zenghui Yu Message-ID: <6798eb13-a7e9-2a92-91b2-9b657962ea79@huawei.com> Date: Thu, 20 Feb 2020 11:55:24 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0 MIME-Version: 1.0 In-Reply-To: <20200214145736.18550-17-maz@kernel.org> Content-Language: en-US X-Originating-IP: [10.173.222.27] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200219_195540_409142_04D52A64 X-CRM114-Status: GOOD ( 12.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lorenzo Pieralisi , Jason Cooper , Suzuki K Poulose , Eric Auger , Robert Richter , James Morse , Thomas Gleixner , Julien Thierry Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Marc, On 2020/2/14 22:57, Marc Zyngier wrote: > In order to let a guest buy in the new, active-less SGIs, we > need to be able to switch between the two modes. > > Handle this by stopping all guest activity, transfer the state > from one mode to the other, and resume the guest. > > Signed-off-by: Marc Zyngier [...] > diff --git a/virt/kvm/arm/vgic/vgic-v3.c b/virt/kvm/arm/vgic/vgic-v3.c > index 1bc09b523486..2c9fc13e2c59 100644 > --- a/virt/kvm/arm/vgic/vgic-v3.c > +++ b/virt/kvm/arm/vgic/vgic-v3.c > @@ -540,6 +540,8 @@ int vgic_v3_map_resources(struct kvm *kvm) > goto out; > } > > + if (kvm_vgic_global_state.has_gicv4_1) > + vgic_v4_configure_vsgis(kvm); > dist->ready = true; > > out: Is there any reason to invoke vgic_v4_configure_vsgis() here? This is called on the first VCPU run, through kvm_vgic_map_resources(). Shouldn't the vSGI configuration only driven by a GICD_CTLR.nASSGIreq writing (from guest, or from userspace maybe)? Thanks, Zenghui _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel