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

Re: [Xen-devel] Missing checks for xc_map_foreign_range() failure

To: tgh <wwwwww4187@xxxxxxxxxxx>
Subject: Re: [Xen-devel] Missing checks for xc_map_foreign_range() failure
From: Markus Armbruster <armbru@xxxxxxxxxx>
Date: Thu, 24 Jan 2008 10:52:54 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 24 Jan 2008 01:53:53 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4797F549.6070501@xxxxxxxxxxx> (tgh's message of "Thu\, 24 Jan 2008 10\:17\:45 +0800")
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <C2FDE025.1517A%Keir.Fraser@xxxxxxxxxxxx> <874pifrbko.fsf@xxxxxxxxxxxxxxxxx> <4797F549.6070501@xxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)
tgh <wwwwww4187@xxxxxxxxxxx> writes:

> hi
> what is the function of the xc_map_foreign_range(), what does it work
> for ? could you give me someexplanation or example about it , i
> encounter it in the code of xc_domain_save(), and confused about the
> function of it,could you help me
>
> Thanks in advance

xc_map_foreign_{range,pages,batch}() let you map another domain's
memory, similar to mmap().

xc_map_foreign_range() is the simplest of them: it maps a range of
memory starting at a mfn.  You typically map one page that way,
i.e. you pass PAGE_SIZE as size argument.

xc_domain_save() uses it to map the domain's shared info page.  That's
a well-known page, and its mfn can be found in the domain's info
obtained from xc_domain_getinfo().

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>