]> xenbits.xensource.com Git - qemu-xen.git/commit
hw/pci-bridge: fix QEMU crash because of pcie-root-port
authorMarcel Apfelbaum <marcel@redhat.com>
Wed, 10 Jan 2018 19:09:09 +0000 (21:09 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 23 Jan 2018 22:45:21 +0000 (16:45 -0600)
commit1027f3419b20329776696df343dbc8dc320d6b1b
tree91beba0b3272d1442cb3e0c26003ee12d39e4179
parentccf82aee58424418845c881e1db5ca6d03918112
hw/pci-bridge: fix QEMU crash because of pcie-root-port

If we try to use more pcie_root_ports then available slots
and an IO hint is passed to the port, QEMU crashes because
we try to init the "IO hint" capability even if the device
is not created.
Fix it by checking for error before adding the capability,
so QEMU can fail gracefully.

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>
(cherry picked from commit fced4d00e68e7559c73746d963265f7fd0b6abf9)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/pci-bridge/gen_pcie_root_port.c