Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1067777

Summary: [q35] seabios can't assign more than 9 I/O address space pieces to pci bridges.
Product: Red Hat Enterprise Linux 7 Reporter: Jun Li <juli>
Component: seabiosAssignee: Gerd Hoffmann <kraxel>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: apetrova, flang, hhuang, juli, juzhang, knoel, kraxel, michen, mrezanin, qiguo, sluo, virt-maint, xfu, xwei
Target Milestone: rcKeywords: TestOnly
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: seabios-1.7.5-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 08:15:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1101500    
Bug Blocks:    

Description Jun Li 2014-02-21 03:26:08 UTC
Description of problem:
when boot guest with >= 248 virtio-blk-pci device under pci-bridge, HMP will give warning "=== PCI new allocation pass #2 === PCI: out of I/O address space" when add isa-debugcon via cli. Can not see seabios GUI.
Also try bug 1055832, it can see the seabios GUI with this version of qemu-kvm.

Version-Release number of selected component (if applicable):
seabios-1.7.2.2-11.el7.x86_64
qemu-kvm-rhev-1.5.3-47.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.boot guest with following shell script:
# sh max_bridge_device.sh 249
----
# cat max_bridge_device.sh 
#!/bin/sh

MACHINE=q35
#MACHINE=pc
MEM=8G
IMG=/home/juli/rhel7.0.qcow2-bak

CLI="/usr/libexec/qemu-kvm -net none -M $MACHINE -smp 4,core=2,thread=2,socket=1 -m $MEM -name vm1 -vnc :1 -monitor stdio -device pci-bridge,chassis_nr=1,id=bridge0,addr=0x03 -drive file=$IMG,if=none,id=hd,format=raw,werror=stop,rerror=stop -device virtio-blk-pci,scsi=off,drive=hd,id=os-disk,bus=bridge0,addr=0x01,bootindex=1 -serial unix:/tmp/bridge-con,server,nowait -boot menu=on,reboot-timeout=10 -bios /usr/share/seabios/bios-256k.bin -chardev stdio,id=log -device isa-debugcon,iobase=0x402,chardev=log"

while [ ${i:=1} -lt ${1:-0} ]
do
    createBr=$((i%31))
    bridgeId=$((i/31))
    slotId=$((i%31+1))
    if [ $createBr -eq 0 ]
    then
        CLI="$CLI -device pci-bridge,chassis_nr=$((bridgeId+1)),id=bridge$bridgeId,addr=0x$(printf "%02x" $((bridgeId+3)))"
    fi
    CLI="$CLI -drive file=/home/max-image/d$((i-1)),if=none,id=disk$i"
    CLI="$CLI -device virtio-blk-pci,bus=bridge$bridgeId,drive=disk$i,id=blk$i,addr=0x$(printf "%02x" $slotId)"
    ((i++))
done

$CLI
-------------
# sh create-many-disk.sh 249
----
# cat create-many-disk.sh 
#! /bin/sh
DIR="/home/max-image"
if [ -d "$DIR" ]; then
    rm -fr $DIR
    mkdir -p $DIR
else
    mkdir -p $DIR
fi
NUM=${1:-0}
for ((i=0;i<$NUM;i++)); do
    qemu-img create -f qcow2 /home/max-image/d$i 100M
#    ((i++))
done

2.check the seabios GUI.
# remote-viewer vnc://10.66.7.155:5901
3.

