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 Table problem mapping dom0 mem to domU

To: "Derek Murray" <Derek.Murray@xxxxxxxxxxxx>, kmansley@xxxxxxxxxxxxxx
Subject: Re: [Xen-devel] Grant Table problem mapping dom0 mem to domU
From: "Carlos-Rene Perez" <carlosrene@xxxxxxxxx>
Date: Wed, 25 Jul 2007 12:58:03 -0400
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 25 Jul 2007 09:55:44 -0700
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=k/hxp3UfUdyQPF9cTCUaF0k9BU2mG3G7I3CZ6IkDlRvHXZa+cIB5qtCxKSl5tbXtzW86UkIUpftMpAefd3RG8vezVVgJLw/7SnK0BWtoHjMaU4/pL6TInROPBC6XukcGiGt4t0RPZFTorPK21xgwBlO58M0Q+DAl8jEzjAooxDA=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Ju0GxwLS769mSl85y6jjBa+b4RcwOZOgma/0u8sDy2z6YnBUuNAxhkQ/lf/SSN3jwRtEi2Hb5XJURUCP/Ag1oeCSgLgWpXStGFyVOR3NlzTIIKafRAQ11IDrr6qhZUXUfEeKN6GsQgyxisCM9Iplx2LOtjFkJrwN0oWBw8KbrX0=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <2F501D08-61AB-40A2-8323-3847B0E60D7D@xxxxxxxxxxxx>
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: <b1d0d6970707250841l78130aft39c79effa4552763@xxxxxxxxxxxxxx> <2F501D08-61AB-40A2-8323-3847B0E60D7D@xxxxxxxxxxxx>
Reply-to: carlos@xxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thanks guys, that totally solved the problem.

On 7/25/07, Derek Murray <Derek.Murray@xxxxxxxxxxxx> wrote:
Hi Carlos,

The problem you are facing is that the grant_operation_permitted()
test (in the GNTTABOP_map_grant_ref case of the do_grant_table_op
function in xen/common/grant_table.c) is failing. At present, only
domains with iomem permissions can map grant references: typically,
the only such domain is dom0. This is due to a TLB flush issue which
was addressed in a recent patchset from Kieran Mansley. You can
either try giving some dummy iomem privileges to your domU, or change
the definition of grant_operation_permitted(d) to 1, so that it
always succeeds.

Regards,

Derek Murray.

On 25 Jul 2007, at 16:41, Carlos Perez wrote:

> I've been looking through some back-end drivers and I notice that
> grant tables are used to map domU memory into the privileged domain,
> is the opposite possible? Can I map dom0 memory into a domU?
>
> I've written code grants foreign access to a page from dom0 (take the
> grant ref_id) then on domU I try to map it (basically the same way ex
> blkback does it, or just any other driver for that matter) and all I
> get from HYPERVISOR_grant_table_op() is a -1 return value, op.status
> is empty=0.
>
> I'll send more information on the specific error, if I at least know
> that this can be done and I'm just not falling of a cliff. Also, if it
> is possible, can you point me to some example code?
>
> thanks,
> C. René
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel


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

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

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