From patchwork Tue Aug 20 10:37:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 13769908 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 700B0C531DF for ; Tue, 20 Aug 2024 10:39:23 +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:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=m2HT4aFJeUfUX6EC22uHtEC3/5P+F4bRbYRNmd65Wsg=; b=RGwGExVsLjhSFYV74dE5Vh9FYr NkcCcSldgLFd+fCiNlyJ+8sS49fP240/ehqNwLHZxRbuIIEk/1b/pxebDb5voqQCDw4VILJIRUlVn QLPvRNjVqVNRDIk6BQ7KdjpYi3rAHhei6hPAVyh9F3Li1RgaiCnMz/NU1AVT5NXIgjrQ9kzEBeUq9 CBP81Q2tf08ZHGFncloxIwmoWy2AscRLm+yObbw+JeUxDOYw8Qsu+nihv7Nds5afjOaEIojeHZDHg N45XKJRv2XsOCTfgWYBQldAg0ez0C2Y1YuokdqhC5UZOs/sKI4JL4yFOH0SxKcN1lsWmvIkH8YLFu ubXLUl3g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgMGe-00000004qPD-48Lo; Tue, 20 Aug 2024 10:39:12 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgMFb-00000004pux-2Bdf for linux-arm-kernel@lists.infradead.org; Tue, 20 Aug 2024 10:38:08 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id D263360DEC; Tue, 20 Aug 2024 10:38:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78BB1C4AF09; Tue, 20 Aug 2024 10:38:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724150286; bh=Qr6b5GYd96pu0YEgbNtFYok+p4sjzjCNIQpIrSoubus=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tgxN2LX/Ccpcw7L8lIIz0h4L1OxxbN7g7zs70nSoCg9o0F7Ahd+bwdQV9L70NE+/+ 1OuOpA0mebb67pWbX6oOnOoWhtnToPCIyOb5lK6vE2y17vEO1GuX4vi0fqh3XU7XEK jw7n49k3VoSDTVXPfzW0U5P9J8klr90Yl+Gw/I86dpgJlIjc3/sWOKa7LBUS9Qbezi YQgUyefzKg0vhNcHx3zing4R2djRfYJ8ZaQZM0grsUZg0xM22x1/qzGoUA5IOmhJCQ 1lZqhPsnDz2tgBR/ZwfHELTJ98zBkGG9iMQL7WAJio/md+JOS133mDjXLAxPKxaMMS Ca9gnkOs5dbfQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=valley-girl.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1sgMFY-005Ea3-Ow; Tue, 20 Aug 2024 11:38:04 +0100 From: Marc Zyngier To: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org Cc: James Morse , Suzuki K Poulose , Oliver Upton , Zenghui Yu , Joey Gouly , Alexandru Elisei , Anshuman Khandual , Przemyslaw Gaj Subject: [PATCH v4 04/18] arm64: Add ESR_ELx_FSC_ADDRSZ_L() helper Date: Tue, 20 Aug 2024 11:37:42 +0100 Message-Id: <20240820103756.3545976-5-maz@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240820103756.3545976-1-maz@kernel.org> References: <20240820103756.3545976-1-maz@kernel.org> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, james.morse@arm.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, yuzenghui@huawei.com, joey.gouly@arm.com, alexandru.elisei@arm.com, anshuman.khandual@arm.com, pgaj@cadence.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240820_033807_658796_14814ADB X-CRM114-Status: GOOD ( 11.97 ) 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 Although we have helpers that encode the level of a given fault type, the Address Size fault type is missing it. While we're at it, fix the bracketting for ESR_ELx_FSC_ACCESS_L() and ESR_ELx_FSC_PERM_L(). Signed-off-by: Marc Zyngier --- arch/arm64/include/asm/esr.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm64/include/asm/esr.h b/arch/arm64/include/asm/esr.h index 56c148890daf..d79308c23ddb 100644 --- a/arch/arm64/include/asm/esr.h +++ b/arch/arm64/include/asm/esr.h @@ -122,8 +122,8 @@ #define ESR_ELx_FSC_SECC_TTW(n) (0x1c + (n)) /* Status codes for individual page table levels */ -#define ESR_ELx_FSC_ACCESS_L(n) (ESR_ELx_FSC_ACCESS + n) -#define ESR_ELx_FSC_PERM_L(n) (ESR_ELx_FSC_PERM + n) +#define ESR_ELx_FSC_ACCESS_L(n) (ESR_ELx_FSC_ACCESS + (n)) +#define ESR_ELx_FSC_PERM_L(n) (ESR_ELx_FSC_PERM + (n)) #define ESR_ELx_FSC_FAULT_nL (0x2C) #define ESR_ELx_FSC_FAULT_L(n) (((n) < 0 ? ESR_ELx_FSC_FAULT_nL : \ @@ -161,6 +161,7 @@ /* ISS field definitions for exceptions taken in to Hyp */ #define ESR_ELx_FSC_ADDRSZ (0x00) +#define ESR_ELx_FSC_ADDRSZ_L(n) (ESR_ELx_FSC_ADDRSZ + (n)) #define ESR_ELx_CV (UL(1) << 24) #define ESR_ELx_COND_SHIFT (20) #define ESR_ELx_COND_MASK (UL(0xF) << ESR_ELx_COND_SHIFT)