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 DE4B5C52D6F for ; Wed, 21 Aug 2024 16:53:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=RhkCn0ao6zdR20+7bDAZFdJNVPYbj05+LvI61+DYOno=; b=1WsuyAGu3TNNYPx53UcVGE+wUx hh+g9zymzrFrkk+aY289XPczG/k76iWaLxhQc5TydpKYNR2ywnSyOn1/EQiNEr2WLT+qa7CAu3TlO ro9GZ4GT35e4g8CYZ6D3Ou6Do0XKUzUa/ejVLcqtTnk37+LFOaFR6Zc+wbU6c3Uv3Wc2KeMi/OQOq E2ilRbEIaRA46xfLYPOl9GUzIZOKsM7xkN5WOeC1NptOVDuCVjw8l+QD3Ju81WKTiF5EigbkMjTfI kBJvEqcVq9qQ4vyKFo/E7qjRohld/yqt+0eYwbyeOCfTR8qSTT5AFuy3EPbT8U5Yk4p3pDGLdwp9c SEGDfC/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgoaO-00000009pBN-3TGu; Wed, 21 Aug 2024 16:53:28 +0000 Received: from out-185.mta0.migadu.com ([91.218.175.185]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgoZe-00000009p1E-0ojJ for linux-arm-kernel@lists.infradead.org; Wed, 21 Aug 2024 16:52:44 +0000 Date: Wed, 21 Aug 2024 09:52:28 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1724259157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=RhkCn0ao6zdR20+7bDAZFdJNVPYbj05+LvI61+DYOno=; b=hkdJH2X91AdgM5+zOVDGLwr1HTzeTZ+2p/Sarj0/EpdGETIuqicK3PLbiV88vGem+y99BK /IlJ0jOrxwXdyJeL3xzUUwPnYJJrjahouXN9btym0vOpJyxeOcc576JwwwQHFbXRI5cN9C 03rU7h1VL0q8tHMhgeR+4ODXUDAvF7I= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Marc Zyngier Cc: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, James Morse , Suzuki K Poulose , Zenghui Yu , Alexander Potapenko Subject: Re: [PATCH 04/12] KVM: arm64: Force GICv3 traps activa when no irqchip is configured on VHE Message-ID: References: <20240820100349.3544850-1-maz@kernel.org> <20240820100349.3544850-5-maz@kernel.org> <86ikvuxh56.wl-maz@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86ikvuxh56.wl-maz@kernel.org> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240821_095242_681368_BD9D7B45 X-CRM114-Status: GOOD ( 21.21 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Aug 21, 2024 at 12:13:57PM +0100, Marc Zyngier wrote: > On Wed, 21 Aug 2024 00:33:40 +0100, > Oliver Upton wrote: > > > > s/activa/active/ > > > > On Tue, Aug 20, 2024 at 11:03:41AM +0100, Marc Zyngier wrote: > > > On a VHE system, no GICv3 traps get configured when no irqchip is > > > present. This is not quite matching the "no GICv3" semantics that > > > we want to present. > > > > > > Force such traps to be configured in this case. > > > > > > Signed-off-by: Marc Zyngier > > > --- > > > arch/arm64/kvm/vgic/vgic.c | 14 ++++++++++---- > > > 1 file changed, 10 insertions(+), 4 deletions(-) > > > > > > diff --git a/arch/arm64/kvm/vgic/vgic.c b/arch/arm64/kvm/vgic/vgic.c > > > index 974849ea7101..2caa64415ff3 100644 > > > --- a/arch/arm64/kvm/vgic/vgic.c > > > +++ b/arch/arm64/kvm/vgic/vgic.c > > > @@ -917,10 +917,13 @@ void kvm_vgic_flush_hwstate(struct kvm_vcpu *vcpu) > > > > > > void kvm_vgic_load(struct kvm_vcpu *vcpu) > > > { > > > - if (unlikely(!vgic_initialized(vcpu->kvm))) > > > + if (unlikely(!irqchip_in_kernel(vcpu->kvm) || !vgic_initialized(vcpu->kvm))) { > > > > Doesn't !vgic_initialized(vcpu->kvm) also cover the case of no irqchip > > in kernel? > > It does, but that's purely accidental. I can drop that, but it is > really fragile. Oh, definitely not, I was just wondering if this was meant as a functional change or a readability change to make the relation explicit. -- Thanks, Oliver