From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53127) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SdhJA-0004wr-VB for qemu-devel@nongnu.org; Sun, 10 Jun 2012 08:31:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SdhJ9-0001FC-5p for qemu-devel@nongnu.org; Sun, 10 Jun 2012 08:31:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39368) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SdhJ8-0001F6-UJ for qemu-devel@nongnu.org; Sun, 10 Jun 2012 08:31:51 -0400 Date: Sun, 10 Jun 2012 15:32:19 +0300 From: "Michael S. Tsirkin" Message-ID: <20120610123219.GB7852@redhat.com> References: <73f236cab517fc5b2c2ba332e9efe2acbe727151.1338799936.git.jan.kiszka@siemens.com> <20120610094840.GC6250@redhat.com> <4FD47156.3020200@web.de> <20120610103352.GE6250@redhat.com> <4FD47A75.4020706@web.de> <20120610111149.GJ6250@redhat.com> <4FD48277.60704@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4FD48277.60704@web.de> Subject: Re: [Qemu-devel] [PATCH 06/13] pci: Add INTx routing notifier List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Alex Williamson , qemu-devel On Sun, Jun 10, 2012 at 01:18:15PM +0200, Jan Kiszka wrote: > >>>>>> @@ -318,6 +322,9 @@ PCIBus *pci_register_bus(DeviceState *parent, const char *name, > >>>>>> MemoryRegion *address_space_io, > >>>>>> uint8_t devfn_min, int nirq); > >>>>>> PCIINTxRoute pci_device_route_intx_to_irq(PCIDevice *dev, int pin); > >>>>>> +void pci_bus_fire_intx_routing_notifier(PCIBus *bus); > >>>>> > >>>>> Well true it fires the notifier but what it does conceptually > >>>>> is update intx routing. > >>>> > >>>> Nope, it informs about updates _after_ they happened. > >>> > >>> Don't we need to update the cached pin if this happens? > >>> If yes I would this a better API would both update the cache > >>> and then trigger a notifier. > >>> And the notifier can then be cache change notifier, > >>> and the "fire" function would instead be "update_cache". > >> > >> See above, the cached part of the route is static anyway. What changes > >> is the host bridge configuration. > > > > You are saying it is only the intx to irq routing that > > can change? > > So maybe "pci_bus_update_intx_to_irq_routing"? > > Again, this function does not _update_ anything. It informs about a > host-bridge-specific update, i.e. something that happened outside the > generic code beforehand. Yes it does what it says but it's an ugly interface all the same. What does a host device emulation care about notifiers? It's an implementation detail. The *real* reason is that someone caches intx to irq routing and you need to update that cache. So just say so. -- MST