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: "dinesh chandrasekaran" <dinesh_chan8@xxxxxxxxxxx>
Subject: Re: [Xen-users] Re: [Xen-devel] Xen - Guest memory allocation
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
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received: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; bh=KHnI/oHxK+WrS9eadfp08WnSX0v/FCRmvFopwHC268Q=; b=uTawB83MiirLmw0/1WVtZeZWWDngywpraWHj59z3SGzcBBk6IEqTfG0BphAogdCuPP k1VWcGTv7+B4dTDHjcYZPLyY+aSRZrsPMEltae5oU2VUq1zIWl2aq5g0JbpALpV9CfMG wQ3uZWRzfeIkPKkdByjeEMJnlf0w9XKgMUghg=
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=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <BAY111-W502AED56E34C3BF4DF3885B1A50@xxxxxxx>
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>
References: <BAY111-W502AED56E34C3BF4DF3885B1A50@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>                  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