WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] How to allocate a memory page in virtual memory, but doe

To: Lily Huang <ushuanglily@xxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] How to allocate a memory page in virtual memory, but does not use physical memory?
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Fri, 11 Aug 2006 10:27:03 +0100
Delivery-date: Fri, 11 Aug 2006 02:27:37 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4d616cca0608101827w216c92dakcccc22195071b8d6@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Aca9KE3njGxepSkbEdu4bwAKle7CWA==
Thread-topic: [Xen-devel] How to allocate a memory page in virtual memory, but does not use physical memory?
User-agent: Microsoft-Entourage/11.2.5.060620



On 11/8/06 2:27 am, "Lily Huang" <ushuanglily@xxxxxxxxx> 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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>