diff mbox series

[v5,13/15] xen/arm32: Hardwire zeroeth_table_offset to 0 on ARM_32

Message ID 20250108151822.16030-14-alejandro.vallejo@cloud.com (mailing list archive)
State New
Headers show
Series Remove the directmap | expand

Commit Message

Alejandro Vallejo Jan. 8, 2025, 3:18 p.m. UTC
Include arm32 in 7c72147baa22("xen/arm: Restrict zeroeth_table_offset
for ARM_64"). Otherwise `va` overflows on shift in DECLARE_OFFSETS().

Fixes: 7c72147baa22("xen/arm: Restrict zeroeth_table_offset for ARM_64")
Signed-off-by: Alejandro Vallejo <alejandro.vallejo@cloud.com>
---
 xen/arch/arm/include/asm/lpae.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/xen/arch/arm/include/asm/lpae.h b/xen/arch/arm/include/asm/lpae.h
index 4a1679cb3334..d07456ffc8e3 100644
--- a/xen/arch/arm/include/asm/lpae.h
+++ b/xen/arch/arm/include/asm/lpae.h
@@ -259,7 +259,7 @@  lpae_t mfn_to_xen_entry(mfn_t mfn, unsigned int attr);
 #define first_table_offset(va)  TABLE_OFFSET(first_linear_offset(va))
 #define second_table_offset(va) TABLE_OFFSET(second_linear_offset(va))
 #define third_table_offset(va)  TABLE_OFFSET(third_linear_offset(va))
-#ifdef CONFIG_PHYS_ADDR_T_32
+#if defined(CONFIG_PHYS_ADDR_T_32) || defined(CONFIG_ARM_32)
 #define zeroeth_table_offset(va)  0
 #else
 #define zeroeth_table_offset(va)  TABLE_OFFSET(zeroeth_linear_offset(va))