|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] Re: xc_translate_foreign_address() returns mfn??
On Fri, Dec 19, 2008 at 7:16 PM, Jun Koi <junkoi2004@xxxxxxxxx> wrote:
> Hi,
>
> I looked at the function xc_translate_foreign_address(), and see that
> it walks the page table of the guest VM. So at best, it should return
> the pfn of the guest (?)
>
> We can see taht the Later part of the function is like this:
> ...
> if (pt_levels >= 3)
> mfn = (pte & L0_PAGETABLE_MASK_PAE) >> PAGE_SHIFT;
> else
> mfn = (pte & L0_PAGETABLE_MASK) >> PAGE_SHIFT;
> ..
> return mfn;
>
> So perhaps I miss something, but the "mfn" here should be "pfn", so
> this function should return pfn, not mfn as in the comment of
> xenctrl.h.
>
> This makes me very confused now.
So everything indicates that xc_translate_foreign_address() actually
returns gfn, not mfn like in its comment. Could anybody confirms that
the function works well on both PV and HVM?
And I think xc_map_foreign_range() actually works with gfn, not mfn.
Does it work with both PV and HVM, too?
Thanks,
Jun
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|