Actual results:
can not see seabios GUI.
qemu-kvm will give waring via add isa-debugcon via cli.
...
PCI: secondary bus = 0xff -> 0x8
PCI: pci_bios_init_bus_rec bus = 0x8
PCI: subordinate bus = 0x0 -> 0x8
PCI: pci_bios_init_bus_rec bdf = 0x58
PCI: primary bus = 0x0
PCI: secondary bus = 0xff -> 0x9
PCI: pci_bios_init_bus_rec bus = 0x9
PCI: subordinate bus = 0x0 -> 0x9
=== PCI device probing ===
Found 263 PCI devices (max PCI bus is 09)
=== PCI new allocation pass #1 ===
PCI: check devices
PCI: secondary bus 9 size 00001000 type io
PCI: secondary bus 9 size 00100000 type mem
PCI: secondary bus 9 size 00000000 type prefmem
PCI: secondary bus 8 size 00001000 type io
PCI: secondary bus 8 size 00100000 type mem
PCI: secondary bus 8 size 00000000 type prefmem
PCI: secondary bus 7 size 00001000 type io
PCI: secondary bus 7 size 00100000 type mem
PCI: secondary bus 7 size 00000000 type prefmem
PCI: secondary bus 6 size 00001000 type io
PCI: secondary bus 6 size 00100000 type mem
PCI: secondary bus 6 size 00000000 type prefmem
PCI: secondary bus 5 size 00001000 type io
PCI: secondary bus 5 size 00100000 type mem
PCI: secondary bus 5 size 00000000 type prefmem
PCI: secondary bus 4 size 00001000 type io
PCI: secondary bus 4 size 00100000 type mem
PCI: secondary bus 4 size 00000000 type prefmem
PCI: secondary bus 3 size 00001000 type io
PCI: secondary bus 3 size 00100000 type mem
PCI: secondary bus 3 size 00000000 type prefmem
PCI: secondary bus 2 size 00001000 type io
PCI: secondary bus 2 size 00100000 type mem
PCI: secondary bus 2 size 00000000 type prefmem
PCI: secondary bus 1 size 00001000 type io
PCI: secondary bus 1 size 00100000 type mem
PCI: secondary bus 1 size 00000000 type prefmem
=== PCI new allocation pass #2 === 
PCI: out of I/O address space

Expected results:
If qemu-kvm can not support these devices, could forbid boot qemu-kvm.
Or qemu-kvm works well with these devices.

Additional info:

Comment 4 Xiaoqing Wei 2014-05-06 06:51:14 UTC
I met same error, while the cmd is a liitle bit differ:
confirmed w/ juli, this bug is using one pci-bridge, and has to use 248 blk to trriger.

and my cmd is as below

when booting multiple pci-bridges, with one virtio-blk-pci each attached behind.

# cat 1156.sh 
/usr/libexec/qemu-kvm -name RHEL5 -S -machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off -m 4096 -realtime mlock=off -smp 4,sockets=4,cores=1,threads=1 -uuid f009e3a9-5c6f-4d11-9364-a47177d8f22a -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/RHEL5.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot strict=on,menu=on  \
  -device pci-bridge,chassis_nr=1,id=pci.1,bus=pci.0,multifunction=off,addr=0x8  \
  -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.0,multifunction=off,addr=0x9  \
  -device pci-bridge,chassis_nr=3,id=pci.3,bus=pci.0,multifunction=off,addr=0xa  \
  -device pci-bridge,chassis_nr=4,id=pci.4,bus=pci.0,multifunction=off,addr=0x10  \
  -device pci-bridge,chassis_nr=5,id=pci.5,bus=pci.0,multifunction=off,addr=0x11  \
  -device pci-bridge,chassis_nr=6,id=pci.6,bus=pci.0,multifunction=off,addr=0x12  \
  -device pci-bridge,chassis_nr=7,id=pci.7,bus=pci.0,multifunction=off,addr=0x13  \
  -device pci-bridge,chassis_nr=8,id=pci.8,bus=pci.0,multifunction=off,addr=0x14  \
  -device pci-bridge,chassis_nr=9,id=pci.9,bus=pci.0,multifunction=off,addr=0x15  \
  -device pci-bridge,chassis_nr=10,id=pci.10,bus=pci.0,multifunction=off,addr=0x16  \
  -device pci-bridge,chassis_nr=11,id=pci.11,bus=pci.0,multifunction=off,addr=0x17  \
  -device pci-bridge,chassis_nr=12,id=pci.12,bus=pci.0,multifunction=off,addr=0x18  \
  -device pci-bridge,chassis_nr=13,id=pci.13,bus=pci.0,multifunction=off,addr=0x19  \
  -device pci-bridge,chassis_nr=14,id=pci.14,bus=pci.0,multifunction=off,addr=0x1a  \
  -device pci-bridge,chassis_nr=15,id=pci.15,bus=pci.0,multifunction=off,addr=0x1b  \
  -device pci-bridge,chassis_nr=16,id=pci.16,bus=pci.0,multifunction=off,addr=0x1c  \
  -device pci-bridge,chassis_nr=17,id=pci.17,bus=pci.0,multifunction=off,addr=0x1d  \
  -device pci-bridge,chassis_nr=18,id=pci.18,bus=pci.0,multifunction=off,addr=0x1e  \
  -device pci-bridge,chassis_nr=19,id=pci.19,bus=pci.0,multifunction=off,addr=0x1f  \
  -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2  \
  -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5  \
  -drive file=/home/kvm_autotest_root/images/RHEL-Server-5.11-64-virtio.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none  \
  -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1  \
  -netdev tap,id=hostnet0  \
  -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:c2:29:28,bus=pci.0,addr=0x3 \
  -chardev socket,id=charserial0,path=/tmp/serial-serial0-20140428-165503-qy0AIels,server,nowait \
  -device isa-serial,chardev=charserial0,id=serial0 -chardev spicevmc,id=charchannel0,name=vdagent  \
  -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -spice port=5900,addr=0.0.0.0,disable-ticketing,seamless-migration=on -vga qxl \
  -device intel-hda,id=sound0,bus=pci.0,addr=0x4  \
  -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0  \
  -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 -monitor stdio -S  \
  -drive file=/home/disk/disk1,if=none,id=disk1,format=qcow2,cache=none \
-device virtio-blk-pci,scsi=off,bus=pci.2,addr=0x8,drive=disk2,id=virtio-pci2 \
-device virtio-blk-pci,scsi=off,bus=pci.3,addr=0x8,drive=disk3,id=virtio-pci3 \
-device virtio-blk-pci,scsi=off,bus=pci.4,addr=0x8,drive=disk4,id=virtio-pci4 \
-device virtio-blk-pci,scsi=off,bus=pci.5,addr=0x8,drive=disk5,id=virtio-pci5 \
-device virtio-blk-pci,scsi=off,bus=pci.6,addr=0x8,drive=disk6,id=virtio-pci6 \
-device virtio-blk-pci,scsi=off,bus=pci.7,addr=0x8,drive=disk7,id=virtio-pci7 \
-device virtio-blk-pci,scsi=off,bus=pci.8,addr=0x8,drive=disk8,id=virtio-pci8 \
-device virtio-blk-pci,scsi=off,bus=pci.9,addr=0x8,drive=disk9,id=virtio-pci9 \
-device virtio-blk-pci,scsi=off,bus=pci.10,addr=0x8,drive=disk10,id=virtio-pci10 \
-device virtio-blk-pci,scsi=off,bus=pci.11,addr=0x8,drive=disk11,id=virtio-pci11 \
-device virtio-blk-pci,scsi=off,bus=pci.12,addr=0x8,drive=disk12,id=virtio-pci12 \
-device virtio-blk-pci,scsi=off,bus=pci.13,addr=0x8,drive=disk13,id=virtio-pci13 \
-device virtio-blk-pci,scsi=off,bus=pci.14,addr=0x8,drive=disk14,id=virtio-pci14 \
-device virtio-blk-pci,scsi=off,bus=pci.15,addr=0x8,drive=disk15,id=virtio-pci15 \
-device virtio-blk-pci,scsi=off,bus=pci.16,addr=0x8,drive=disk16,id=virtio-pci16 \
-device virtio-blk-pci,scsi=off,bus=pci.17,addr=0x8,drive=disk17,id=virtio-pci17 \
-device virtio-blk-pci,scsi=off,bus=pci.18,addr=0x8,drive=disk18,id=virtio-pci18 \
-device virtio-blk-pci,scsi=off,bus=pci.19,addr=0x8,drive=disk19,id=virtio-pci19 \
-drive file=/home/disk/disk2,if=none,id=disk2,format=qcow2,cache=none \
-drive file=/home/disk/disk3,if=none,id=disk3,format=qcow2,cache=none \
-drive file=/home/disk/disk4,if=none,id=disk4,format=qcow2,cache=none \
-drive file=/home/disk/disk5,if=none,id=disk5,format=qcow2,cache=none \
-drive file=/home/disk/disk6,if=none,id=disk6,format=qcow2,cache=none \
-drive file=/home/disk/disk7,if=none,id=disk7,format=qcow2,cache=none \
-drive file=/home/disk/disk8,if=none,id=disk8,format=qcow2,cache=none \
-drive file=/home/disk/disk9,if=none,id=disk9,format=qcow2,cache=none \
-drive file=/home/disk/disk10,if=none,id=disk10,format=qcow2,cache=none \
-drive file=/home/disk/disk11,if=none,id=disk11,format=qcow2,cache=none \
-drive file=/home/disk/disk12,if=none,id=disk12,format=qcow2,cache=none \
-drive file=/home/disk/disk13,if=none,id=disk13,format=qcow2,cache=none \
-drive file=/home/disk/disk14,if=none,id=disk14,format=qcow2,cache=none \
-drive file=/home/disk/disk15,if=none,id=disk15,format=qcow2,cache=none \
-drive file=/home/disk/disk16,if=none,id=disk16,format=qcow2,cache=none \
-drive file=/home/disk/disk17,if=none,id=disk17,format=qcow2,cache=none \
-drive file=/home/disk/disk18,if=none,id=disk18,format=qcow2,cache=none \
-drive file=/home/disk/disk19,if=none,id=disk19,format=qcow2,cache=none \
    -chardev socket,id=seabioslog_id_20140422-110452-289U9AwN,path=/tmp/seabios-20140422-110452-289U9AwN,server,nowait \
    -device isa-debugcon,chardev=seabioslog_id_20140422-110452-289U9AwN,iobase=0x402 \






# nc -U /tmp/seabios-20140422-110452-289U9AwN 
Start bios (version seabios-1.7.2.2-12.el7)
Ram Size=0xc0000000 (0x0000000040000000 high)
Relocating low data from 0x000e3ec0 to 0x000ef780 (size 2161)
Relocating init from 0x000e4731 to 0xbffe2ce0 (size 53759)
CPU Mhz=3096
=== PCI bus & bridge init ===
PCI: pci_bios_init_bus_rec bus = 0x0
PCI: pci_bios_init_bus_rec bdf = 0x40
PCI: primary bus = 0x0
PCI: secondary bus = 0xff -> 0x1
PCI: pci_bios_init_bus_rec bus = 0x1
PCI: subordinate bus = 0x0 -> 0x1
PCI: pci_bios_init_bus_rec bdf = 0x48
PCI: primary bus = 0x0
PCI: secondary bus = 0xff -> 0x2
PCI: pci_bios_init_bus_rec bus = 0x2
PCI: subordinate bus = 0x0 -> 0x2
PCI: pci_bios_init_bus_rec bdf = 0x50
PCI: primary bus = 0x0
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 = 0x80
PCI: primary bus = 0x0
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 = 0x88
PCI: primary bus = 0x0
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 = 0x90
PCI: primary bus = 0x0
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 = 0x98
PCI: primary bus = 0x0
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 = 0xa0
PCI: primary bus = 0x0
PCI: secondary bus = 0xff -> 0x8
PCI: pci_bios_init_bus_rec bus = 0x8
PCI: subordinate bus = 0x0 -> 0x8
PCI: pci_bios_init_bus_rec bdf = 0xa8
PCI: primary bus = 0x0
PCI: secondary bus = 0xff -> 0x9
PCI: pci_bios_init_bus_rec bus = 0x9
PCI: subordinate bus = 0x0 -> 0x9
PCI: pci_bios_init_bus_rec bdf = 0xb0
PCI: primary bus = 0x0
PCI: secondary bus = 0xff -> 0xa
PCI: pci_bios_init_bus_rec bus = 0xa
PCI: subordinate bus = 0x0 -> 0xa
PCI: pci_bios_init_bus_rec bdf = 0xb8
PCI: primary bus = 0x0
PCI: secondary bus = 0xff -> 0xb
PCI: pci_bios_init_bus_rec bus = 0xb
PCI: subordinate bus = 0x0 -> 0xb
PCI: pci_bios_init_bus_rec bdf = 0xc0
PCI: primary bus = 0x0
PCI: secondary bus = 0xff -> 0xc
PCI: pci_bios_init_bus_rec bus = 0xc
PCI: subordinate bus = 0x0 -> 0xc
PCI: pci_bios_init_bus_rec bdf = 0xc8
PCI: primary bus = 0x0
PCI: secondary bus = 0xff -> 0xd
PCI: pci_bios_init_bus_rec bus = 0xd
PCI: subordinate bus = 0x0 -> 0xd
PCI: pci_bios_init_bus_rec bdf = 0xd0
PCI: primary bus = 0x0
PCI: secondary bus = 0xff -> 0xe
PCI: pci_bios_init_bus_rec bus = 0xe
PCI: subordinate bus = 0x0 -> 0xe
PCI: pci_bios_init_bus_rec bdf = 0xd8
PCI: primary bus = 0x0
PCI: secondary bus = 0xff -> 0xf
PCI: pci_bios_init_bus_rec bus = 0xf
PCI: subordinate bus = 0x0 -> 0xf
PCI: pci_bios_init_bus_rec bdf = 0xe0
PCI: primary bus = 0x0
PCI: secondary bus = 0xff -> 0x10
PCI: pci_bios_init_bus_rec bus = 0x10
PCI: subordinate bus = 0x0 -> 0x10
PCI: pci_bios_init_bus_rec bdf = 0xe8
PCI: primary bus = 0x0
PCI: secondary bus = 0xff -> 0x11
PCI: pci_bios_init_bus_rec bus = 0x11
PCI: subordinate bus = 0x0 -> 0x11
PCI: pci_bios_init_bus_rec bdf = 0xf0
PCI: primary bus = 0x0
PCI: secondary bus = 0xff -> 0x12
PCI: pci_bios_init_bus_rec bus = 0x12
PCI: subordinate bus = 0x0 -> 0x12
PCI: pci_bios_init_bus_rec bdf = 0xf8
PCI: primary bus = 0x0
PCI: secondary bus = 0xff -> 0x13
PCI: pci_bios_init_bus_rec bus = 0x13
PCI: subordinate bus = 0x0 -> 0x13
=== PCI device probing ===
Found 48 PCI devices (max PCI bus is 13)
=== PCI new allocation pass #1 ===
PCI: check devices
PCI: secondary bus 19 size 00001000 type io
PCI: secondary bus 19 size 00100000 type mem
PCI: secondary bus 19 size 00000000 type prefmem
PCI: secondary bus 18 size 00001000 type io
PCI: secondary bus 18 size 00100000 type mem
PCI: secondary bus 18 size 00000000 type prefmem
PCI: secondary bus 17 size 00001000 type io
PCI: secondary bus 17 size 00100000 type mem
PCI: secondary bus 17 size 00000000 type prefmem
PCI: secondary bus 16 size 00001000 type io
PCI: secondary bus 16 size 00100000 type mem
PCI: secondary bus 16 size 00000000 type prefmem
PCI: secondary bus 15 size 00001000 type io
PCI: secondary bus 15 size 00100000 type mem
PCI: secondary bus 15 size 00000000 type prefmem
PCI: secondary bus 14 size 00001000 type io
PCI: secondary bus 14 size 00100000 type mem
PCI: secondary bus 14 size 00000000 type prefmem
PCI: secondary bus 13 size 00001000 type io
PCI: secondary bus 13 size 00100000 type mem
PCI: secondary bus 13 size 00000000 type prefmem
PCI: secondary bus 12 size 00001000 type io
PCI: secondary bus 12 size 00100000 type mem
PCI: secondary bus 12 size 00000000 type prefmem
PCI: secondary bus 11 size 00001000 type io
PCI: secondary bus 11 size 00100000 type mem
PCI: secondary bus 11 size 00000000 type prefmem
PCI: secondary bus 10 size 00001000 type io
PCI: secondary bus 10 size 00100000 type mem
PCI: secondary bus 10 size 00000000 type prefmem
PCI: secondary bus 9 size 00001000 type io
PCI: secondary bus 9 size 00100000 type mem
PCI: secondary bus 9 size 00000000 type prefmem
PCI: secondary bus 8 size 00001000 type io
PCI: secondary bus 8 size 00100000 type mem
PCI: secondary bus 8 size 00000000 type prefmem
PCI: secondary bus 7 size 00001000 type io
PCI: secondary bus 7 size 00100000 type mem
PCI: secondary bus 7 size 00000000 type prefmem
PCI: secondary bus 6 size 00001000 type io
PCI: secondary bus 6 size 00100000 type mem
PCI: secondary bus 6 size 00000000 type prefmem
PCI: secondary bus 5 size 00001000 type io
PCI: secondary bus 5 size 00100000 type mem
PCI: secondary bus 5 size 00000000 type prefmem
PCI: secondary bus 4 size 00001000 type io
PCI: secondary bus 4 size 00100000 type mem
PCI: secondary bus 4 size 00000000 type prefmem
PCI: secondary bus 3 size 00001000 type io
PCI: secondary bus 3 size 00100000 type mem
PCI: secondary bus 3 size 00000000 type prefmem
PCI: secondary bus 2 size 00001000 type io
PCI: secondary bus 2 size 00100000 type mem
PCI: secondary bus 2 size 00000000 type prefmem
PCI: secondary bus 1 size 00000000 type io
PCI: secondary bus 1 size 00000000 type mem
PCI: secondary bus 1 size 00000000 type prefmem
=== PCI new allocation pass #2 ===
PCI: out of I/O address space




