On Mon, Sep 09, 2013 at 01:52:11PM +0100, Peter Maydell wrote: > On 9 September 2013 13:43, Marcel Apfelbaum <marce...@redhat.com> wrote: > > The scenario is covered only for the primary bus and not for buses > > behind the PCI bridge (the later being handled differently.) > > In this case, isn't the Host Bridge always device 00.0? > > No. For instance the host controller may pass a nonzero > value of devfn_min to pci_bus_new/pci_register_bus (in > which case the host bridge will end up there; example > hw/pci-host/versatile.c) or it might just pass a nonzero > devfn to pci_create_simple when it creates the host controller > PCI device on the bus (I don't think we have anything that > does it that way, though). > > > If not, can we find a way to scan all bus devices and find > > the host bridge so we will not have to manually add it to each > > host bridge? > > It would be conceptually nicer not to treat host bridges as > a special case but instead to just report the abort back > to whatever the PCI master was (which might be a device > doing DMA). That might be a lot of effort though. > > -- PMM
Yes. As a shortcut, what I suggest is registering the device that wants to be notified of master aborts with the bus. -- MST