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] [PATCH] grant table and bogus mfns

To: Kieran Mansley <kmansley@xxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] grant table and bogus mfns
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Tue, 13 Nov 2007 04:48:17 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, samuel.thibault@xxxxxxxxxxxxx
Delivery-date: Mon, 12 Nov 2007 20:49:07 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1194860146.4174.29.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcglsGgJppfO5JGjEdyExAAX8io7RQ==
Thread-topic: [Xen-devel] [PATCH] grant table and bogus mfns
User-agent: Microsoft-Entourage/11.3.6.070618
On 12/11/07 09:35, "Kieran Mansley" <kmansley@xxxxxxxxxxxxxx> wrote:

>  1) dom0 does a grant op for a page of I/O memory; at this stage no
> different to a normal grant.
>  2) grant reference passed (e.g. through xenstore) to domU
>  3) domU performs a map operation on that grant
>  4) hypervisor notices that the grant is for an I/O memory page and
> instead of mapping it to a domU virtual address it instead sets up the
> I/O mem permissions for that domain to access the region (ie. calls
> iomem_permit_access())
>  5) domU can then call ioremap() to get a kernel virtual address for the
> I/O memory region, and access it as normal.

I didn't realise this was how it worked. I think it's a bad idea -- mapping
the grantref should map the I/O page. The mapping domain's io capabilities
should not be affected. Apart from being the obvious semantics for
map_grant, using the current scheme we cannot be sure when all mappings to
the granted page have gone away.

 -- Keir



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