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-devel] question about memory mapping and balloon

To: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] question about memory mapping and balloon
From: tgh <tianguanhua@xxxxxxxxxx>
Date: Tue, 27 Mar 2007 14:46:45 +0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 26 Mar 2007 23:45:34 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200703270445.16577.mark.williamson@xxxxxxxxxxxx>
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: <d2ad857f0703261348x4dd40b30y71d42f212326a3d6@xxxxxxxxxxxxxx> <460882BF.7000804@xxxxxxxxxx> <200703270445.16577.mark.williamson@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.7 (Windows/20060909)
Thank you for your reply
your explanation is helpful



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