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

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

To: xen developers community <xen-devel@xxxxxxxxxxxxxxxxxxx>, xen users community <xen-users@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-users] Re: [Xen-devel] Xen - Guest memory allocation
From: dinesh chandrasekaran <dinesh_chan8@xxxxxxxxxxx>
Date: Fri, 20 Jun 2008 08:04:03 +0530
Delivery-date: Thu, 19 Jun 2008 19:34:30 -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

Thank you Derek,

                 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.

I know these two are different. But I'm still not clear,
Could you help me better understand the difference?

Dinesh C
           

> Date: Mon, 16 Jun 2008 23:09:31 +0100
> From: Derek.Murray@xxxxxxxxxxxx
> To: dinesh_chan8@xxxxxxxxxxx
> Subject: Re: [Xen-users] Re: [Xen-devel] Xen - Guest memory allocation
> CC: xen-devel@xxxxxxxxxxxxxxxxxxx; xen-users@xxxxxxxxxxxxxxxxxxx
>
> Hi Dinesh,
>
> The pages that are used for a DomU's memory are allocated when the
> domain builder (in Dom0) calls xc_domain_populate_physmap(), which
> executes a hypercall and ultimately calls populate_physmap() in
> xen/common/memory.c.
>
> I'm not terribly familiar with this code, but it looks like it might
> be possible to hack in a replacement to achieve your desired effect.
>
> Regards,
>
> Derek Murray.
>
> On Mon, Jun 16, 2008 at 10:52 PM, dinesh chandrasekaran
> <dinesh_chan8@xxxxxxxxxxx> wrote:
> >
> >>> by default, dom0 gets all the available memory (usable physical memory-
> >>> xen hypervisor). Then, when domU starts up, xen will decrease
> >>> dom0'sallocation >> via ballooning and allocate them to domU.
> >
> > Yes weiming you are correct. But ballooning could be disabled.
> >
> >>>Do you want to specify the exact physical memory address space used by
> >>> domU?
> >
> > Yes absolutly. Could that be done? (Hope by physical address you mean the
> > real/machine/RAM address)
> > If so should I have to edit xen source or Dom0 source.
> >
> > Thanks,
> > Dinesh C
> >
> >
> > ________________________________
> > Date: Mon, 16 Jun 2008 15:39:13 -0400
> > From: zephyr.zhao@xxxxxxxxx
> > To: dinesh_chan8@xxxxxxxxxxx
> > Subject: Re: [Xen-users] Re: [Xen-devel] Xen - Guest memory allocation
> > CC: xen-devel@xxxxxxxxxxxxxxxxxxx; xen-users@xxxxxxxxxxxxxxxxxxx
> >
> > by default, dom0 gets all the available memory (usable physical memory - xen
> > hypervisor). Then, when domU starts up, xen will decrease dom0's allocation
> > via ballooning and allocate them to domU.
> >
> > Do you want to specify the exact physical memory address space used by domU?
> >
> > On Mon, Jun 16, 2008 at 2:37 PM, dinesh chandrasekaran
> > <dinesh_chan8@xxxxxxxxxxx> wrote:
> >
> > Yes, ofcourse dom0 can see this range.
> >
> > But all the domUs memory has to fall in this restricted memory range (as
> > specified by mypci_usabe)?
> >
> > for example,
> > If I start three virtual machines, say VM1, VM2, VM3 with 64MB memory each,
> > how could I make sure that, the total 192MB for three VMs lie somewhere in
> > mypci_usable range only and not anywhere else.
> >
> > Thanks,
> > Dinesh C
> >
> > ________________________________
> > Date: Thu, 12 Jun 2008 22:37:17 -0400
> > From: zephyr.zhao@xxxxxxxxx
> > To: dinesh_chan8@xxxxxxxxxxx
> > Subject: Re: [Xen-users] Re: [Xen-devel] Xen - Guest memory allocation
> > CC: xen-devel@xxxxxxxxxxxxxxxxxxx; xen-users@xxxxxxxxxxxxxxxxxxx
> >
> > Can dom0 address the whole memory space if no other domU running? If so, it
> > can freely allocate memory to other guests.
> >
> > On Thu, Jun 12, 2008 at 3:34 PM, dinesh chandrasekaran
> > <dinesh_chan8@xxxxxxxxxxx> wrote:
> >
> > Thanks Weiming,
> >
> > But did the same by editing the e820.c. That is,
> > after xen boots up, if I type 'xm dmesg' I could find my output which is
> > (000000000fff000000 - 00000000ffffffff (mypci_usable)).
> >
> > I couldn't find the exact place in xen source where the memory allocation
> > for DomU guests are performed.
> >
> > Now how can I make XEN use the above (mypci_usable) memory range to allocate
> > memory for all its DomU guests.
> >
> > Thanks in advance
> > Dinesh C
> >
> >
> > ________________________________
> > Date: Fri, 6 Jun 2008 15:12:49 -0400
> > From: zephyr.zhao@xxxxxxxxx
> > To: dinesh_chan8@xxxxxxxxxxx
> > CC: xen-devel@xxxxxxxxxxxxxxxxxxx; xen-users@xxxxxxxxxxxxxxxxxxx
> > Subject: [Xen-users] Re: [Xen-devel] Xen - Guest memory allocation
> >
> > I'm not very sure about your problem. Can the Hypervisor address the whole
> > 5GB space? If yes, it can then allocate any of them to guests.
> >
> > Or you can modify the 'start info' passed to Guest OS. You can change the
> > page_nr, a machine-PFN translation table to enable the guest to address the
> > memory space that you want. It's weird.
> >
> > On Fri, Jun 6, 2008 at 2:57 PM, dinesh chandrasekaran
> > <dinesh_chan8@xxxxxxxxxxx> wrote:
> >
> > YES.
> >
> > But if I want to add memory of type E820_USABLE to xen memory map
> > during boot up (as per xen/e820.c) where the memory to be added lies behind
> > a PCI device?
> >
> > For ex,
> > If a PCI device reports it has 1GB of memory behind it.
> > And XEN has identified th RAM memory to be 4GB.
> >
> > How can the PCI - 1GB can be added as usable memory to XEN's memory pool to
> > get a cumulative size of 5GB;
> >
> > thanks,
> > Dinesh C
> >
> > On Fri, Jun 6, 2008 at 3:00 PM, Weiming wrote:
> >
> > AFAIK, In para virtualization, when guest boots, it reads the memorylayout
> > from a special page (start info page) instead of from bios.
> > If your guest os is a PV Linux, you can check its source code (e.g.
> > start_kernel(), etc.)
> >
> > Thanks,
> > Weiming
> >
> > On Fri, Jun 6, 2008 at 2:00 PM, dinesh chandrasekaran
> > <dinesh_chan8@xxxxxxxxxxx> wrote:
> >
> >
> >
> > ________________________________
> > CoolHotmail : Your crazy personality deserves a unique email identity like
> > yourname@xxxxxxxxxxxx Choose from this and hundreds other unique email ids
> > now Try it!
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@xxxxxxxxxxxxxxxxxxx
> > http://lists.xensource.com/xen-devel
> >
> >
> >
> > ________________________________
> > CoolHotmail : Your crazy personality deserves a unique email identity like
> > yourname@xxxxxxxxxxxx Choose from this and hundreds other unique email ids
> > now Try it!
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@xxxxxxxxxxxxxxxxxxx
> > http://lists.xensource.com/xen-devel
> >
> >
> >
> > ________________________________
> > Skydrive - Get 5GB online space for FREE!. Store and share music, photos and
> > documents online with ease. Try it now!
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@xxxxxxxxxxxxxxxxxxx
> > http://lists.xensource.com/xen-devel
> >
> >
> >
> > ________________________________
> > Placements ? No Problem. Register Here! Try it!
> >
> > ________________________________
> > 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
> >
> >
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel


Live.in : Get your yourname@xxxxxxx email id today. Powered by Windows Live Hotmail. Check it out!


CoolHotmail : Your crazy personality deserves a unique email identity like yourname@xxxxxxxxxxxx Choose from this and hundreds other unique email ids now Try it!
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel