On Mon, May 16, 2016 at 08:20:46PM +0300, Michael S. Tsirkin wrote: [...] > > > Actually I am curious about how generic PCI system delivers > > > requester ID (if there is)... For PCIe, we have encoded TLP header, > > > and requester ID is filled in the specific field of the header. > > > However for legacy PCI system, all the data is transmitted via the > > > parallel interface (no matter 32/64 bits) and I found no place that > > > the requester ID can be included. I was assuming there is some way > > > for the root complex to know it (when request comes, the root > > > complex should be able to know where the request come from, or say, > > > its connected BDF). Never digger into the details, or am I wrong? > > > > There's no such thing as a requester ID on conventional PCI. We should > > probably be making use of pci_bus_is_express() to determine whether we > > have a valid requester ID and error if we hit pci_bus_is_root() and we > > still don't have an express bus. And as MST says, testing for > > bus number zero is not a valid test for the root bus. Thanks, > > > > Alex > > Well MSI code sticks the requester ID in the MSI message > unconditionally. It's typically later ignored by the the > PC machine type though.
Yes, I can first detect root PCI bus type as mentioned by Alex, and fill in SID_INVALID if it's a conventional PCI root complex. -- peterx
