Hi Stefano,
On 16/06/2017 00:12, Stefano Stabellini wrote:
On Tue, 13 Jun 2017, Julien Grall wrote:
Add more safety when using xenheap_mfn_*.
Signed-off-by: Julien Grall <julien.gr...@arm.com>
---
xen/arch/arm/mm.c | 16 ++++++++--------
xen/arch/arm/setup.c | 18 +++++++++---------
xen/include/asm-arm/mm.h | 11 ++++++-----
3 files changed, 23 insertions(+), 22 deletions(-)
diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
index 0014c24ecc..fb01f01879 100644
--- a/xen/arch/arm/mm.c
+++ b/xen/arch/arm/mm.c
@@ -138,8 +138,8 @@ uint64_t init_ttbr;
static paddr_t phys_offset;
/* Limits of the Xen heap */
-unsigned long xenheap_mfn_start __read_mostly = ~0UL;
-unsigned long xenheap_mfn_end __read_mostly;
+mfn_t xenheap_mfn_start __read_mostly = INVALID_MFN;
+mfn_t xenheap_mfn_end __read_mostly;
The patch is fine, but given that xenheap_mfn_end is unused on arm64, I
would like to make it arm32 only.
See my answer on patch #3, I would like to limit the #ifdefery and it is
better to bound a region with start/end.
Hopefully, at some point we could make the xenheap code very similar on
both ARM64 and ARM32.
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel