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

Re: [Xen-devel] Distinguishing gpfn, gmfn, mfn, and pfn

On Wed, May 29, 2013 at 8:27 AM, Keir Fraser <keir.xen@xxxxxxxxx> wrote:
> On 29/05/2013 02:03, "Sengul Thomas" <thomas.sengul@xxxxxxxxx> wrote:
>> Hi xen developers,
>> I'm confused about the actual usage of the four types of frames.
>> I can find the definition in xen/include/xen/mm.h, but would like
>> to check my understanding is correct:
>> 1) Is 2-stage MMU-supported (e.g., ARMv7 VE) translation
>>     auto-translated mode? Then, gpfn == gmfn.
>> 2) Is gmfn --> mfn mapping the p2m table?
>> 3) Paravirtualized x86 guest will have gpfn != gmfn, and it is
>>     quite hard to imagine. Could you tell me the difference
>>     between gpfn and gmfn? (for instance, when it is used)
> There are basically two modes:
>  gmfn==gpfn: Guest does not see real machine physical addresses. p2m is done
> by the hypervisor. This is like x86 HVM guests.
>  gmfn==mfn: Guest does see real machine physical addresses. Typically the
> guest will have its own concept of a flat pseudophysical address space that
> it maps to real machine addresses with its own p2m table. This is like x86
> pure PV guests.
> ARM7 VE does indeed support HVM for ARM, and gmfn==gpfn.

This is just to do with the functions in that file, right?  A lot of
times in the Xen code "gmfn" refers to "an mfn (from Xen's
perspective) owned by the guest" -- as opposed to one owned by Xen.

e.g., in xen/arch/x86/mm/shadow/multi.c, you get lines like this:

    gfn = guest_l1e_get_gfn(new_gl1e);
    gmfn = get_gfn_query_unlocked(v->domain, gfn_x(gfn), &p2mt);

gfn in this case is "what the guest had in its page table", and gmfn
is "the mfn corresponding to that gfn".


Xen-devel mailing list



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