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

[Xen-devel] Difference between vmalloc_to_pfn and virt_to_pfn


I was trying to convert a virtual adrress in a HVM guest to the MFN.

I tried using vmalloc_to_pfn(virt_address) and then passed the resulting pfn to VMM through a hypercall. Inside the VMM I tried calling gfn_to_mfn(pfn) with pfn receieved from hypercall. This function always gave me INVALID_MFN error (~0UL).

When I replaced the vmalloc_to_pfn with virt_to_pfn(virt_address) I am getting some MFN value returned by gfn_to_mfn. Just to make sure, I passed the value to gmfn_to_mfn and I am getting the same value as returned by gfn_to_mfn.

Now my questions:

1. What is the difference between vmalloc_to_pfn and virt_to_pfn (apart from the fact that one is linux kernel function and the other is xen function) ?
2. Is there a way to verify/conform whether the MFN is correct ?


Xen-devel mailing list



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