From: tgh <tianguanhua@ncic.ac.cn>
To: Mark Williamson <mark.williamson@cl.cam.ac.uk>,
xen-devel@lists.xensource.com
Subject: Re: question about memory mapping and balloon
Date: Wed, 28 Mar 2007 08:46:07 +0800 [thread overview]
Message-ID: <4609BACF.9000009@ncic.ac.cn> (raw)
In-Reply-To: <4608BDD5.3030401@ncic.ac.cn>
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
>
>
next prev parent reply other threads:[~2007-03-28 0:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-26 20:48 Backend device not found error Adit Ranadive
2007-03-27 1:24 ` Akio Takebe
2007-03-27 16:18 ` Adit Ranadive
2007-03-27 23:58 ` Akio Takebe
2007-03-27 2:34 ` question about memory mapping and balloon tgh
2007-03-27 3:45 ` Mark Williamson
2007-03-27 6:46 ` tgh
2007-03-28 0:46 ` tgh [this message]
2007-03-28 2:11 ` Mark Williamson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4609BACF.9000009@ncic.ac.cn \
--to=tianguanhua@ncic.ac.cn \
--cc=mark.williamson@cl.cam.ac.uk \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.