WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Difference between vmalloc_to_pfn and virt_to_pfn

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Difference between vmalloc_to_pfn and virt_to_pfn
From: Srujan Kotikela <ksrujandas@xxxxxxxxx>
Date: Tue, 28 Jun 2011 12:32:46 -0500
Delivery-date: Tue, 28 Jun 2011 10:35:38 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=1TO4bqs3cVuUfl8GGVEUoYXl2O/NPDMjW35dFuX5x7U=; b=O0xXEPFnIhhytxP+MooWi8F7pYdmAJ+vV2w2kta6MJuXg55MJNk9KjdI+3A3dMu/MM 7u4PoSuhTXnOs6YDP0xOKRST8eRoOxBAVwD1H96qKAWJXP+HO/jSEqY+bFXtc3l+j23f j3xwBw7xOuQmBF3QDIA5zYYsqdUQLNyJbHdnk=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

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 ?


_SDK

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>