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] Trapping I/O accesses of a driver domain

To: Olatunji Ruwase <oor@xxxxxxxxxx>
Subject: Re: [Xen-devel] Trapping I/O accesses of a driver domain
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Thu, 10 Nov 2011 18:27:31 -0500
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 10 Nov 2011 15:29:27 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <50891.128.2.134.97.1320965847.squirrel@xxxxxxxxxxxxxxxxxx>
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: <50891.128.2.134.97.1320965847.squirrel@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, Nov 10, 2011 at 05:57:27PM -0500, Olatunji Ruwase wrote:
> Hi,
>  I am a graduate student working on dynamic correctness checking of kernel
>  mode device drivers. I want to detect/trap accesses from a Linux driver
>  to device accessible locations (e.g ioremap'd, dma_* locations), and
>  I am exploring the possibility of using Xen for this. I am using x86 PV
>  Xen-3.3 with a dom0 and driver domU both running linux-2.6.18-xen. For
>  various reasons HVM Xen is not suitable for my work.

Um, why not use something more recent. Like Ubuntu or Fedora Core 16?
> 
>  The idea is to use page faults to detect the I/O accesses of the driver
>  by marking the affected pages not present in the page tables. For
>  ioremap'd pages, this seems pretty straightforward since the ptes are
>  marked with _PAGE_IO before they are passed to Xen. And so it seems

Not all the time and it is not a requirement.
>  modifying do_mmu_update () to detect and mark such ptes not present should
>  work. Is this a reasonable approach ?.

What about just checking the MFNs against the ones in the E820 that
are in the PCI gap space?
> 
>  Detecting accesses to dma mapped (dma_alloc_coherent, dma_map_single)
>  locations seems more difficult because, as far as I can tell there is no
>  hypercall informing Xen that the locations are used for I/O. I am probably

Right.
>  misunderstanding how this works and would appreciate clarifications.
> 
>  Thank you,
> 
> tunji
> 
> 
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> 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