Skip to contentSkip to conversation

linux-user: Don't reserve space for commpage for AArch64

PATCH In review Peter Maydell 2 participants 2 messages Mar 10, 2014 – Mar 12, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-user: Don't reserve space for commpage for AArch64

AArch64 Linux, unlike AArch32, doesn't use a commpage. This means we should not be reserving room in the guest address space for one. Fixes LP:1287195.

---
 linux-user/elfload.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
linux-user/elfload.c +4 -1
index c0687e3..cabfc14 100644
@@ -352,6 +352,9 @@ enum
     ARM_HWCAP_ARM_VFPv3D16  = 1 << 13,
 };
 
+#ifndef TARGET_AARCH64
+/* The commpage only exists for 32 bit kernels */
+
 #define TARGET_HAS_VALIDATE_GUEST_SPACE
 /* Return 1 if the proposed guest space is suitable for the guest.
  * Return 0 if the proposed guest space isn't suitable, but another
@@ -411,7 +414,7 @@ static int validate_guest_space(unsigned long guest_base,
 
     return 1; /* All good */
 }
-
+#endif
 
 #define ELF_HWCAP get_elf_hwcap()
 
Signature · 1 line
1.9.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Peter Maydell

AArch64 Linux, unlike AArch32, doesn't use a commpage. This means we should not be reserving room in the guest address space for one. Fixes LP:1287195.

Looks good,

Quoted 31 lines
---
 linux-user/elfload.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
linux-user/elfload.c +4 -1
index c0687e3..cabfc14 100644
@@ -352,6 +352,9 @@ enum
     ARM_HWCAP_ARM_VFPv3D16  = 1 << 13,
 };
 
+#ifndef TARGET_AARCH64
+/* The commpage only exists for 32 bit kernels */
+
 #define TARGET_HAS_VALIDATE_GUEST_SPACE
 /* Return 1 if the proposed guest space is suitable for the guest.
  * Return 0 if the proposed guest space isn't suitable, but another
@@ -411,7 +414,7 @@ static int validate_guest_space(unsigned long guest_base,
 
     return 1; /* All good */
 }
-
+#endif
 
 #define ELF_HWCAP get_elf_hwcap()
 
Signature · 1 line
1.9.0