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

RE: [Xen-users] Re: [Xen-devel] Xen - Guest memory allocation




> 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

 


Rackspace

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