All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Add MSI support to XEN
@ 2008-03-27  6:55 Shan, Haitao
  2008-03-27  7:56 ` Keir Fraser
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Shan, Haitao @ 2008-03-27  6:55 UTC (permalink / raw)
  To: Keir Fraser, xen-devel; +Cc: Tian, Kevin, Jiang, Yunhong, Li, Xin B


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

Hi, Keir,
 
    These patches are rebased version of Yunhong's original patches,
which were sent out before XEN 3.2 was released. These patches enable
MSI support and limited MSI-X support in XEN. Here is the original
description of the patches from Yunhong's mail.
 
The basic idea including:
1) Keep vector global resource owned by xen, while split pirq into
per-domain information.
2) Domain0 kernel will operate msi resource for domain0/domU, while QEMU
will operate MSI resource for HVM domain.
3) Xen will do EOI for MSI interrupt.

Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com
<mailto:yunhong.jiang@intel.com> >
 
    There are no much changes made compared with the original patches.
But there do have some issues that we need your kind comments.
    1> ACK-NEW method is necessary to avoid IRQ storm. But it causes the
deadlock. 
         During my tests, I do find there can be deadlock with patches
applied. When assigned a NIC device to HVM domain, the scenario is: Dom0
is waiting to IDE interrupt (vector 0x21); HVM domain is waiting for
qemu's IDE emulation and thus blocked; NIC interrupt (MSI vector 0x31)
is waiting for injection to HVM domain since it is blocked now; IDE
interrupt is waiting for NIC interrupt since NIC interrupt is of high
priority but not ACKed by XEN now. When IDE interrupt and NIC interrupt
are delivered to the same CPU, and when guest OS is Vista, the
phenomenon is easy to be observed.
    2> Without ACK-NEW, some naughty NIC devices as we observed will
bring IRQ storms. For this phenomenon, I think Yunhong can comment more.
Basically, writing EOI without mask the source of MSI will bring IRQ
storm. Although the reason is under investigation, XEN should anyhow
handle such bogous device, right?
    3> Using ACK-OLD and masking the MSI when writing EOI can be
solution. However, XEN does not own PCI configuration spaces.
 
    We also tried some work arounds.
    One work around might be using a timer to force a EOI within some
time interval. This method is already implemented in VT-D's code.
However, with this approach, if the timer is fired and EOI is written,
this is essentially the same apporach as option 2.
    Another approach is to never deliver these two IRQs to the same CPU.
But this is really ugly and can not be applied to UP.
    We have also considered using VT-D 2 interrupt remapping feature.
According to the spec, there is no bit in the remapping table to mask
the interrupt. Therefore, this can not be combined with option 2 to
solve the issue. Masking the interrupt still needs accessing PCI
configuration spaces.
 
    We think the most clean method may be to move ownership from dom0 to
VMM. However, this is a great change. This should be well discussed in
community and need your comments.
 
    These patch series sent out can be served as a discussion materials.
What is your comments on the patches and the issues, Keir?
    
Thanks!
Haitao Shan
 

[-- Attachment #1.2: Type: text/html, Size: 12057 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] 22+ messages in thread

end of thread, other threads:[~2008-04-03 12:31 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-27  6:55 [PATCH 0/5] Add MSI support to XEN Shan, Haitao
2008-03-27  7:56 ` Keir Fraser
2008-03-27 17:32 ` Espen Skoglund
2008-03-27 22:09   ` Caitlin Bestler
2008-03-28  1:48   ` Jiang, Yunhong
2008-03-28  7:24     ` Keir Fraser
2008-03-28  8:40       ` Jiang, Yunhong
2008-03-28  9:16         ` Keir Fraser
2008-03-28  9:35           ` Jiang, Yunhong
2008-03-31 13:57           ` Jiang, Yunhong
2008-03-31 14:14             ` Keir Fraser
2008-03-31 14:15               ` Keir Fraser
2008-03-31 14:25               ` Jiang, Yunhong
2008-03-31 14:33                 ` Keir Fraser
2008-04-01  2:39                   ` Shan, Haitao
2008-03-28 11:37       ` Espen Skoglund
2008-03-28 11:53         ` Keir Fraser
2008-03-28 12:15           ` Espen Skoglund
2008-03-28 13:00             ` Keir Fraser
2008-04-02 14:55 ` Neil Turton
2008-04-03 12:11   ` Shan, Haitao
2008-04-03 12:31     ` Keir Fraser

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.