From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: Questions about xen memory management Date: Thu, 8 Aug 2013 10:02:36 +0100 Message-ID: <52035EAC.2020500@citrix.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7098179872451953090==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Josh Zhao Cc: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org --===============7098179872451953090== Content-Type: multipart/alternative; boundary="------------040601000801050704070506" --------------040601000801050704070506 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit On 08/08/13 07:59, Josh Zhao wrote: > Hi, > I am reading the arm MM initial code, there are 2 questions I can't > understand: > 1) Both init_xenheap_pages() and init_domheap_pages() will invoke > init_heap_pages() to initialize pages management. But there is no > flag to know those pages are belonged to xenheap or domheap. Are > xenhelp and domheap in the same zone? xenheap pages have permanent mappings in the Xen virtual address space, so they can be accessed from anywhere in the code. domheap pages by default do not have mappings, and must be explicitly mapped to be used. For PV guests, Xen hand most of the virtual address space to the guest, so only the really critical memory can have permanent mappings. > > 2) What's the vmap.c used for ? I saw that only the ioremap will use > it. If so, it seems no needs to allocate pages to fill the all VMAP > range (256M - 1G) by alloc_domheap_page(). The domheap pages allocated here are also for tracking purposes, and are far fewer than the entire VMAP range. ~Andrew > > Thanks, > > > Josh > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel --------------040601000801050704070506 Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit
On 08/08/13 07:59, Josh Zhao wrote:
Hi,
I am reading the arm MM initial code, there are 2 questions I can't understand:
1)  Both init_xenheap_pages() and init_domheap_pages() will invoke init_heap_pages() to initialize pages management.  But there is no flag to know those pages are belonged to xenheap or domheap.  Are xenhelp and domheap in the same zone?

xenheap pages have permanent mappings in the Xen virtual address space, so they can be accessed from anywhere in the code.  domheap pages by default do not have mappings, and must be explicitly mapped to be used.

For PV guests, Xen hand most of the virtual address space to the guest, so only the really critical memory can have permanent mappings.


2) What's the vmap.c used for ? I saw that only the ioremap will use it.  If so, it seems no needs to allocate pages to fill the all VMAP range (256M -  1G) by alloc_domheap_page().

The domheap pages allocated here are also for tracking purposes, and are far fewer than the entire VMAP range.

~Andrew


Thanks,


Josh


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

--------------040601000801050704070506-- --===============7098179872451953090== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============7098179872451953090==--