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: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] grant table and bogus mfns
From: Kieran Mansley <kmansley@xxxxxxxxxxxxxx>
Date: Tue, 13 Nov 2007 17:06:24 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 13 Nov 2007 09:07:57 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C35F853D.18579%Keir.Fraser@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: <C35F853D.18579%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, 2007-11-13 at 16:45 +0000, Keir Fraser wrote:
> As for GNTMAP_nocache, I think actually we should not trust the mapper to
> get the cache attributes correct (because sometimes if the attributes are
> wrong the system can be destabilised).

Is this just (or mainly?) a concern for RAM pages?  If not, you'll have
the same problem when using the domctl iomem_permission and
ioremap_nocache() in the guest.

>  Actually we now in xen-unstable have
> cache-attribute tracking for RAM pages. The cache attributes for the granted
> mapping should pick up PAT/PWT/PCD from the page's count_info field. If dom0
> has the page mapped with the right attributes this will then do the right
> thing immediately. If dom0 doesn't have the page mapped then we'll need to
> do a bit more work...

dom0 does have the page mapped, but I think there is no page_info struct
(and so no count_info) for some I/O memory pages.  Perhaps a short-term
fix would be to remove the GNTMAP_nocache option that I've added and
instead just make all I/O memory pages that get mapped through this
mechanism forced to _PAGE_PCD.  That way the mapper doesn't get to
choose (and we loose the ability to do an ioremap() equivalent as
opposed to an ioremap_nocache() equivalent, but that's not a big problem
right now).  

If that sounds agreeable I can spin another patch.

Kieran 


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