LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (http://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Can CPU write the vector address of MSI-X to generate interrupt to a PCI device (http://www.linuxquestions.org/questions/linux-kernel-70/can-cpu-write-the-vector-address-of-msi-x-to-generate-interrupt-to-a-pci-device-928241/)

leechaotang 02-08-2012 12:56 AM

Can CPU write the vector address of MSI-X to generate interrupt to a PCI device
 
Hi,

I have a PCIe device and it supports MSI-X. I have enabled the MSI-X function in the driver.

I try to generate a fake interrupt of this device by write the vector address/data written in MSI-X entry. I write it sucessfully but the interrupt does not happen?!

May I generate a device interrupt by writing MSI-X vector address/data?


Any comment is appreciated!!

smallpond 02-08-2012 03:37 PM

An MSI-X interrupt is triggered by the card writing the data+vector to a register in the interrupt chip (usually your PCIe bridge chip). To do that from the CPU you would have to be able to write to that physical address from your process. How are you doing that?

WizadNoNext 04-15-2012 06:06 AM

[quote=leechaotang]I have a PCIe device and it supports MSI-X[/qoute]
Obviously it does, otherwise it won't be PCI-e device. PCI-e devices are REQUIRED to support MSI-X - it is up to kernel to turn on MSI mapping. So basically you did write that you have butter and it tastes like butter.

I don't know, if I am right, but to trigger interrupt you have to write to APIC from side of device, which is kinda hard to achieve.

P.S. PCI-e do support many thing by standard, as it is required (like hotplug, MSI, dynamic reconfiguration of bus etc)


All times are GMT -5. The time now is 06:02 PM.