[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 06/13] pci: Add INTx routing notifier
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-devel] [PATCH 06/13] pci: Add INTx routing notifier |
Date: |
Sun, 10 Jun 2012 15:32:19 +0300 |
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
- Re: [Qemu-devel] [PATCH 06/13] pci: Add INTx routing notifier, (continued)
- Re: [Qemu-devel] [PATCH 06/13] pci: Add INTx routing notifier, Jan Kiszka, 2012/06/10
- Re: [Qemu-devel] [PATCH 06/13] pci: Add INTx routing notifier, Michael S. Tsirkin, 2012/06/10
- Re: [Qemu-devel] [PATCH 06/13] pci: Add INTx routing notifier, Jan Kiszka, 2012/06/10
- Re: [Qemu-devel] [PATCH 06/13] pci: Add INTx routing notifier, Michael S. Tsirkin, 2012/06/10
- Re: [Qemu-devel] [PATCH 06/13] pci: Add INTx routing notifier, Jan Kiszka, 2012/06/10
- Re: [Qemu-devel] [PATCH 06/13] pci: Add INTx routing notifier, Michael S. Tsirkin, 2012/06/10
- Re: [Qemu-devel] [PATCH 06/13] pci: Add INTx routing notifier, Jan Kiszka, 2012/06/10
- Re: [Qemu-devel] [PATCH 06/13] pci: Add INTx routing notifier, Michael S. Tsirkin, 2012/06/10
- Re: [Qemu-devel] [PATCH 06/13] pci: Add INTx routing notifier, Jan Kiszka, 2012/06/10
- Re: [Qemu-devel] [PATCH 06/13] pci: Add INTx routing notifier, Michael S. Tsirkin, 2012/06/10
- Re: [Qemu-devel] [PATCH 06/13] pci: Add INTx routing notifier,
Michael S. Tsirkin <=
[Qemu-devel] [PATCH 09/13] pci: Introduce and apply PCIDeviceAddress, Jan Kiszka, 2012/06/04
[Qemu-devel] [PATCH 04/13] pci: Rename map_irq to route_pin, Jan Kiszka, 2012/06/04
[Qemu-devel] [PATCH 07/13] pci: Make domain and bus unsigned in pci_read_devaddr, Jan Kiszka, 2012/06/04
[Qemu-devel] [PATCH 08/13] pci: Export pci_parse_devaddr instead of pci_read_devaddr, Jan Kiszka, 2012/06/04
[Qemu-devel] [PATCH 05/13] pci: Add pci_device_route_intx_to_irq, Jan Kiszka, 2012/06/04