[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 3/4] xen/arm: mm: Rename xenheap_* variable to directmap_*





On 07/09/2022 11:53, Henry Wang wrote:
-----Original Message-----
From: Julien Grall <julien@xxxxxxx>
Subject: Re: [PATCH v3 3/4] xen/arm: mm: Rename xenheap_* variable to
directmap_*

Hi Henry,

On 07/09/2022 09:36, Henry Wang wrote:
diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
index 7f5b317d3e..4a70ed2986 100644
--- a/xen/arch/arm/mm.c
+++ b/xen/arch/arm/mm.c
@@ -132,12 +132,12 @@ uint64_t init_ttbr;
   static paddr_t phys_offset;

   /* Limits of the Xen heap */
-mfn_t xenheap_mfn_start __read_mostly = INVALID_MFN_INITIALIZER;
-mfn_t xenheap_mfn_end __read_mostly;
-vaddr_t xenheap_virt_end __read_mostly;
+mfn_t directmap_mfn_start __read_mostly = INVALID_MFN_INITIALIZER;
+mfn_t directmap_mfn_end __read_mostly;
+vaddr_t directmap_virt_end __read_mostly;
   #ifdef CONFIG_ARM_64
-vaddr_t xenheap_virt_start __read_mostly;
-unsigned long xenheap_base_pdx __read_mostly;
+vaddr_t directmap_virt_start __read_mostly;
+unsigned long directmap_base_pdx __read_mostly;
   #endif

   unsigned long frametable_base_pdx __read_mostly;
@@ -609,7 +609,7 @@ void __init setup_xenheap_mappings(unsigned
long base_mfn,

I think the function also want to be renamed to match the code below.

Hmmm, renaming the name to "setup_directmap_mappings" would
somehow lead me to think of we are getting rid of the name "xenheap"
completely in the code, which seems a little bit scary to me...

But I just checked there is a comment
"/* Set up the xenheap: up to 1GB of contiguous, always-mapped memory."
above the function and the declaration so I guess we are fine?

We are not getting rid of "xenheap". In fact the common code will continue to use the concept.

What we make clear is this function is not only here to map the xenheap but other memory (e.g. static domain memory on arm64).

Cheers,

--
Julien Grall



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.