On Tue, Sep 24, 2013 at 08:21:50PM +0900, Peter Maydell wrote: > On 24 September 2013 20:17, Marcel Apfelbaum <marce...@redhat.com> wrote: > > I was suggesting an algorithm to find the MA device in order > > to set MA Received Bit in its Status(Sec_Status) register. > > > > The algorithm was to traverse the PCI buses for finding the > > MA device using the transaction address. > > Yes. My point is that if you have an algorithm phrased as > "dynamically traverse some hierarchy using an address > to find something" then you can rephrase it as "statically > construct a hierarchy of memory regions and then just > query it with the address". > > -- PMM
Right. You might be able to use MR hierarchy to find the last bridge to claim transaction. That should to be enough for PCI, for express you then need to find all devices on the path between bus master and the last bridge. For this task, memory subsystem can't be used I think. Whether the result will be cleaner than open-coding it all, I don't really know. -- MST