aboutsummaryrefslogtreecommitdiff
path: root/hw/char/virtio-serial-bus.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2016-12-12 20:42:03 +0200
committerMichael Roth <mdroth@linux.vnet.ibm.com>2017-03-16 12:10:38 -0500
commit620a65dc44e120b4b3530dfd546434f494c81a44 (patch)
tree009480fe536f2f8cc59b7ad5377dc23f2c10a5df /hw/char/virtio-serial-bus.c
parent9d14f0cd654735a656bc85763796b97a6aee4c9f (diff)
pci: fix error message for express slots
PCI Express downstream slot has a single PCI slot behind it, using PCI_DEVFN(PCI_SLOT(devfn), 0) does not give you function 0 in cases such as ARI as well as some error cases. This is exactly what we are hitting: $ qemu-system-x86_64 -machine q35 -readconfig docs/q35-chipset.cfg -monitor stdio (qemu) device_add e1000e,bus=ich9-pcie-port-4,addr=00 (qemu) device_add e1000e,bus=ich9-pcie-port-4,addr=08 Segmentation fault (core dumped) The fix is to use the pci_get_function_0 API. Cc: qemu-stable@nongnu.org Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reported-by: Eduardo Habkost <ehabkost@redhat.com> Tested-by: Cao jin <caoj.fnst@cn.fujitsu.com> Tested-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> (cherry picked from commit d93ddfb1f8fb72a7c175a8cf1028c639f769d105) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'hw/char/virtio-serial-bus.c')
0 files changed, 0 insertions, 0 deletions