|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] question about memory mapping and balloon
> 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 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.
> and when a virt address is
> put into a mmu, does cpu hardware convert virt-addr into machine address
> or guest's phyiscal address?
To the machine address, since the CPU is not aware that virtualisation is
occuring. [1]
The guest is responsible for making sure the correct machine addresses are put
into its page tables (although Xen won't let it put machine addresses into
the page tables that it shouldn't have access to!).
> another one
> does xen in hvm case support balloon for modifying the vm memory size or
> not?
Not yet, but I believe it's planned.
Note [1]: although the CPU can't currently do the
virtual->pseudophysical->machine translation, this is a planned feature of
future AMD and Intel virtualisation-aware processors. It's sometimes
referred to as "nested paging". Other architectures (e.g. zSeries, I
suspect) may support this type of functionality already.
Cheers,
Mark
>
> I am confused about it
>
> could you help me
> Thanks in advance
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
--
Dave: Just a question. What use is a unicyle with no seat? And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|