Skip to contentSkip to conversation

xen/arm64: config: Correctly define VMAP_VIRT_END

PATCH In review Peng Fan 3 participants 3 messages Jun 1, 2016 – Jun 2, 2016

lore
Share & tools
lore

Peng Fan

author
#0 lore raw

PATCH v2 1/1 xen/arm64: config: Correctly define VMAP_VIRT_END

The vmap initialization code (vm_init_type) will round down the end of the region to a page-aligned address.

On ARM64, the default vmap region is located between 1G and 2G. Based on the initialization code, the end address is excluded of the region.

Therefore the current definition of VMAP_VIRT_END will lead the vmap code to not use the last 4K of the region.

Fix it by defining VMAP_VIRT_END as "VMAP_VIRT_START + GB(1)".

Cc Julien Grall <[email protected]>
Cc Stefano Stabellini <[email protected]>

---

V2:
Take Julien's better commit message. Thanks.

 xen/include/asm-arm/config.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/include/asm-arm/config.h +1 -1
index 2d11b62..f92c0a0 100644
@@ -147,7 +147,7 @@
 #define SLOT0_ENTRY_SIZE  SLOT0(1)
 
 #define VMAP_VIRT_START  GB(1)
-#define VMAP_VIRT_END    (VMAP_VIRT_START + GB(1) - 1)
+#define VMAP_VIRT_END    (VMAP_VIRT_START + GB(1))
 
 #define FRAMETABLE_VIRT_START  GB(32)
 #define FRAMETABLE_SIZE        GB(32)
Signature · 7 lines
2.6.2


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Reviewed-by on v2 1/1
#1 lore raw

Hi Peng,

Quoted 7 lines · Peng Fan

The vmap initialization code (vm_init_type) will round down the end of the region to a page-aligned address.

On ARM64, the default vmap region is located between 1G and 2G. Based on the initialization code, the end address is excluded of the region.

Quoted 8 lines

Therefore the current definition of VMAP_VIRT_END will lead the vmap code to not use the last 4K of the region.

Fix it by defining VMAP_VIRT_END as "VMAP_VIRT_START + GB(1)".

Cc Julien Grall <[email protected]>
Cc Stefano Stabellini <[email protected]>

Regards,

Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#2 lore raw
Quoted 13 lines · Julien Grall

Hi Peng,

Quoted 10 lines · Peng Fan

The vmap initialization code (vm_init_type) will round down the end of the region to a page-aligned address.

On ARM64, the default vmap region is located between 1G and 2G. Based on the initialization code, the end address is excluded of the region.

Therefore the current definition of VMAP_VIRT_END will lead the vmap code to not use the last 4K of the region.

Quoted 7 lines
Quoted 5 lines

Fix it by defining VMAP_VIRT_END as "VMAP_VIRT_START + GB(1)".

Cc Julien Grall <[email protected]>
Cc Stefano Stabellini <[email protected]>

Added to my next-4.8 branch

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel