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-users] Re: [Xen-devel] Xen - Guest memory allocation

To: Grzegorz Miłoś <gm281@xxxxxxxxx>, xen developers community <xen-devel@xxxxxxxxxxxxxxxxxxx>, xen users community <xen-users@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-users] Re: [Xen-devel] Xen - Guest memory allocation
From: dinesh chandrasekaran <dinesh_chan8@xxxxxxxxxxx>
Date: Fri, 20 Jun 2008 19:44:46 +0530
Delivery-date: Fri, 20 Jun 2008 07:15:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
Importance: Normal
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

> pt_base is a virtual address in DomU's virtual address space
> mfn_list is the list of _machine_ page numbers (not pseudophysical)
> assigned to the domain
> nr_pt_frames specifies how many pages have been used up to build the
> initial page tables for the domain

Thanks Milos.
 
> Having read the previous messages, I'm assuming you want to make sure
> that the machine pages assigned to DomU fall within certain machine
> range. If that's really your goal, you'll have to hack Xen sources
> rather then Dom0/tools, because it is Xen that assigns pages to DomU
> (via the populate_physmap call from Derek's email).

Absolutly. I never tried getting into Dom0/tools. I was working with xen/arch/x86/e820.c and xen/common/memory.c (as specified by Derek);

> In particular:
> populate_physmap() defined in xen/common/memory.c uses:
> alloc_domheap_pages() defined in xen/common/page_alloc.c which in turn calls:
> alloc_heap_pages() in page_alloc.c
> You will have to review this allocator to make sure that the returned
> pages satisfy your conditions.

Exactly. And alloc_heap_pages() calls map_alloc().
I tried hardcoding the machine addr_start and size (256MB) and create pages out of it inside populate_physmap();
But yet to make xen and test it. Hope that works (what do you think).

> Why do you want to restrict DomU to use frames from certain range
> only? What's the logic behind that?

Im trying to allocate memory for domUs from memory behind a PCI device. The machine_addr_start is obtained by probing the device (as I know the vendor and device info) during xen boot-up.

Thanks,
Dinesh C



WL Messenger : Stay connected to friends and family with the New Windows Live Messenger. Get it now. Try it now!
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel