You don’t have to share your interrupt. With INTx, there are usually only
four vectors that must be shared between all devices. Some chipsets have
eight. With MSI, with only one message, you still get your own vector.
In almost all practical situations, though, you’ll get all your messages.
Only when there are too many devices plugged into the machine will you need
to use just one message.
With that said, there are few reasons to design a device with multiple MSI
messages. All multi-message MSI gets you is first-level interrupt dispatch
in hardware instead of software. If your device has 23 possible internal
interrupt sources in four categories, you can ask for four messages and then
your ISR knows the category before it touches hardware. This is nice, but
it rarely makes a difference in performance in practice.
Where it does make a difference is when your device is actually several
logical units, each with its own driver. Then it’s really nice to split
into multiple messages so that the drivers don’t have to co-ordinate with
each other. Even then, though, it’s likely that the rest of the device has
enough commonality between the logical units that you have to co-ordinate to
some extent.
As a final note, almost all the devices that I see that don’t support MSI-X
are supporting MSI simply because they have a requirement to do so per the
spec. When this is true, their interrupt logic tends to be centered around
a level-triggered usage model. It’s usually not the case that
level-triggered semantics translate well to edge-triggered MSI, and commonly
the solution involves examining device hardware to clear interrupting
conditions in the ISR, which mostly negates the point of multiple messages.
In short, MSI is often a poor match for real-world conditions (particularly
given how Intel’s front-side busses work - see Volume 3B, Chapter 8) and so
the SIG had to go design MSI-X. MSI-X isn’t perfect either, but at least
it’s flexible enough to be more useful.
Jake Oshins
Hyper-V I/O Architect
Windows Kernel Group
This post implies no warranties and confers no rights.
wrote in message news:xxxxx@ntdev…
A lot of thinks are unclear to me about MSI 
I’m not talking about MSI-X for the moment.
I read the MSI.doc document from Microsoft and a part of the PCI 3.0
specifications and it’s still unclear.
A PCIe device is supposed to support MSI and simulated legacy INTx.
Imagine I write a KMDF driver that supports MSI and fallback to INTx.
If the PCIe device is driven under Windows XP, the device will be told to
use INTx and an ISR will be called upon interrupt.
If the PCIe device is driven under Windows 7, the device will be told to use
MSI and an IMSR will be called upon interrupt.
Now, imagine the PCIe device requests 2 different messages ; Windows 7 can
allocate 1 or 2 messages (depending on available resources).
If only 1 message is allocated, then the MessageID parameter of the IMSR
will always be 0.
Right ?
In that case, I need to read at least one device register to know the source
of the interrupt.
What is the advantage of MSI over INTx in that case ?
Thanks.
Vincent