All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2] xen/arm64: config: Correctly define VMAP_VIRT_END
@ 2016-06-01  7:51 Peng Fan
  2016-06-02 11:48 ` Julien Grall
  0 siblings, 1 reply; 3+ messages in thread
From: Peng Fan @ 2016-06-01  7:51 UTC (permalink / raw)
  To: sstabellini, julien.grall; +Cc: van.freenix, xen-devel

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

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: Julien Grall <julien.grall@arm.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
---

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

 xen/include/asm-arm/config.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/include/asm-arm/config.h b/xen/include/asm-arm/config.h
index 2d11b62..f92c0a0 100644
--- a/xen/include/asm-arm/config.h
+++ b/xen/include/asm-arm/config.h
@@ -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)
-- 
2.6.2


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH V2] xen/arm64: config: Correctly define VMAP_VIRT_END
  2016-06-01  7:51 [PATCH V2] xen/arm64: config: Correctly define VMAP_VIRT_END Peng Fan
@ 2016-06-02 11:48 ` Julien Grall
  2016-06-02 14:51   ` Stefano Stabellini
  0 siblings, 1 reply; 3+ messages in thread
From: Julien Grall @ 2016-06-02 11:48 UTC (permalink / raw)
  To: Peng Fan, sstabellini; +Cc: xen-devel

Hi Peng,

On 01/06/16 08:51, Peng Fan wrote:
> 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)".
>
> Signed-off-by: Peng Fan <van.freenix@gmail.com>
> Cc: Julien Grall <julien.grall@arm.com>
> Cc: Stefano Stabellini <sstabellini@kernel.org>

Reviewed-by: Julien Grall <julien.grall@arm.com>

Regards,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH V2] xen/arm64: config: Correctly define VMAP_VIRT_END
  2016-06-02 11:48 ` Julien Grall
@ 2016-06-02 14:51   ` Stefano Stabellini
  0 siblings, 0 replies; 3+ messages in thread
From: Stefano Stabellini @ 2016-06-02 14:51 UTC (permalink / raw)
  To: Julien Grall; +Cc: Peng Fan, sstabellini, xen-devel

On Thu, 2 Jun 2016, Julien Grall wrote:
> Hi Peng,
> 
> On 01/06/16 08:51, Peng Fan wrote:
> > 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)".
> > 
> > Signed-off-by: Peng Fan <van.freenix@gmail.com>
> > Cc: Julien Grall <julien.grall@arm.com>
> > Cc: Stefano Stabellini <sstabellini@kernel.org>
> 
> Reviewed-by: Julien Grall <julien.grall@arm.com>

Added to my next-4.8 branch

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-02 14:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-01  7:51 [PATCH V2] xen/arm64: config: Correctly define VMAP_VIRT_END Peng Fan
2016-06-02 11:48 ` Julien Grall
2016-06-02 14:51   ` Stefano Stabellini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.