From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 652EB32E729 for ; Fri, 3 Jul 2026 13:48:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783086530; cv=none; b=Sgjy8HPaRyzG4bZN1v3i4vemtoGI1dtVCXfvzllyS0L8uliJp2FBtwo4YBZJ2PZgiYhagMLox1anlMfHhDLBPnG6cGNhJdpXidQl9ypJY4vniE4HurndYEgFtrlWlyE/3Nueb3Z2n3UDz1txsnII30YIsaPRl4GKxdU9g4fE19s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783086530; c=relaxed/simple; bh=XxkgONwo/+IxkTEmohscjRa0/9XApUUoF/50Es1jlUk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=HwhatHb2hC5X8jk1TWewV/43GXqMin+UfqeEiNt/MdLFGwQO/RkVS1wJqnkKqrxbIO2cr3yC5FydXm1S65i4FZ6v43vowORsUBwlt1VsT8neRSxRwKl9YG7Y6E5WEHBkjjImDE15HmS42Iyy/rpwTJA8p8jwU4Xa+THiCvsbEb0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=rGnfz1ja; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="rGnfz1ja" Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B0C861570; Fri, 3 Jul 2026 06:48:41 -0700 (PDT) Received: from e122027.cambridge.arm.com (e122027.cambridge.arm.com [10.1.29.35]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 600693FAA1; Fri, 3 Jul 2026 06:48:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1783086526; bh=XxkgONwo/+IxkTEmohscjRa0/9XApUUoF/50Es1jlUk=; h=From:To:Cc:Subject:Date:From; b=rGnfz1jaa2REG4VHXxh0ZrShg9jIeFdm4kN/hwpHtggoCLgHNtEO2mfY8nlgs38hH 65ePFicQWL75k60ZmR/y4cuWJzs0ka/It+VEX2UHPsbzbXe7IyQEG4rSgj6z2xVXdD 1BS0VobwZNdZF/5AhaG54//HWkPYGH3m8IJ7tjXU= From: Steven Price To: Catalin Marinas , Will Deacon Cc: Steven Price , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Marc Zyngier , Oliver Upton Subject: [PATCH] arm64: Correct value returned by ESR_ELx_FSC_ADDRSZ_nL() Date: Fri, 3 Jul 2026 14:48:35 +0100 Message-ID: <20260703134837.100109-1-steven.price@arm.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Address size fault, level -1 is encoded as 0b101001 or 0x29 according to the Arm ARM. Correct the value to match the spec. This also matches the offset of "level -1 address size fault" in the fault_info array in fault.c. Fixes: fb8a3eba9c81 ("KVM: arm64: Only read HPFAR_EL2 when value is architecturally valid") Signed-off-by: Steven Price --- The following hideous link takes you to the relevant chapter of the Arm ARM: https://developer.arm.com/documentation/ddi0487/mc/-Part-D-The-AArch64-System-Level-Architecture/-Chapter-D24-AArch64-System-Register-Descriptions/-D24-2-General-system-control-registers/-D24-2-44-ESR-EL1--Exception-Syndrome-Register--EL1-?lang=en --- arch/arm64/include/asm/esr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/esr.h b/arch/arm64/include/asm/esr.h index 81c17320a588..f816f5d77f1a 100644 --- a/arch/arm64/include/asm/esr.h +++ b/arch/arm64/include/asm/esr.h @@ -131,7 +131,7 @@ * Annoyingly, the negative levels for Address size faults aren't laid out * contiguously (or in the desired order) */ -#define ESR_ELx_FSC_ADDRSZ_nL(n) ((n) == -1 ? 0x25 : 0x2C) +#define ESR_ELx_FSC_ADDRSZ_nL(n) ((n) == -1 ? 0x29 : 0x2C) #define ESR_ELx_FSC_ADDRSZ_L(n) ((n) < 0 ? ESR_ELx_FSC_ADDRSZ_nL(n) : \ (ESR_ELx_FSC_ADDRSZ + (n))) -- 2.43.0