xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2 0 of 2] Deal with IOMMU faults in softirq context.
@ 2012-01-05 15:10 Dario Faggioli
  2012-01-05 15:25 ` [PATCHv2 1 of 2] Move IOMMU faults handling into softirq for VT-d Dario Faggioli
  2012-01-05 15:27 ` [PATCHv2 2 of 2] Move IOMMU faults handling into softirq for AMD-Vi Dario Faggioli
  0 siblings, 2 replies; 11+ messages in thread
From: Dario Faggioli @ 2012-01-05 15:10 UTC (permalink / raw)
  To: xen-devel; +Cc: Wei Wang2, allen.m.kay@intel.com, Tim Deegan, Jan Beulich


[-- Attachment #1.1: Type: text/plain, Size: 1942 bytes --]

Hello everyone,

Reposting with after having applied the (minor) fixes suggested by Wei
and Jan.

Allen, if you can tell us what you think about this, or suggest someone
else to ask some feedback to, if you're no longer involved with VT-d,
that would be great! :-)

--

As already discussed here [1], dealing with IOMMU faults in interrupt
context may cause nasty things to happen, up to being used as a form of
DoS attack, e.g., by generating a "storm" of IOMMU faults that will
livelock a pCPU.

To avoid this, IOMMU faults handling is being moved from interrupt to
softirq context. Basically, the inerrupt handler of the IRQ originated
by an IOMMU (page) fault will raise a softirq-tasklet which will then
deal with the actual fault records by clearing the logs and re-enabling
interrupts from the offending IOMMU(s). A single tasklet is being used
even if there are more than just one IOMMU in the system, as the event
should be rare enough.

The series introduces the described mechanism for both Intel VT-d and
AMD-Vi, and has been tested on both platforms with an hacked DomU bnx2
network driver which was generating I/O page faults upon request.

Thanks and Regards,
Dario

[1] http://old-list-archives.xen.org/archives/html/xen-devel/2011-08/msg00638.html

--
 iommu-fault-tasklet_vtd.patch
 iommu-fault-tasklet_amd.patch

 xen/drivers/passthrough/amd/iommu_init.c |  47 ++++++++++++++++++++++++++++++++++++++++++++---
 xen/drivers/passthrough/vtd/iommu.c      |  39 ++++++++++++++++++++++++++++++++++++---
 2 files changed, 80 insertions(+), 6 deletions(-)

-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-------------------------------------------------------------------
Dario Faggioli, http://retis.sssup.it/people/faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
PhD Candidate, ReTiS Lab, Scuola Superiore Sant'Anna, Pisa (Italy)


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

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

end of thread, other threads:[~2012-01-18 15:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-05 15:10 [PATCHv2 0 of 2] Deal with IOMMU faults in softirq context Dario Faggioli
2012-01-05 15:25 ` [PATCHv2 1 of 2] Move IOMMU faults handling into softirq for VT-d Dario Faggioli
2012-01-17 11:17   ` Keir Fraser
2012-01-05 15:27 ` [PATCHv2 2 of 2] Move IOMMU faults handling into softirq for AMD-Vi Dario Faggioli
2012-01-17 11:17   ` Keir Fraser
2012-01-18  8:53     ` Dario Faggioli
2012-01-18 10:40       ` Wei Wang
2012-01-18 10:59         ` Dario Faggioli
2012-01-18 13:51         ` [PATCHv3] " Dario Faggioli
2012-01-18 15:53           ` Wei Wang
2012-01-18 15:57             ` Dario Faggioli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).