Description of problem: can not see seabios GUI when boot with 240 "-device xio3130-downstream" via PCIe-switch. Also test with 239 "-device xio3130-downstream", not hit this issue. Version-Release number of selected component (if applicable): qemu-kvm-rhev-2.3.0-22.el7.x86_64 kernel-3.10.0-313.el7.x86_64 seabios-bin-1.7.5-11.el7.noarch How reproducible: 100% Steps to Reproduce: 1. boot guest with 240 "-device xio3130-downstream" # sh multi-pcie.sh 240 # cat multi-pcie.sh #!/bin/sh MACHINE=q35 SMP=4,cores=2,threads=2,sockets=1 MEM=4G GUEST_IMG=/mnt/rhel7.2.qcow2_bak IMG_FORMAT=qcow2 CLI="/usr/libexec/qemu-kvm -enable-kvm -M $MACHINE -smp $SMP -m $MEM -name vm1 -drive file=$GUEST_IMG,if=none,id=guest-img,format=$IMG_FORMAT,werror=stop,rerror=stop -device ide-hd,drive=guest-img,bus=ide.0,unit=0,id=os-disk,bootindex=1 -spice port=5932,disable-ticketing -vga qxl -monitor stdio -qmp tcp:0:6666,server,nowait -boot menu=on -chardev file,path=/home/seabios.log,id=seabios -device isa-debugcon,chardev=seabios,iobase=0x402" while [ ${i:=0} -lt ${1:-0} ] do dstreamId=$((i)) ustreamId=$((dstreamId/32)) chassisId=$((dstreamId+1)) blkDiskId=$((dstreamId)) if [ $((dstreamId%32)) -eq 0 ] then CLI="$CLI -device ioh3420,bus=pcie.0,id=root.$ustreamId,slot=$ustreamId" CLI="$CLI -device x3130-upstream,bus=root.$ustreamId,id=upstream$ustreamId" fi CLI="$CLI -device xio3130-downstream,bus=upstream$ustreamId,id=downstream$dstreamId,chassis=$chassisId" i=$((i+1)) done $CLI 2. 3. Actual results: Can not see seabios GUI via remoteview spice://$IP:$port Using isa-debugcon debug, got the following messages: SeaBIOS (version seabios-1.7.5-11.el7) Running on QEMU (q35) Running on KVM RamSize: 0x80000000 [cmos] Relocating init from 0x000e3f59 to 0x7ffb1cd0 (size 57960) Found QEMU fw_cfg RamBlock: addr 0x0000000000000000 len 0x0000000080000000 [e820] RamBlock: addr 0x0000000100000000 len 0x0000000080000000 [e820] Moving pm_base to 0x600 boot order: 1: /pci@i0cf8/pci8086,2922@1f,2/drive@0/disk@0 CPU Mhz=3396 === PCI bus & bridge init === PCI: pci_bios_init_bus_rec bus = 0x0 PCI: pci_bios_init_bus_rec bdf = 0x18 PCI: primary bus = 0x0 PCI: secondary bus = 0xff -> 0x1 PCI: pci_bios_init_bus_rec bus = 0x1 PCI: pci_bios_init_bus_rec bdf = 0x100 PCI: primary bus = 0x0 -> 0x1 PCI: secondary bus = 0xff -> 0x2 PCI: pci_bios_init_bus_rec bus = 0x2 PCI: pci_bios_init_bus_rec bdf = 0x200 PCI: primary bus = 0x0 -> 0x2 PCI: secondary bus = 0xff -> 0x3 PCI: pci_bios_init_bus_rec bus = 0x3 PCI: subordinate bus = 0x0 -> 0x3 PCI: pci_bios_init_bus_rec bdf = 0x208 PCI: primary bus = 0x0 -> 0x2 PCI: secondary bus = 0xff -> 0x4 PCI: pci_bios_init_bus_rec bus = 0x4 PCI: subordinate bus = 0x0 -> 0x4 PCI: pci_bios_init_bus_rec bdf = 0x210 PCI: primary bus = 0x0 -> 0x2 PCI: secondary bus = 0xff -> 0x5 PCI: pci_bios_init_bus_rec bus = 0x5 PCI: subordinate bus = 0x0 -> 0x5 PCI: pci_bios_init_bus_rec bdf = 0x218 PCI: primary bus = 0x0 -> 0x2 PCI: secondary bus = 0xff -> 0x6 PCI: pci_bios_init_bus_rec bus = 0x6 PCI: subordinate bus = 0x0 -> 0x6 PCI: pci_bios_init_bus_rec bdf = 0x220 PCI: primary bus = 0x0 -> 0x2 PCI: secondary bus = 0xff -> 0x7 PCI: pci_bios_init_bus_rec bus = 0x7 PCI: subordinate bus = 0x0 -> 0x7 PCI: pci_bios_init_bus_rec bdf = 0x228 PCI: primary bus = 0x0 -> 0x2 PCI: secondary bus = 0xff -> 0x8 ... ... Expected results: can see the seabio GUI and boot guest correctly. Additional info:
Created attachment 1071230 [details] qemu-kvm command line The command line of Comment #0 is as the attachment file.
Hi, The problem here is that the maximum bus number can be 255. The mentioned script creates more than 255 buses when the parameter is > 240 and of course the SeaBIOS cannot continue. Even if, as explained, this is not a bug, SeaBIOS does go into an endless loop which is not nice. I posted a fix upstream: [SeaBIOS] [PATCH] pci: panic when out of bus numbers
The patch was rejected by Gerd as being an illegal hardware configuration and it should not be resolved in firmware, but in QEMU. After I discussed it with Michael, the QEMU PCI maintainer we decided that we should not follow this, see comment 4 for details.
*** Bug 1055416 has been marked as a duplicate of this bug. ***