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

Re: [Xen-devel] Memory strategy in xen



On 03/12/13 13:48, Yunbin Wang wrote:
Hi Andrew,
Thanks for your reply.

How does Xen map guest virtual address to machine physical address in PV mode?

In PV mode, guests are aware of VMM, and know the actual physical memory address assigned to them, so do they map guest virtual address to guest physical address first, and then map physical address to machine physical, OR they map virtual address to machine physical directly?

Thanks,
Yunbin Wang

Please do not drop xen-devel from CC, and please do not top-post.

Xen does not keep track of guest virtual address - that is the guests job to do.  Xen maintains the pagetables, but the PV guest has to ask Xen to update a PTE, and what value to update it to.

PV guests are aware that their physical address space is not contiguous, and have to take this into account for memory management purposes.

~Andrew



2013/11/18 Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
On 17/11/13 00:26, Yunbin Wang wrote:
Hi all,
I'm a newer to xen. But now I need to do research about live migration in xen. And now I'm confused with some questions:
1. Is shadowing page used in both paravirtualization and hvm mode? Since from source code xc_domain_save.c, I see the following code to get dirty memory bitmap,

frc = xc_shadow_control(
                    xch, dom, XEN_DOMCTL_SHADOW_OP_PEEK, HYPERCALL_BUFFER(to_skip),
                    dinfo->p2m_size, NULL, 0, NULL);

From domctl.h

/* Log-dirty bitmap operations. */
 /* Return the bitmap and clean internal copy for next round. */
#define XEN_DOMCTL_SHADOW_OP_CLEAN       11
 /* Return the bitmap but do not modify internal copy. */
#define XEN_DOMCTL_SHADOW_OP_PEEK        12

Shadow and logdirty are related, but not the same.  Shadow is certainly not expected to be used with PV guests (although a PV guest specifying autotranslate will be run with shadowing enabled).

~Andrew



2. The strategy about memory allocation in xen, I know that dom0 will get all available memory at first, and xen will allocate memory via balloon strategy to domU.

And now I need to know how balloon works?

Can anyone give me some ideas about questions above.

Thanks,
Yunbin Wang


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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