|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-users] Re: [Xen-devel] Xen - Guest memory allocation
> I'm currently work on your idea and its cuming out as
> expected.
> Let me confirm,
> The domain builder inside dom0 calls populate_physmap(),
> allocates pages for domUs,
> and computes the following START_INFO_PAGE attributes
> pt_base, mfn_list and nr_pt_frames.
>
> But the source says, all the above attributes are VIRTUAL ADDRESSES
> and on the contrary the book, 'The defenitive guide for XEN hypervisor' says
> they are pseudo-physical addresses.
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
> I know these two are different. But I'm still not clear,
> Could you help me better understand the difference?
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).
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.
Why do you want to restrict DomU to use frames from certain range
only? What's the logic behind that?
Thanks
Gr(z)egor(z)
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|