MSI ISR

While trying to answer a question, I just noticed something strange in
the documentation for the ISR for message-signaled interrupts at

https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/wdm/nc-wdm-kmessage_service_routine

The system can call an /InterruptMessageService/ routine even when
the routine’s interrupt has not occurred. For example, if a
message-signaled interrupt is shared, /InterruptMessageService/ can
be called for interrupts belonging to other devices. The routine
must check whether the value for the /ServiceContext/ parameter
matches the value passed to *IoConnectInterruptEx*. If the value
does match, /InterruptMessageService/ handles the interrupt and
returns *TRUE*. Otherwise, /InterruptMessageService/does not handle
the interrupt and returns *FALSE*.

They cannot mean what they wrote here.  How can I possibly check whether
the value for ServiceContext matches what I passed to
IoConnectInterruptEx?  If I could establish my context independently, I
wouldn’t need the ServiceContext parameter at all.  What do you suppose
they were trying to say?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Very strange indeed. MSIs can be shared now? On which kind of platform?

– pa

> How can I possibly check whether the value for ServiceContext matches what

I passed to IoConnectInterruptEx??

Actually, I am more “impressed” my MSI sharing part…

Concerning the above question, you can always save a pointer that you have passed to IoConnectInterruptEx() in some global variable (or array in case of multiple calls to IoConnectInterruptEx() for different instances of your device) so that you can identify your targets. No matter how stupid and awkward the above mentioned approach is, it is going to sort out the issue you are asking about. However, the idiocy of MSI sharing suggestion is so profound that it just leaves me sort of speechless…

Anton Bassov

I think that’s a copy-paste error

It’s GOT to be a doc bug.

Peter
OSR
@OSRDrivers