]> git.proxmox.com Git - mirror_qemu.git/commitdiff
hw/pcie-root-port: Fix PCIe root port initialization
authorMarcel Apfelbaum <marcel@redhat.com>
Sun, 17 Jul 2016 16:53:08 +0000 (19:53 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 28 Jul 2016 21:07:09 +0000 (00:07 +0300)
Specify the root port interrupt pin as part of the init
process for cases when msi/msix are not enabled.

Fixes "hw/pci/pci.c:196:23: runtime error: shift exponent -1 is negative"
warning from clang's sanitizer.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/pci-bridge/ioh3420.c

index 0444b596c6a44e117a61a7ef9bb8551e8e1feba0..c8b5ac4207c5b349646989e2c025e709af311484 100644 (file)
@@ -100,6 +100,7 @@ static int ioh3420_initfn(PCIDevice *d)
     int rc;
     Error *err = NULL;
 
+    pci_config_set_interrupt_pin(d->config, 1);
     pci_bridge_initfn(d, TYPE_PCIE_BUS);
     pcie_port_init_reg(d);