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

Re: [Xen-devel] question about memory mapping and balloon



Thank you for your reply


Mark Williamson åé:
 In the paravirt case, guestos maintain its own mfn which need m2p and
p2m ,or xen manage these ?

The guest is aware of it's mfns.

The m2p table is a global machine frame -> pseudophysical frame mapping. Every guest uses this but is only privileged to update their portions of this. There's no requirement for it to be global but it saves space this way.

The p2m is maintained in the guest's private memory.
I do not understand clearly why does xen maintain m2p table and why should the related portion of m2p be exported to the guestOS,and what does guestOS do by using m2p

 I am confused about how does guestOS maintain its virt-to-physic and
physic-to-mach mapping ,in the linux ,there is only v2p mapping,
 how does guestOS maintain its p2m mapping ,

It's given initial information about its memory layout at boot time. It stores the p2m in a table and updates it when pages are transferred (e.g. by the balloon driver or by page flipping in the network device). Xen's global M2P table is mapped into the guest and it keeps this in sync by performing hypercalls to update it.
when a VM boot with memsize=512M ,its p2m maybe only 64M or something ,and when guest application request the memory,its virtual memory is mapped ,and when the application write some data into that memory,there is a page fault araised,and at that time guestOS update p2m and m2p and its page table(say virtual-to-machine address) ,is it right? or how do xen and guestOS deal with it?

could you help me
Thanks in advance





_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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