if I reduce virtio-blk-pci to 9(while pci-bridges still 19), then VM works fine,
no knowing whether this is identical issue, if not, then I will open a new one to track.

Comment 5 Gerd Hoffmann 2014-05-12 13:16:51 UTC
seabios can handle up to 9 pci bridges which have devices with io ports behind it.  Raising that number to 15 should be possible.

pci bridges without devices or pci bridges with mmio-only devices don't need a chunk of i/o address space and are not limited.

It is the number of pci bridges which counts, not the number of devices.  So, yes, the original report and comment #4 are the same fundamental issue.

Comment 6 Gerd Hoffmann 2014-07-03 09:19:25 UTC
please retest with seabios 1.7.5 builds:
http://people.redhat.com/ghoffman/bz1101500/
That should allow 15 bridges (with devices having io ports behind it).

Comment 9 juzhang 2014-07-10 02:38:26 UTC
Hi Sluo,

Since juli is on pto, could you give a help for that?

Best Regards,
Junyi

Comment 12 FuXiangChun 2014-07-29 10:09:00 UTC
Reproduce this bug with seabios-1.7.2.2-11.el7.x86_64 & qemu-kvm-1.5.3-48.el7.x86_64

#sh cli.sh 249 (according to comment 0)
=== PCI new allocation pass #1 ===
PCI: check devices
PCI: secondary bus 9 size 00001000 type io
PCI: secondary bus 9 size 00100000 type mem
PCI: secondary bus 9 size 00000000 type prefmem
PCI: secondary bus 8 size 00001000 type io
PCI: secondary bus 8 size 00100000 type mem
PCI: secondary bus 8 size 00000000 type prefmem
PCI: secondary bus 7 size 00001000 type io
PCI: secondary bus 7 size 00100000 type mem
PCI: secondary bus 7 size 00000000 type prefmem
PCI: secondary bus 6 size 00001000 type io
PCI: secondary bus 6 size 00100000 type mem
PCI: secondary bus 6 size 00000000 type prefmem
PCI: secondary bus 5 size 00001000 type io
PCI: secondary bus 5 size 00100000 type mem
PCI: secondary bus 5 size 00000000 type prefmem
PCI: secondary bus 4 size 00001000 type io
PCI: secondary bus 4 size 00100000 type mem
PCI: secondary bus 4 size 00000000 type prefmem
PCI: secondary bus 3 size 00001000 type io
PCI: secondary bus 3 size 00100000 type mem
PCI: secondary bus 3 size 00000000 type prefmem
PCI: secondary bus 2 size 00001000 type io
PCI: secondary bus 2 size 00100000 type mem
PCI: secondary bus 2 size 00000000 type prefmem
PCI: secondary bus 1 size 00001000 type io
PCI: secondary bus 1 size 00100000 type mem
PCI: secondary bus 1 size 00000000 type prefmem
=== PCI new allocation pass #2 ===
PCI: out of I/O address space

