All of lore.kernel.org
 help / color / mirror / Atom feed
* Trapping I/O accesses of a driver domain
@ 2011-11-10 22:57 Olatunji Ruwase
  2011-11-10 23:27 ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 7+ messages in thread
From: Olatunji Ruwase @ 2011-11-10 22:57 UTC (permalink / raw)
  To: xen-devel

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.

 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
 modifying do_mmu_update () to detect and mark such ptes not present should
 work. Is this a reasonable approach ?.

 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
 misunderstanding how this works and would appreciate clarifications.

 Thank you,

tunji

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Trapping I/O accesses of a driver domain
@ 2011-11-10 21:32 Olatunji Ruwase
  0 siblings, 0 replies; 7+ messages in thread
From: Olatunji Ruwase @ 2011-11-10 21:32 UTC (permalink / raw)
  To: xen-devel

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.

 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
 modifying do_mmu_update () to detect and mark such ptes not present should
 work. Is this a reasonable approach ?.

 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
 misunderstanding how this works and would appreciate clarifications.

 Thank you,

tunji

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-11-11 19:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-10 22:57 Trapping I/O accesses of a driver domain Olatunji Ruwase
2011-11-10 23:27 ` Konrad Rzeszutek Wilk
2011-11-11  3:25   ` Olatunji Ruwase
2011-11-11 15:26     ` Konrad Rzeszutek Wilk
2011-11-11 16:14       ` Tim Deegan
2011-11-11 19:27       ` Olatunji Ruwase
  -- strict thread matches above, loose matches on Subject: below --
2011-11-10 21:32 Olatunji Ruwase

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.