Why is the MSI message data always 0? And how does IRQ affinity work?

99 Views Asked by At

So my wireless network controller uses MSI:

$ grep iwlwifi /proc/interrupts
 127:    6853702      26739       9382          0  IR-PCI-MSI-0000:02:00.0    0-edge      iwlwifi

Looking at the output of sudo lspci -vvvxxx -s 02:00.0 I see this:

        Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
                Address: 00000000fee002f8  Data: 0000

I don't understand why the "Data" part is 0. This is supposed to encode the interrupt vector and other information, right? Also bits 12-19 of the address are supposed to represent the destination ID, but those are 0 too.

How does changing the IRQ affinity work? If I change the value of /proc/irq/127/smp_affinity and then look at /proc/interrupts again, I see that the IRQ is migrated successfully. However, if I look at the output of lspci again, nothing has changed in the MSI address nor data. How does IRQ affinity work on x86 Linux? I expected the MSI address to change.

Also, I checked other MSI (not MSI-X) enabled devices in my x86 laptop and the case is always the same. The data is always 0, and the destination ID part of the address it's always 0 too. I checked another laptop and it's the same there too.

So my questions are:

  • Why is the MSI data always 0 for every device?
  • Why is the destination ID part of the MSI address always 0 for every device?
  • How does IRQ affinity work? What happens when I change the smp_affinity value?
  • Where is the interrupt vector really encoded?

And bonus question:

  • Where does the IRQ 127 number come from in this case? Is that number completely different to the real interrupt vector?
0

There are 0 best solutions below