#sh cli.sh 8~248

HMP show only warning message. like this.
WARNING - Unable to allocate resource at vp_find_vq:33!
....

Verify this seabios-1.7.5-1.el7 & qemu-kvm-1.5.3-66.el7.x86_64

#sh cli.sh 249

result:

1. debug message from HMP as below

found virtio-blk at 1:8
WARNING - Unable to allocate resource at vp_find_vq:35!
fail to find vq for virtio-blk 1:8
......
found virtio-blk at 9:1
WARNING - Unable to allocate resource at vp_find_vq:35!
fail to find vq for virtio-blk 9:1
PS2 keyboard initialized
All threads complete.
Scan for option roms
Searching bootorder for: /rom@genroms/kvmvapic.bin

Press F12 for boot menu.

Searching bootorder for: HALT
drive 0x000f1da0: PCHS=16383/16/63 translation=lba LCHS=1024/255/63 s=83886080
drive 0x000f1d70: PCHS=203/16/63 translation=none LCHS=203/16/63 s=204800
drive 0x000f1d40: PCHS=203/16/63 translation=none LCHS=203/16/63 s=204800
drive 0x000f1d10: PCHS=203/16/63 translation=none LCHS=203/16/63 s=204800
drive 0x000f1ce0: PCHS=203/16/63 translation=none LCHS=203/16/63 s=204800
drive 0x000f1cb0: PCHS=203/16/63 translation=none LCHS=203/16/63 s=204800
drive 0x000f1c80: PCHS=203/16/63 translation=none LCHS=203/16/63 s=204800
Running option rom at c980:0003
Space available for UMB: cc000-e0800, f0000-f1c80
Returned 249856 bytes of ZoneHigh
e820 map has 9 items:
  0: 0000000000000000 - 000000000009fc00 = 1 RAM
  1: 000000000009fc00 - 00000000000a0000 = 2 RESERVED
  2: 00000000000f0000 - 0000000000100000 = 2 RESERVED
  3: 0000000000100000 - 000000007fffd000 = 1 RAM
  4: 000000007fffd000 - 0000000080000000 = 2 RESERVED
  5: 00000000b0000000 - 00000000c0000000 = 2 RESERVED
  6: 00000000feffc000 - 00000000ff000000 = 2 RESERVED
  7: 00000000fffc0000 - 0000000100000000 = 2 RESERVED
  8: 0000000100000000 - 0000000280000000 = 1 RAM
