From: Keir Fraser Subject: Re: How to allocate a memory page in virtual memory, but does not use physical memory? Date: Fri, 11 Aug 2006 10:27:03 +0100 Message-ID: References: <4d616cca0608101827w216c92dakcccc22195071b8d6@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1646598438==" Return-path: In-Reply-To: <4d616cca0608101827w216c92dakcccc22195071b8d6@mail.gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Lily Huang , xen-devel List-Id: xen-devel@lists.xenproject.org > This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --===============1646598438== Content-type: multipart/alternative; boundary="B_3238136833_5701899" > This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --B_3238136833_5701899 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit On 11/8/06 2:27 am, "Lily Huang" wrote: > I am trying to allocate pages in a domU and map certain pages from Dom0. Since > the pages are already in dom0's physical memory, it is desired that domu only > allocate a "virtual space" for remapping, but does not need to use physical > memory allocated to domu. I tried function balloon_alloc_empty_page_range() > and alloc_pages(). But both of them seem to use physical memory once > allocation succeed. Balloon_empty_alloc_page_range() does what you want. It frees up the RAM which was previously mapped in the virtual address range that it returns to the caller. -- Keir --B_3238136833_5701899 Content-type: text/html; charset="US-ASCII" Content-transfer-encoding: quoted-printable Re: [Xen-devel] How to allocate a memory page in virtual memory, but= does not use physical memory?


On 11/8/06 2:27 am, "Lily Huang" <ushuanglily@gmail.com> wr= ote:

I am trying to allocate pages in a domU and map certain= pages from Dom0. Since the pages are already in dom0's physical memory, it = is desired that domu only allocate a "virtual space" for remapping= , but does not need to use physical memory allocated to domu. I tried functi= on balloon_alloc_empty_page_range() and alloc_pages(). But both of them seem= to use physical memory once allocation succeed.


Balloon_empty_alloc_page_range() does what you want. It frees up the RAM wh= ich was previously mapped in the virtual address range that it returns to th= e caller.

 -- Keir
--B_3238136833_5701899-- --===============1646598438== 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.xensource.com http://lists.xensource.com/xen-devel --===============1646598438==--