From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 808A22E8E10; Mon, 24 Nov 2025 13:06:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763989592; cv=none; b=cE1mI3L60jHuAEjQfboXDsLUqWyYUmk//cnFUCYNdNFkXZoAagpo5uKJfv1XdrlE+a4pzqR5UG4v5XvIN+Cw2FXMfq2okpUZ7bJlyZAOjB8U+OHJpfM6OdYnKpYXcqH6tPiGPw/f2R7//9rSUdovXMMVNYa8i2ysMe/bCpJ4xpo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763989592; c=relaxed/simple; bh=5j0CLSvOJClj10Gzqp4SzaePQkmDOy6Vdp6NVHuro04=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=BA2/4palBcQfTAv3K787EhhyBguwUlvf5V+WMRT5uRjqRp5Zi4VligdWSspQOmztWOkpP1DJMZe0IFXLKY2bl9uEawkHbxpK3mRPCT5a5FfaG9isQj5i0stpOMCemTT4og44StwqeCFtn9q0lu/IiKzaTJO6IZyzK4/u3bA41Tk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=m3V8BGSg; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="m3V8BGSg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1ACEFC116D0; Mon, 24 Nov 2025 13:06:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763989592; bh=5j0CLSvOJClj10Gzqp4SzaePQkmDOy6Vdp6NVHuro04=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=m3V8BGSgC33MuYL+7IJxdicRfHPtObuQIPuR9g/U+fAPn2+3zga2WCZU5KBrGOnGi 1YOgzNXdk2lGlaOLjwjepa0O0YgY204eUo8mcryVjAr6UZF+svSCtGc2MzavsDbviD US4QliUeH2ZmLsYmYqxJEtM+hMShI0bQIy77+4rCQ0CuNornjXAOtj+77027bYnTFD mvuL8QA89qMzREMKm/yejISFrfxDViL13NmuDg7D6Q+c3BvUVVr7WezqVDvoltZzCa KBOPueLvBIgAB/Va8rftGGomNarbKr8cXhIW1xJ2/QiEZyVCJIq8Q0L8H+2RSzy7vp nx09yKENSacwQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vNWGz-00000007r1G-3j9E; Mon, 24 Nov 2025 13:06:29 +0000 Date: Mon, 24 Nov 2025 13:06:29 +0000 Message-ID: <86o6orr356.wl-maz@kernel.org> From: Marc Zyngier To: Mark Brown Cc: Fuad Tabba , kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, Joey Gouly , Suzuki K Poulose , Oliver Upton , Zenghui Yu , Christoffer Dall , Volodymyr Babchuk , Yao Yuan Subject: Re: [PATCH v2 29/45] KVM: arm64: GICv3: Set ICH_HCR_EL2.TDIR when interrupts overflow LR capacity In-Reply-To: <51f5b5d7-9e98-40b8-8f8b-f50254573f3d@sirena.org.uk> References: <20251109171619.1507205-1-maz@kernel.org> <20251109171619.1507205-30-maz@kernel.org> <86cy5ku06v.wl-maz@kernel.org> <51f5b5d7-9e98-40b8-8f8b-f50254573f3d@sirena.org.uk> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: broonie@kernel.org, tabba@google.com, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, joey.gouly@arm.com, suzuki.poulose@arm.com, oupton@kernel.org, yuzenghui@huawei.com, christoffer.dall@arm.com, Volodymyr_Babchuk@epam.com, yaoyuan@linux.alibaba.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Mon, 24 Nov 2025 11:52:07 +0000, Mark Brown wrote: > > [1 ] > On Fri, Nov 14, 2025 at 03:02:32PM +0000, Marc Zyngier wrote: > > Fuad Tabba wrote: > > > On Sun, 9 Nov 2025 at 17:17, Marc Zyngier wrote: > > > > > + /* > > > > + * Note that we set the trap irrespective of EOIMode, as that > > > > + * can change behind our back without any warning... > > > > + */ > > > > + if (irqs_active_outside_lrs(als)) > > > > + cpuif->vgic_hcr |= ICH_HCR_EL2_TDIR; > > > > } > > > > I just tested these patches as they are on kvmarm/next > > > 2ea7215187c5759fc5d277280e3095b350ca6a50 ("Merge branch > > > 'kvm-arm64/vgic-lr-overflow' into kvmarm/next"), without any > > > additional pKVM patches. I tried running it with pKVM (non-protected) > > > and with just plain nVHE. In both cases, I get a trap to EL2 (0x18) > > > when booting a non-protected guest, which triggers a bug in > > > handle_trap() arch/arm64/kvm/hyp/nvhe/hyp-main.c:706 > > > > This trap is happening because of setting this particular trap (TDIR). > > > Just removing this trap from vgic_v3_configure_hcr() from the ToT on > > > kvmarm/next boots fine. > > > This is surprising, as I'm not hitting this on actual HW. Are you > > getting a 0x18 trap? If so, is it coming from the host? Can you > > correlate the PC with what the host is doing? > > FWIW I am seeing this on i.MX8MP (4xA53+GICv3): > > https://lava.sirena.org.uk/scheduler/job/2118713#L1044 There are worrying errors way before that, in the VMID allocator init, and I can't see what the GIC has to do with it. The issue Fuad reported was at run time, not boot time. so this really doesn't align with what you are seeing. M. -- Without deviation from the norm, progress is not possible.