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] Grant tables

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] Grant tables
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Sat, 5 Apr 2008 22:14:01 +0100
Cc: Carlo Bertoldi <mcbain@xxxxxxxxxx>
Delivery-date: Sat, 05 Apr 2008 14:14:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <47F73411.6010705@xxxxxxxxxx>
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: <47F648A6.3000104@xxxxxxxxxx> <20080404214240.GE4014@implementation> <47F73411.6010705@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.6 (enterprise 0.20070907.709405)
>  >> it's fine, except that I don't understand how to obtain the gref.
>
> IOW how can I build a grant reference from a domain?

The idea is that the domain you're mapping memory from will create a grant 
reference, then (somehow) tell your mapping code what that reference is.

For the split front/back drivers, the frontend picks a page to be used for the 
communications ring, grants it to the backend domain, and puts the grant 
reference into XenStore so the backend can map that page.

During IO, grant references can then be passed through the shared memory ring 
already established, which is more efficient.  This is how most of the driver 
code does things under Xen.

>  > To my knowledge, there is no user interface for that yet, you need to do
>  > it from the Linux kernel.
>
> I agree, can you provide some examples about that?

Take a look in the Xen Linux tree at the drivers/xen/blkfront/ for some 
creation of grant references.  As Samuel says, searching for grant table 
functions under drivers/xen/ is going to find you some interesting examples 
in various places.

hope that helps,
Cheers,
Mark


-- 
Push Me Pull You - Distributed SCM tool (http://www.cl.cam.ac.uk/~maw48/pmpu/)

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

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