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

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

  • To: "dinesh chandrasekaran" <dinesh_chan8@xxxxxxxxxxx>
  • From: "Grzegorz Miłoś" <gm281@xxxxxxxxx>
  • Date: Fri, 20 Jun 2008 10:16:52 +0100
  • Cc: xen developers community <xen-devel@xxxxxxxxxxxxxxxxxxx>, xen users community <xen-users@xxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 20 Jun 2008 02:17:18 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=IXIHGU/m0z9vQISKoJr5ewBHYdmHSND2V9H3tG3KhBw8x9ifIrigJmU7s+ao5IoIX5 vdEebyGUeMbS4WaNFRhiVmJl06mJAFEjjCw5d2n8chB7zFijyo4i1oJjbjvtEMj9MZzC mv/Jp4suzoX24qvlvQxfX+QcVfZBMiiTwqCZE=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

>                  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?


Xen-devel mailing list



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