It was suggested that I pose my problem to the list and so here it is…
I am working on a STORport miniport driver for an adapter that is
MSI-X capable.
To start with I must confess that I have seen some strange results
from the StorPortInitializePerOpts API call (PERF_CONFIGURATION_DATA
query). ?I was getting DIFFERENT results back during my testing.
Sometimes the NUMA information would be populate, sometimes not,
sometimes ALL the Flags would be set, sometimes just a few. ?Last week
(Thursday) the results of the call became consistent and now I ALWAYS
get the same answer (see below, just 2 flags set). ?I did NOT change
the drivers on the host during this testing time (using Intel’s
drivers on Asus Z8PE-D12 MB). From the PCIe bus trace things are just
fine.
Now, I’m quite confused by the fact that StorPortInitializePerfOpts
was returning inconsistent answers for a while and by the fact that
it is NOT populating EVERYTHING in PERF_CONFIGURATION_DATA since the
MB I’m running on is a NUMA architecture and has PCIe GEN 2 support.
This experience has led me to not trust the hardware (opinions?). ?I
have a new MB on order (SuperMicro), however, here is the latest
information regarding my problem including debug output context
information and the stack trace of the “stuck” STORport call.
f FFFFFA8003CEA680 Initialize 304 Checking for MSI support using
StorPortGetMSIInfo
f FFFFFA8003CEA680 Initialize 319 found 256 MSI-X interrupts available
Break instruction exception - code 80000003 (first chance)
Initialize+0x2fd:
fffff880053189ed cc int 3 // caused by KdBreakPoint()<br>15: kd> g<br>f FFFFFA8003CEA680 Initialize 368 PerfOpts flags available<br> STOR_PERF_DPC_REDIRECTION yes<br> STOR_PERF_CONCURRENT_CHANNELS yes<br> STOR_PERF_INTERRUPT_MESSAGE_RANGES no<br> STOR_PERF_OPTIMIZE_FOR_COMPLETION_DURING_STARTIO no<br> STOR_PERF_ADV_CONFIG_LOCALITY no<br>f FFFFFA8003CEA680 Initialize 393 requesting use of 3 MSI-X interrupts<br>f FFFFFA8003CEA680 Initialize 434 StorPortInitializePerfOpts Flags<br>driver is USING<br> STOR_PERF_DPC_REDIRECTION yes<br> STOR_PERF_CONCURRENT_CHANNELS no<br> STOR_PERF_INTERRUPT_MESSAGE_RANGES no<br> STOR_PERF_OPTIMIZE_FOR_COMPLETION_DURING_STARTIO no<br> STOR_PERF_ADV_CONFIG_LOCALITY no<br>f FFFFFA8003CEA680 Initialize 435 Driver is using MSI-X MessageNumbers<br>0 through 2<br>f FFFFFA8003CEA680 Initialize 436 StorPortInitializePerfOpts was successful<br>f FFFFFA8003CEA680 Initialize 444 exit<br><br>PassiveInitialize runs - omitted.<br>PassiveInitialize DOES configure the PCIe device resulting in the<br>device generating several MSI-X interrupts which are serviced by the<br>correct ISR. Note: I'm NOT using any DPCs yet (on purpose). The<br>PassiveInitialize thread and the first MsiInterrupt thread DO overlap.<br> I'm running with InterruptSynchronizeAll just to get things working<br>so there is no call to StorPort(Acquire|Release)MSISpinLock in the<br>ISR. Interrupts get serviced.<br><br>0 FFFFF80002056CC0 MsiInterrupt 1157 entry MessageID 0<br>0 FFFFF80002056CC0 MsiInterrupt 1207 exit<br>0 FFFFF80002056CC0 MsiInterrupt 1157 entry MessageID 0<br>0 FFFFF80002056CC0 MsiInterrupt 1207 exit<br><br>After this my miniport driver stack is stuck. The system is not hung<br>or stuck, just my driver stack. The system is idle expect for one<br>CPU. The stack trace of the non idle CPU is:<br><br>Child-SP RetAddr : Args to Child<br> : Call Site<br>fffff880
0274e5b0 fffff88005339e65 : fffffa80
0803c600
0000000000000000 fffffa80
07e10100 fffffa80000f0000 :<br>storport!StorPortPause+0x1aa0<br>fffff880
0274e640 fffff8800537d6a8 : fffffa80
0803c600
fffffa8007e19010 fffffa80
03e45c60 fffff88005326a01 :<br>storport!StorPortGetUncachedExtension+0x11d5<br>fffff880
0274e6a0 fffff8800537d9f0 : fffffa80
07e19010
0000000000000001 fffffa80
0803c600 fffffa8007e19010 :<br>storport!StorPortInitialize+0x3de18<br>fffff880
0274e6f0 fffff8800537db94 : fffffa80
07e19010
fffff88005343110 fffffa80
0803c4b0 fffff8800274e820 :<br>storport!StorPortInitialize+0x3e160<br>fffff880
0274e750 fffff8000228d17e : fffffa80
07e19010
fffffa8008031750 fffffa80
0803c4b0 fffff88002113180 :<br>storport!StorPortInitialize+0x3e304<br>fffff880
0274e790 fffff80001fc3b2d : fffffa80
03fc38c0
fffffa8008031750 fffff800
01fcd250 0000000000000000 :<br>nt!EtwUnregister+0x33e<br>fffff880
0274e7d0 fffff8000229c4c6 : fffff800
020d2200
fffffa8003fc4010 fffffa80
08031750 fffffa8003fc41b8 :<br>nt!RtlAssert+0x33d<br>fffff880
0274e890 fffff8000229c764 : fffffa80
03fc4010
fffffa8003fc003e fffffa80
03fc4010 0000000000000001 :<br>nt!IoGetDeviceInterfaces+0x2ac6<br>fffff880
0274e920 fffff800022bfe96 : fffffa80
03fc4010
fffffa8003fc4010 00000000
00000000 0000000000000000 :<br>nt!IoGetDeviceInterfaces+0x2d64<br>fffff880
0274e950 fffff800022c0287 : fffffa80
03fc4010
0000000000000000 00000000
00000001 fffff80002141c38 :<br>nt!ExCreateCallback+0x3ef6<br>fffff880
0274ebc0 fffff80001fcfb83 : 00000001
00000003
0000000000000000 00000000
00000001 0000000000000000 :<br>nt!ExCreateCallback+0x42e7<br>fffff880
0274ec10 fffff80001ee0a21 : fffff800
01fcf870
fffff80001e1ea01 fffff800
02073600 fffffa8003cea680 :<br>nt!DbgSetDebugFilterState+0x2343<br>fffff880
0274ecb0 fffff80002173cce : 00000000
00000000
fffffa8003cea680 00000000
00000080 fffffa8003cd51f0 :<br>nt!KeAcquireInStackQueuedSpinLockAtDpcLevel+0x2f1<br>fffff880
0274ed40 fffff80001ec7fe6 : fffff880
022d3180
fffffa8003cea680 fffff880
022de2c0 0000000000000000 :<br>nt!PsCreateSystemThread+0x1da<br>fffff880
0274ed80 0000000000000000 : fffff880
0274f000
fffff88002749000 fffff880
0274d8d0 00000000`00000000 :
nt!KeInitializeSemaphore+0x24a
Any thoughts from you smart folk out there in driver land?
Best,
Robert.
–
Robert Randall | xxxxx@gmail.com