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

Re: [Xen-devel] The different between map_pages_to_xen and mfn_to_virt



At 08:33 +0000 on 26 Feb (1361867621), Jan Beulich wrote:
> >>> On 25.02.13 at 21:41, Xinxin Jin <xinxinjin89@xxxxxxxxx> wrote:
> > I have some confusion about the purpose of the two functions.
> > map_pages_to_xen is to map machine page range in Xen virtual address space.
> > mfn_to_virt() is to convert between machine frame number and xen-heap
> > virtual address. So what is the difference? When I need to map some machine
> > pages to Xen space, which function should I use? Thanks,
> 
> You describe the difference yourself - one function establishes a
> mapping, while the other only does a translation assuming that
> the 1:1 mapping for the given MFN was already established (at
> boot time, or during memory hotplug processing).

Also, if the pages you're trying to map are ordinary RAM, you should use
map_domain_page() to map them and unmap_domain_page() when you're done.

Tim.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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