hw/pci-bridge/pcie_pci_bridge: properly handle MSI unavailability case
commitd659d94013390238961fac741572306c95496bf5
authorAleksandr Bezzubikov <zuban32s@gmail.com>
Sun, 24 Sep 2017 23:21:58 +0000 (25 02:21 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 15 Oct 2017 02:54:41 +0000 (15 05:54 +0300)
treeea47e88e6539e1e937a2ee0d98d8c6a8bdcc8295
parent9cd1e97a7ae2856ec00b5682db0dea17f42fc734
hw/pci-bridge/pcie_pci_bridge: properly handle MSI unavailability case

QEMU with the pcie-pci-bridge device crashes if the guest board doesn't support MSI,
e.g. 'qemu-system-ppc64 -M prep -device pcie-pci-bridge'.
This is caused by wrong pcie-pci-bridge instantiation error handling. This patch fixes this issue
by falling back to legacy INTx if MSI is not available.
Also set the bridge's 'msi' property default value to 'auto' in order to trigger errors
only when user explicitly set msi=on.

Reported-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Aleksandr Bezzubikov <zuban32s@gmail.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/pci-bridge/pcie_pci_bridge.c