enter handle_19:
  NULL
Booting from Hard Disk...
Booting from 0000:7c00
VBE mode info request: 101
VBE mode info request: 111
VBE mode info request: 110
VBE mode info request: 112
VBE mode info request: 103
VBE mode info request: 114
VBE mode info request: 113
VBE mode info request: 105
VBE mode info request: 117
VBE mode info request: 116
VBE mode info request: 115
VBE mode info request: 118
VBE mode info request: 107
VBE mode info request: 119
VBE mode info request: 11a
VBE mode info request: 0
VBE mode info request: 1
VBE mode info request: 2
VBE mode info request: 3
VBE mode info request: 4
VBE mode info request: 5
VBE mode info request: 6
VBE mode info request: 7
VBE mode info request: d
VBE mode info request: e
VBE mode info request: f
VBE mode info request: 10
VBE mode info request: 11
VBE mode info request: 12
VBE mode info request: 13
VBE mode info request: 6a
set VGA mode 3
cirrus mode switch regular

2. all disks(249) can be found inside guest.

 

Gerd,
QE have two questions.

Q1, base on this test result above.  Is this bug fixed?

Q2. HMP print some warning & fail message.  Is it expect result?

Comment 13 Gerd Hoffmann 2014-07-29 13:26:07 UTC
So it doesn't stop booting with "PCI: out of I/O address space", good, bug is fixed (/proc/ioports shows the I/O address space layout within the guest btw).

The error messages are normal, seabios can't manage that many disks due to running out of memory.

