]> git.proxmox.com Git - mirror_qemu.git/commitdiff
pci: Helper function for testing if an INTx route changed
authorAlex Williamson <alex.williamson@redhat.com>
Tue, 2 Oct 2012 19:21:54 +0000 (13:21 -0600)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 29 Oct 2012 15:59:06 +0000 (17:59 +0200)
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/pci.c
hw/pci.h

index d44fd0e10ac96400bbb2e4bea2a3573eba3a6a75..8c6b3d19ae05fad3487215aa096908682850db56 100644 (file)
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -1121,6 +1121,11 @@ PCIINTxRoute pci_device_route_intx_to_irq(PCIDevice *dev, int pin)
     return bus->route_intx_to_irq(bus->irq_opaque, pin);
 }
 
+bool pci_intx_route_changed(PCIINTxRoute *old, PCIINTxRoute *new)
+{
+    return old->mode != new->mode || old->irq != new->irq;
+}
+
 void pci_bus_fire_intx_routing_notifier(PCIBus *bus)
 {
     PCIDevice *dev;
index 1f902f5b594264f8d942b1f7c81caaaec431f4fb..a852941a5caa459def7334d7fbea9bc69ab827db 100644 (file)
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -326,6 +326,7 @@ PCIBus *pci_register_bus(DeviceState *parent, const char *name,
                          uint8_t devfn_min, int nirq);
 void pci_bus_set_route_irq_fn(PCIBus *, pci_route_irq_fn);
 PCIINTxRoute pci_device_route_intx_to_irq(PCIDevice *dev, int pin);
+bool pci_intx_route_changed(PCIINTxRoute *old, PCIINTxRoute *new);
 void pci_bus_fire_intx_routing_notifier(PCIBus *bus);
 void pci_device_set_intx_routing_notifier(PCIDevice *dev,
                                           PCIINTxRoutingNotifier notifier);