On Thu, Mar 27, 2014 at 4:54 AM, shiv prakash Agarwal <chhotu.shiv@xxxxxxxxx> wrote: > Hi All, > > Could we test MSI functionality of Root Complex without having Endpoint driver? > If not, could we use some test code just to simulate endpoint driver > for MSI functionality? An Endpoint signals an MSI by issuing a DMA write. The OS configures the target of that write when it enables MSI on the device. The target of the write may be something in the Root Complex, a local APIC in a CPU, or something else. I don't think the PCIe spec says anything about how this should be implemented, so from a PCIe spec point of view, the PCI/PCIe fabric and the Root Complex route the DMA write but otherwise don't do anything special with it. You should be able to test some MSI functionality if you can generate a write similar to what the Endpoint would generate. On x86, MSI DMA writes typically target a CPU Local APIC, and you could write to those by ioremapping the LAPIC physical address. Of course, this wouldn't test the whole path because the transaction would not traverse any of the PCIe fabric. If the MSI target is in the Root Complex, you'd have to know more details about the topology and routing details, but you could probably do the same thing. But it's probably a lot easier to just put an Endpoint in the system and test it that way :) Bjorn -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html