Comment 14 Jun Li 2014-12-23 07:13:43 UTC
(In reply to Gerd Hoffmann from comment #13)
> So it doesn't stop booting with "PCI: out of I/O address space", good, bug
> is fixed (/proc/ioports shows the I/O address space layout within the guest
> btw).
> 
> The error messages are normal, seabios can't manage that many disks due to
> running out of memory.

Hi Gerd,

   QE also retest this bz. Seems it still exist following issues:

1, Add 15 pci-bridge for q35 machine type:
# /usr/libexec/qemu-kvm -M q35 -monitor stdio -m 4096 -smp 2,maxcpus=2,cores=1,threads=1,sockets=2 -spice port=3000,disable-ticketing -device pci-bridge,bus=pcie.0,id=bridge1,chassis_nr=1,addr=0x4 -drive id=drive_image1,if=none,cache=none,snapshot=off,aio=native,file=/home/RHEL-Server-6.5-64.qcow2 -device virtio-blk-pci,id=image1,drive=drive_image1,bootindex=0,bus=bridge1,addr=0x7 -device virtio-net-pci,mac=9a:51:52:53:54:55,id=nic1,netdev=net1,bus=bridge1,addr=0x8 -netdev tap,id=net1,vhost=on -device nec-usb-xhci,id=xhci2,bus=bridge1,addr=0x1 -device pci-bridge,bus=pcie.0,id=bridge2,chassis_nr=1,addr=0x5 -device pci-bridge,bus=pcie.0,id=bridge3,chassis_nr=1,addr=0x6 -device pci-bridge,bus=pcie.0,id=bridge4,chassis_nr=1,addr=0x7 -device pci-bridge,bus=pcie.0,id=bridge5,chassis_nr=1,addr=0x8 -device pci-bridge,bus=pcie.0,id=bridge6,chassis_nr=1,addr=0x9 -device pci-bridge,bus=pcie.0,id=bridge7,chassis_nr=1,addr=0xA -device pci-bridge,bus=pcie.0,id=bridge8,chassis_nr=1,addr=0xB -device pci-bridge,bus=pcie.0,id=bridge9,chassis_nr=1,addr=0xC -device pci-bridge,bus=pcie.0,id=bridge10,chassis_nr=1,addr=0xD -device pci-bridge,bus=pcie.0,id=bridge11,chassis_nr=1,addr=0xE -device pci-bridge,bus=pcie.0,id=bridge12,chassis_nr=1,addr=0xF -device pci-bridge,bus=pcie.0,id=bridge13,chassis_nr=1,addr=0x10 -device pci-bridge,bus=pcie.0,id=bridge14,chassis_nr=1,addr=0x11 -device pci-bridge,bus=pcie.0,id=bridge15,chassis_nr=1,addr=0x12 -chardev stdio,id=log -device isa-debugcon,iobase=0x402,chardev=log

Can not boot up. qemu-kvm will still stop booting with "PCI: out of I/O address space". 

2, Add 14 pci-bridge for q35 machine type:
# /usr/libexec/qemu-kvm -M q35 -monitor stdio -m 4096 -smp 2,maxcpus=2,cores=1,threads=1,sockets=2 -spice port=3000,disable-ticketing -device pci-bridge,bus=pcie.0,id=bridge1,chassis_nr=1,addr=0x4 -drive id=drive_image1,if=none,cache=none,snapshot=off,aio=native,file=/home/RHEL-Server-6.5-64.qcow2 -device virtio-blk-pci,id=image1,drive=drive_image1,bootindex=0,bus=bridge1,addr=0x7 -device virtio-net-pci,mac=9a:51:52:53:54:55,id=nic1,netdev=net1,bus=bridge1,addr=0x8 -netdev tap,id=net1,vhost=on -device nec-usb-xhci,id=xhci2,bus=bridge1,addr=0x1 -device pci-bridge,bus=pcie.0,id=bridge2,chassis_nr=1,addr=0x5 -device pci-bridge,bus=pcie.0,id=bridge3,chassis_nr=1,addr=0x6 -device pci-bridge,bus=pcie.0,id=bridge4,chassis_nr=1,addr=0x7 -device pci-bridge,bus=pcie.0,id=bridge5,chassis_nr=1,addr=0x8 -device pci-bridge,bus=pcie.0,id=bridge6,chassis_nr=1,addr=0x9 -device pci-bridge,bus=pcie.0,id=bridge7,chassis_nr=1,addr=0xA -device pci-bridge,bus=pcie.0,id=bridge8,chassis_nr=1,addr=0xB -device pci-bridge,bus=pcie.0,id=bridge9,chassis_nr=1,addr=0xC -device pci-bridge,bus=pcie.0,id=bridge10,chassis_nr=1,addr=0xD -device pci-bridge,bus=pcie.0,id=bridge11,chassis_nr=1,addr=0xE -device pci-bridge,bus=pcie.0,id=bridge12,chassis_nr=1,addr=0xF -device pci-bridge,bus=pcie.0,id=bridge13,chassis_nr=1,addr=0x10 -device pci-bridge,bus=pcie.0,id=bridge14,chassis_nr=1,addr=0x11 -chardev stdio,id=log -device isa-debugcon,iobase=0x402,chardev=log

Guest can boot up successfully. qemu-kvm, gues and host are all works well.

Based on above test, seems for q35 machine only support 14 pci-bridge currently. But as comment 6 seems it should support 15 pci-bridge. What's your opinion? Thanks.


Version of components:
seabios-bin-1.7.5-5.el7.noarch
qemu-kvm-rhev-2.1.2-17.el7.x86_64

Best Regards,
Jun Li

Comment 16 Gerd Hoffmann 2015-01-05 08:31:40 UTC
> Based on above test, seems for q35 machine only support 14 pci-bridge
> currently. But as comment 6 seems it should support 15 pci-bridge. What's
> your opinion? Thanks.

14 is correct.  I forgot about the devices on the root bus (00:1f.*) which need some I/O address space too.

pc machine type is unchanged indeed, it is fixed for q35 only.
pc should handle 8 pci bridges.

30 pci-bridge devices is not going to work.  They support hotplug, and because of that seabios reserves I/O address space for them unconditionally.

Comment 17 juzhang 2015-01-09 09:04:53 UTC
Based on comment16, I plan to update our test case and set this bz as verified.

Hi Mirek,

Do we need to add this bz into rhel7.1 seabios errata? It's test only bz, I'm not sure we need to add this bz into to rhel7.1 seabios errata.

Best Regards,
Junyi

Comment 18 Miroslav Rezanina 2015-01-09 12:11:30 UTC
Yes, it has to be added. I'll handle it.

Comment 21 errata-xmlrpc 2015-03-05 08:15:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0345.html