Skip to contentSkip to conversation

arm64: Correct value returned by ESR_ELx_FSC_ADDRSZ_nL()

PATCH Applied Steven Price 3 participants 3 messages Jul 3 – Jul 21 arm64

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: Correct value returned by ESR_ELx_FSC_ADDRSZ_nL()

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")

---
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(-)
arch/arm64/include/asm/esr.h +1 -1
index 81c17320a588..f816f5d77f1a 100644
@@ -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)))
 
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Steven Price

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")
	M.
Signature · 1 line
Jazz isn't dead. It just smells funny.
maintainer Applied
#2 lore raw
In reply to Steven Price
Quoted 6 lines · Steven Price

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.

Applied to arm64 (for-next/fixes), thanks!

[1/1] arm64: Correct value returned by ESR_ELx_FSC_ADDRSZ_nL()

      https://git.kernel.org/arm64/c/b877075d0baa2

Cheers,

Signature · 5 lines
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev