From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E6248606A31A for ; Wed, 2 Dec 2026 13:31:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=3+x3eWI5; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=HONSmpaD 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:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=UtEd2CrJgJmu4q8RrFinVAuztUYFtp8TbPz98ZYl3JQ=; b=3+x3eWI5uDU8YaDth8xF6X4zTN GFbQ2J1HbtP5nocYJJbOYnOADAWrtMPTCSW6g9p1kZe7LZbpfigREVLkVtZMJByMKbBRNL/92RDfL 7oCCD4PlvNRuFYwK7n7u7w+R+wQNw424FyHzl8Ms6SYK0oHmVU66tUQaxMnXgE6rl8AUEfP4TmYs+ fSl34/0e1oBgT/fYvu05wlNJ2N9KNjNja5GwclOXLwLwgL0pHCzwKxCG6Vo4XgYv+jjvJChiUUJnA 2TVggXGsybnSUWSGrix0FUec53E2ESUaPt1vvzE1XLFhDImYm1L1RrAAP5oLLiykxcPqPpN4XIAFU XOOWluyw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYkQF-0000000BbH9-2gTN; Wed, 02 Dec 2026 13:30:59 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYkQE-0000000BbH2-3rTM for linux-arm-kernel@lists.infradead.org; Wed, 02 Dec 2026 13:30:59 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 4601243EBC; Wed, 2 Dec 2026 13:30:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 02EE81F00897; Wed, 2 Dec 2026 13:30:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796218258; bh=UtEd2CrJgJmu4q8RrFinVAuztUYFtp8TbPz98ZYl3JQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=HONSmpaDCW1Kv9WV9bFP+NKBj+/DAxyS09EZbkNU5nqeC2IaiElB8ZCNGpQkx/6Xc eapPE46lqm1U2hE5Z7kY7vw9DK7aNEAoitePWbFI+18kK+bucpPNSZv1f1UT7LSWmp UtIDUF9cf9LEE3QyLyZAT9aJRknfLrc40y1RR3JEoSIWIlyD44icx0NntFVNDPYhxE pySQQ9SyX6ClnrGVMrokMG+lEyjhVYulnFZFl77fjSue01KA75NILKgs3r9e+gM1Kt oDfJFzHM809cKKFTOscm1VSVVqC/B4MK8aeYNe4sOj/pAoTrslK21tbydLKtPU9rqm VfTg1/Zc6aC4Q== 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 1xYkQB-000000067ta-1Xc1; Wed, 02 Dec 2026 13:30:55 +0000 Date: Wed, 02 Dec 2026 13:30:54 +0000 Message-ID: <86cxrjyfld.wl-maz@kernel.org> From: Marc Zyngier To: Oliver Upton Cc: Catalin Marinas , Will Deacon , Sven Peter , Janne Grunau , Thomas Gleixner , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Fuad Tabba , Joey Gouly , Steffen Eiden , Suzuki K Poulose , Zenghui Yu , Mark Rutland , Neal Gompa , Radu Rendec , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , James Clark , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, asahi@lists.linux.dev, linux-perf-users@vger.kernel.org Subject: Re: [PATCH 1/4] KVM: arm64: Track IRQ and FIQ exceptions separately In-Reply-To: <20261201204502.1813335-2-oupton@kernel.org> References: <20261201204502.1813335-1-oupton@kernel.org> <20261201204502.1813335-2-oupton@kernel.org> 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) X-Archived-By: 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: oupton@kernel.org, catalin.marinas@arm.com, will@kernel.org, sven@kernel.org, j@jannau.net, tglx@kernel.org, peterz@infradead.org, mingo@redhat.com, acme@kernel.org, namhyung@kernel.org, fuad.tabba@linux.dev, joey.gouly@arm.com, seiden@linux.ibm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, mark.rutland@arm.com, neal@gompa.dev, radu@rendec.net, alexander.shishkin@linux.intel.com, jolsa@kernel.org, irogers@google.com, adrian.hunter@intel.com, james.clark@linaro.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, asahi@lists.linux.dev, linux-perf-users@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-10.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Tue, 01 Dec 2026 20:44:59 +0000, Oliver Upton wrote: [...] > diff --git a/arch/arm64/kvm/hyp/entry.S b/arch/arm64/kvm/hyp/entry.S > index 9709905f21b5..7d38bae49d31 100644 > --- a/arch/arm64/kvm/hyp/entry.S > +++ b/arch/arm64/kvm/hyp/entry.S > @@ -48,7 +48,13 @@ alternative_else_nop_endif > // synchronization event so that callers don't need ISBs for anything > // that would usually be synchronized by the ERET. > isb > + > + // Both a FIQ and IRQ could be pending. Arbitrarily give precedence > + // to reporting a pending FIQ. > mov x0, #ARM_EXCEPTION_IRQ > + mov x2, #ARM_EXCEPTION_FIQ > + tst x1, #ISR_EL1_F > + csel x0, x2, x0, ne I think this has the potential of going wrong on an NMI capable platform. Not that we support that yet, but it is around the corner. I also wonder if we should simply re-encode the exception types to better align with ISR_EL1. In any case, something like: orr x1, x1, x1, lsr #(ISR_EL1_FS_SHIFT - ISR_EL1_F_SHIFT) tst x1, #ISR_EL1_F csel x0, x2, x0, ne should do the trick. Thanks, M. -- Without deviation from the norm, progress is not possible.