All of lore.kernel.org
 help / color / mirror / Atom feed
* IOMMU faults
@ 2011-06-16  9:25 Tim Deegan
  2011-06-16  9:47 ` Jean Guyader
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Tim Deegan @ 2011-06-16  9:25 UTC (permalink / raw)
  To: Allen Kay, Wei Wang; +Cc: xen-devel, Jean Guyader

Hi, IOMMU maintainers,

What should Xen do when an IOMMU fault happens?  As far as I can
see both the AMD and Intel code clears the error in the IOMMU and
carries on, but I suspect some more vigorous action is appropriate.
I've seen traces from an Intel machine that seemed to be livelocked on
IOMMU faults from a passed-through VGA card, until it was killed by the
watchdog.  I think I can see two things that contribute to that:

 - The Intel IOMMU fault handler prints quite a lot of info in interrupt
   context, making it easier to livelock.  Still I think the general
   problem applies on AMD too.
 - Domain destruction re-assigns passed though cards to dom0, but the
   cards don't seem to get reset.  So there's nothing to stop a card
   battering away at DMA in the meantime.  That seems like a problem
   independent of livelock, actually.

In any case, it seems like it would be a good idea to stop a
broken/malicious/deassigned card from flooding Xen with IOMMU faults.

I was considering just writing 0 to the faulting card's PCI command
register, but I'm told that's not always enough to properly deactivate
a card, and it might be a little over-zealous to do it on the first
offence. 

Ideas?

Tim.

-- 
Tim Deegan <Tim.Deegan@citrix.com>
Principal Software Engineer, Xen Platform Team
Citrix Systems UK Ltd.  (Company #02937203, SL9 0BG)

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

end of thread, other threads:[~2011-06-30 10:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-16  9:25 IOMMU faults Tim Deegan
2011-06-16  9:47 ` Jean Guyader
2011-06-16 10:07   ` Tim Deegan
2011-06-16 10:28     ` Jean Guyader
2011-06-24 13:32       ` Tim Deegan
2011-06-30 10:08         ` Tim Deegan
2011-06-30 10:31           ` Jean Guyader
2011-06-16 14:30 ` Wei Wang2
2011-06-16 14:47   ` Konrad Rzeszutek Wilk
2011-06-17  8:08     ` Tim Deegan
2011-06-16 19:21 ` Kay, Allen M
2011-06-17  8:06   ` Tim Deegan

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.