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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id D9D11C433EF for ; Wed, 8 Dec 2021 17:46:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eooX4ga3Nb/+fHBIH/TaKyYpT+pqa0JM3oLdHFoYas0=; b=4gnNm7IhTR+f3u VbP0lJZsBcyoBY/0ZJ6lDCy5lHE9zAVzDfQ/IiJexcTcpHt0cKIuhJoqBbLCxrsR/TxRxSpJu4Faq HO6ChaSQImV9x2aOpCWZ/va6a1OONHRHItM/YVbbRILVkbdHtp1SfB6Zh60/ygGjR/N4TuCb4ScI0 +RA5HmVHETmgDYlZ5wPgV67hYdJUaA+ntg6EkYiHZoBZSV/ME4UrHDO0pxZw6qmz3Dh0TXJUtlZ34 eb+dreNkxw5IUrLvO1dNPrM6bl3Q+etooiyZQrG4G+jME7oipgR0Cuj2cw6m2Bj0XLhfMMNJyccAF MzBNvMp43XYhF2AmVVmQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mv0zl-00DmJQ-Tz; Wed, 08 Dec 2021 17:44:46 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mv0zi-00DmJ3-EJ for linux-arm-kernel@lists.infradead.org; Wed, 08 Dec 2021 17:44:43 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2E7F6B82205; Wed, 8 Dec 2021 17:44:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EE459C00446; Wed, 8 Dec 2021 17:44:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638985479; bh=OBsbhFHSgjiIsBZG+MprcH9LNQvGBI+PWjEEiYr2P/M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Z+W4hNL0UGcAbWSmq4uuNzN+91ptDMp4t+MqtEeKYS58lAt2wBNlX5jvhhxvdas/d AToxQhpbFxjAkRWxXYlhC2nVi524iS5hByrJnWN9NvqCumBMzj3DgYZyUPuGNhDHoS qT3ZkV04DPZsBhLEhE7CFerhddNWnp7ATn3bAqxJT/olV/hlE+JqkoZAx0fZqkbxOX Qqih6YuZtCrn5p+onLPPQD2fH6lUy1wQsn3NO2vWN9QEGavbAIMyqySoukbi9tULxU sTk01HQB2uiUnl2s7rg2v7IUhTlGiwTioHGG3DUHDNGgVOboA7R+BLAMLXBYrY1Xh4 IeeuqKj60y/RA== Date: Wed, 8 Dec 2021 17:44:34 +0000 From: Will Deacon To: Quentin Perret Cc: Marc Zyngier , James Morse , Alexandru Elisei , Suzuki K Poulose , Catalin Marinas , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH 2/6] KVM: arm64: pkvm: Disable GICv2 support Message-ID: <20211208174434.GC820@willie-the-truck> References: <20211208152300.2478542-1-qperret@google.com> <20211208152300.2478542-3-qperret@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211208152300.2478542-3-qperret@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211208_094442_644764_0E9D1E6E X-CRM114-Status: GOOD ( 20.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Dec 08, 2021 at 03:22:55PM +0000, Quentin Perret wrote: > GICv2 requires having device mappings in guests and the hypervisor, > which is incompatible with the current pKVM EL2 page ownership model > which only covers memory. While it would be desirable to support pKVM > with GICv2, this will require a lot more work, so let's make the > current assumption clear until then. > > Co-developed-by: Marc Zyngier > Signed-off-by: Marc Zyngier > Signed-off-by: Quentin Perret > --- > arch/arm64/kvm/vgic/vgic-v2.c | 5 +++++ > arch/arm64/kvm/vgic/vgic-v3.c | 2 +- > 2 files changed, 6 insertions(+), 1 deletion(-) > > diff --git a/arch/arm64/kvm/vgic/vgic-v2.c b/arch/arm64/kvm/vgic/vgic-v2.c > index 95a18cec14a3..8e337a0d7817 100644 > --- a/arch/arm64/kvm/vgic/vgic-v2.c > +++ b/arch/arm64/kvm/vgic/vgic-v2.c > @@ -345,6 +345,11 @@ int vgic_v2_probe(const struct gic_kvm_info *info) > int ret; > u32 vtr; > > + if (is_protected_kvm_enabled()) { > + kvm_err("GICv2 not supported in protected mode\n"); > + return -ENXIO; > + } > + > if (!info->vctrl.start) { > kvm_err("GICH not present in the firmware table\n"); > return -ENXIO; > diff --git a/arch/arm64/kvm/vgic/vgic-v3.c b/arch/arm64/kvm/vgic/vgic-v3.c > index 04f62c4b07fb..debad4e6e6c9 100644 > --- a/arch/arm64/kvm/vgic/vgic-v3.c > +++ b/arch/arm64/kvm/vgic/vgic-v3.c > @@ -651,7 +651,7 @@ int vgic_v3_probe(const struct gic_kvm_info *info) > } else if (!PAGE_ALIGNED(info->vcpu.start)) { > pr_warn("GICV physical address 0x%llx not page aligned\n", > (unsigned long long)info->vcpu.start); > - } else { > + } else if (kvm_get_mode() != KVM_MODE_PROTECTED) { > kvm_vgic_global_state.vcpu_base = info->vcpu.start; > kvm_vgic_global_state.can_emulate_gicv2 = true; > ret = kvm_register_vgic_device(KVM_DEV_TYPE_ARM_VGIC_V2); Acked-by: Will Deacon Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel