MSI Affinity

Hi All,

Our device is MSI capable. We have a requirement to bind the MSI to a specific CPU and we want to do it with in the driver.

In order to do this I have written code to handle the FILTER_RESOURCE_REQUIREMENTS IRP. I first pass this IRP to the lower layers and handle it on the way back up. I’ll find the Interrupt resource type and change the following fields to the values mentioned below and complete the IRP with status set to success:

[1] “AffinityPolicy” to IrqPolicySpecifiedProcessors
[2] “TargetedProcessors” to the mask I want.

After doing this, I am not seeing the changed affinity mask while handling START_DEVICE IRP. I tried passing the affinity information from the INF file and it’s working fine. So is there anything that I have missed out? Can I do it from the driver for MSI at all (I read that it’s possible to set it for MSI-X)?

Regards,
AY

You need to set the CM_RESOURCE_INTERRUPT_POLICY_INCLUDED flag.


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…
> Hi All,
>
> Our device is MSI capable. We have a requirement to bind the MSI to a
> specific CPU and we want to do it with in the driver.
>
> In order to do this I have written code to handle the
> FILTER_RESOURCE_REQUIREMENTS IRP. I first pass this IRP to the lower
> layers and handle it on the way back up. I’ll find the Interrupt resource
> type and change the following fields to the values mentioned below and
> complete the IRP with status set to success:
>
> [1] “AffinityPolicy” to IrqPolicySpecifiedProcessors
> [2] “TargetedProcessors” to the mask I want.
>
> After doing this, I am not seeing the changed affinity mask while handling
> START_DEVICE IRP. I tried passing the affinity information from the INF
> file and it’s working fine. So is there anything that I have missed out?
> Can I do it from the driver for MSI at all (I read that it’s possible to
> set it for MSI-X)?
>
> Regards,
> AY
>
>

Thanks for the input Jake. Setting the flag helped in assigning a specific affinity mask.

One more question I have is whether Windows Server 2003 supports MSI? Because in the WDK documentation it’s specified that “CM_RESOURCE_INTERRUPT_MESSAGE” flag will be used only in Windows Vista and later OS.

MSI support is in Windows Vista onwards.
Windows Vista supports both PCI V2.2 MSI and PCI V3.0 MSI-X types of MSIs.

On Fri, May 14, 2010 at 12:48 PM, wrote:

> Thanks for the input Jake. Setting the flag helped in assigning a specific
> affinity mask.
>
> One more question I have is whether Windows Server 2003 supports MSI?
> Because in the WDK documentation it’s specified that
> “CM_RESOURCE_INTERRUPT_MESSAGE” flag will be used only in Windows Vista and
> later OS.
>
>
>
>

Ashish Purkar

Can I not get this functionality in Windows Server 2003 SP2? In one of the Microsoft PPTs I read the following: “Windows Server Longhorn drivers can be used on Windows Server 2003 SP2 (or Windows Server 2003 SP1 with out-of-band storport.sys)”

Will this enable me to use MSIs on Windows Server 2003?

Thanks,
AY

Negative - windows msi support is only available on Vista+.

Good luck,

mm

The drivers do work, though with MSI turned off.


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…
> Can I not get this functionality in Windows Server 2003 SP2? In one of the
> Microsoft PPTs I read the following: “Windows Server Longhorn drivers can
> be used on Windows Server 2003 SP2 (or Windows Server 2003 SP1 with
> out-of-band storport.sys)”
>
> Will this enable me to use MSIs on Windows Server 2003?
>
> Thanks,
> AY
>