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

[Xen-devel] [PATCH] Provide infrastructure changes for backends (and blk

To: linux-kernel@xxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Provide infrastructure changes for backends (and blkback) for 2.6.40
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Mon, 18 Apr 2011 11:20:10 -0400
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 18 Apr 2011 09:48:43 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1302795014-13289-1-git-send-email-konrad.wilk@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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1302795014-13289-1-git-send-email-konrad.wilk@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Thu, Apr 14, 2011 at 11:30:09AM -0400, Konrad Rzeszutek Wilk wrote:
> I've posted these patches in the past, and fixed some of the issues, and I 
> think
> there were reviewed. These five pathches are proposed for 2.6.40 to to allow 
> the
> Xen-pciback backend module to work.

And also the blkback backend. The attached patch allows the M2P override code
to deal with grants that do not have the GNTMAP_contains_pte flag set.

The change is pretty straightforward. The difficulty is more when we unmap the
grant and we need to call m2p_remove_override and pass the flag whether to clear
the PTE or not. On the map part it was quite easy to check the: 

map_ops[i].flags & GNTMAP_contains_pte

but that is not possible on the unmap (there are no .flags parameter on the 
unmap
grant). For simplicity and the use cases (the backends do not use those API
calss to setup grants, instead they use the m2p_* API calls directlly) we will
return -EOPNOTSUPP for !GNTMAP_contains_pte.

In the future we could keep track of the page and whether it had 
!GNTMAP_contains_pte
and make the decision whether to clear the PTE or not. One way to do this is to 
keep
an list of pages of the pages that have GNTMAP_contains_pte flag set (or 
vice-versa).


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