From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54209) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOUhd-0003l6-5g for qemu-devel@nongnu.org; Tue, 24 Sep 2013 11:39:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VOUhX-0002Ie-6o for qemu-devel@nongnu.org; Tue, 24 Sep 2013 11:39:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1387) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOUhW-0002IZ-V1 for qemu-devel@nongnu.org; Tue, 24 Sep 2013 11:38:59 -0400 Date: Tue, 24 Sep 2013 18:41:11 +0300 From: "Michael S. Tsirkin" Message-ID: <20130924154111.GA21888@redhat.com> References: <1379958593.2050.58.camel@localhost.localdomain> <20130923184513.GB8717@redhat.com> <1380010039.2050.69.camel@localhost.localdomain> <20130924082936.GA18673@redhat.com> <1380012297.2050.78.camel@localhost.localdomain> <20130924085845.GA18980@redhat.com> <1380019471.2050.87.camel@localhost.localdomain> <1380021445.2050.99.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH] hw/pci: completed master-abort emulation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers , Anthony Liguori , Marcel Apfelbaum On Tue, Sep 24, 2013 at 08:21:50PM +0900, Peter Maydell wrote: > On 24 September 2013 20:17, Marcel Apfelbaum 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