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 1272938 - [PCIe] SeaBIOS should not assign automatically IO ranges to PCIe bridges
Summary: [PCIe] SeaBIOS should not assign automatically IO ranges to PCIe bridges
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: seabios
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Marcel Apfelbaum
QA Contact: aihua liang
URL:
Whiteboard:
: 1094134 (view as bug list)
Depends On:
Blocks: 1113520 1227278 1305606 1313485
TreeView+ depends on / blocked
 
Reported: 2015-10-19 09:16 UTC by Marcel Apfelbaum
Modified: 2019-03-26 15:12 UTC (History)
12 users (show)

Fixed In Version: seabios-1.9.1-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 00:27:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
seabios log (30.89 KB, text/plain)
2016-05-19 05:13 UTC, jingzhao
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2016:2207 0 normal SHIPPED_LIVE seabios bug fix update 2016-11-03 13:23:27 UTC

Description Marcel Apfelbaum 2015-10-19 09:16:09 UTC
SeaBIOS sees each PCIe downstream port as a PCI bridge and it will assign a 4K IO range. Since we have only one device behind each downstream port this results into a 16 usable devices limit.

Remove the limitation by not assigning an IO range to each downstream port. PCIe spec requires PCIe devices to be able to work correctly without IO ports using MSI/MSIX only.

Comment 1 Marcel Apfelbaum 2015-12-22 08:11:47 UTC
Testing: In order to test this patch we need some PCIe devices. Virtio devices
         are a good fit, but the patches are part of Qemu 2.5 which was not yet rebased.
         In the meantime this brew can be used:
         http://brewweb.devel.redhat.com/brew/taskinfo?taskID=10267934.

In order to convert the virtio devices to PCIe use disable-modern=off and to disable IO use disable-legacy=on.
Please see the upstream patch for further info:
  (76327b9)fw/pci: do not automatically allocate IO region for PCIe bridges

Also note that there may be an issue with virtio-blk-pci devices that cannot work without IO.

Comment 2 Marcel Apfelbaum 2015-12-22 15:26:18 UTC
*** Bug 1094134 has been marked as a duplicate of this bug. ***

Comment 4 jingzhao 2016-05-19 05:11:30 UTC
Hi Marcel

  How about the test scenario of this function. Could you help me confirm it?

I don't know how to check the enable function, and I didn't find any useful info on seabios log

kernel-3.10.0-402.el7.x86_64
seabios-1.9.1-4.el7.x86_64
qemu-kvm-rhev-2.6.0-1.el7.x86_64

1.Boot vm with following command:
/usr/libexec/qemu-kvm \
-M q35 \
-cpu SandyBridge \
-nodefaults -rtc base=utc \
-m 4G \
-smp 2,sockets=2,cores=1,threads=1 \
-enable-kvm \
-name rhel7 \
-uuid 990ea161-6b67-47b2-b803-19fb01d30d12 \
-smbios type=1,manufacturer='Red Hat',product='RHEV Hypervisor',version=el6,serial=koTUXQrb,uuid=feebc8fd-f8b0-4e75-abc3-e63fcdb67170 \
-k en-us \
-serial unix:/tmp/serial0,server,nowait \
-boot menu=on \
-bios /usr/share/seabios/bios.bin \
-vga std \
-vnc :1 \
-qmp tcp:0:6666,server,nowait \
-chardev file,path=/home/bug/seabios.log,id=seabios \
-device isa-debugcon,chardev=seabios,iobase=0x402 \
-device ioh3420,bus=pcie.0,id=root.0,slot=1 \
-device x3130-upstream,bus=root.0,id=upstream1 \
-device xio3130-downstream,bus=upstream1,id=downstream1,chassis=1 \
-drive file=/home/bug/1272939/pxb.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,werror=stop,rerror=stop,aio=threads \
-device virtio-blk-pci,bus=downstream1,drive=drive-virtio-disk0,id=virtio-disk0,disable-legacy=on,disable-modern=off,bootindex=0 \
-device xio3130-downstream,bus=upstream1,id=downstream2,chassis=2 \
-device virtio-scsi-pci,bus=downstream2,id=scsi_pci_bus0,disable-legacy=on,disable-modern=off \
-drive file=/home/bug/1272759/test.qcow2,if=none,id=virtio-scsi,format=qcow2,cache=none,werror=stop,rerror=stop,aio=threads \
-device scsi-hd,bus=scsi_pci_bus0.0,drive=virtio-scsi,id=virtio-disk1 \
-device xio3130-downstream,bus=upstream1,id=downstream3,chassis=3 \
-device virtio-net-pci,bus=downstream3,netdev=tap10,mac=9a:6a:6b:6c:6d:6e,disable-legacy=on,disable-modern=off \
-netdev tap,id=tap10 \
-monitor stdio \

2. In guest, info of "lspci -vnn"
03:00.0 SCSI storage controller [0100]: Red Hat, Inc Device [1af4:1042] (rev 01)
	Subsystem: Red Hat, Inc Device [1af4:1100]
	Physical Slot: 0
	Flags: bus master, fast devsel, latency 0, IRQ 22
	Memory at fe800000 (32-bit, non-prefetchable) [size=4K]
	Memory at fd000000 (64-bit, prefetchable) [size=8M]
	Capabilities: [dc] MSI-X: Enable+ Count=2 Masked-
	Capabilities: [c8] Vendor Specific Information: Len=14 <?>
	Capabilities: [b4] Vendor Specific Information: Len=14 <?>
	Capabilities: [a4] Vendor Specific Information: Len=10 <?>
	Capabilities: [94] Vendor Specific Information: Len=10 <?>
	Capabilities: [84] Vendor Specific Information: Len=10 <?>
	Capabilities: [7c] Power Management version 3
	Capabilities: [40] Express Endpoint, MSI 00
	Kernel driver in use: virtio-pci

04:00.0 SCSI storage controller [0100]: Red Hat, Inc Device [1af4:1048] (rev 01)
	Subsystem: Red Hat, Inc Device [1af4:1100]
	Physical Slot: 0-1
	Flags: bus master, fast devsel, latency 0, IRQ 23
	Memory at fe600000 (32-bit, non-prefetchable) [size=4K]
	Memory at fc800000 (64-bit, prefetchable) [size=8M]
	Capabilities: [dc] MSI-X: Enable+ Count=4 Masked-
	Capabilities: [c8] Vendor Specific Information: Len=14 <?>
	Capabilities: [b4] Vendor Specific Information: Len=14 <?>
	Capabilities: [a4] Vendor Specific Information: Len=10 <?>
	Capabilities: [94] Vendor Specific Information: Len=10 <?>
	Capabilities: [84] Vendor Specific Information: Len=10 <?>
	Capabilities: [7c] Power Management version 3
	Capabilities: [40] Express Endpoint, MSI 00
	Kernel driver in use: virtio-pci

05:00.0 Ethernet controller [0200]: Red Hat, Inc Device [1af4:1041] (rev 01)
	Subsystem: Red Hat, Inc Device [1af4:1100]
	Physical Slot: 0-2
	Flags: bus master, fast devsel, latency 0, IRQ 20
	Memory at fe440000 (32-bit, non-prefetchable) [size=4K]
	Memory at fc000000 (64-bit, prefetchable) [size=8M]
	Expansion ROM at fe400000 [disabled] [size=256K]
	Capabilities: [dc] MSI-X: Enable+ Count=3 Masked-
	Capabilities: [c8] Vendor Specific Information: Len=14 <?>
	Capabilities: [b4] Vendor Specific Information: Len=14 <?>
	Capabilities: [a4] Vendor Specific Information: Len=10 <?>
	Capabilities: [94] Vendor Specific Information: Len=10 <?>
	Capabilities: [84] Vendor Specific Information: Len=10 <?>
	Capabilities: [7c] Power Management version 3
	Capabilities: [40] Express Endpoint, MSI 00
	Kernel driver in use: virtio-pci

3. Attachment is the seabios log

Comment 5 jingzhao 2016-05-19 05:13:36 UTC
Created attachment 1159250 [details]
seabios log

Comment 6 Marcel Apfelbaum 2016-05-19 14:47:08 UTC
(In reply to jingzhao from comment #5)
> Created attachment 1159250 [details]
> seabios log

(In reply to jingzhao from comment #4)
> Hi Marcel
> 
>   How about the test scenario of this function. Could you help me confirm it?
> 
> I don't know how to check the enable function, and I didn't find any useful
> info on seabios log

What you show here is not enough. You should add the lspci result of the upstream and downstream bridges.

You can see that the virtio-blck devices are using only memory ranges, 
but not IO ranges.

In order to check that it works OK you need to check the bridges too.
First time without disable* and see the IO range is assigned. Second time with disable* and see that the bridges don't have the IO ranges anymore.

The scenario you selected is correct.

Thanks,
Marcel  


> 
> kernel-3.10.0-402.el7.x86_64
> seabios-1.9.1-4.el7.x86_64
> qemu-kvm-rhev-2.6.0-1.el7.x86_64
> 
> 1.Boot vm with following command:
> /usr/libexec/qemu-kvm \
> -M q35 \
> -cpu SandyBridge \
> -nodefaults -rtc base=utc \
> -m 4G \
> -smp 2,sockets=2,cores=1,threads=1 \
> -enable-kvm \
> -name rhel7 \
> -uuid 990ea161-6b67-47b2-b803-19fb01d30d12 \
> -smbios type=1,manufacturer='Red Hat',product='RHEV
> Hypervisor',version=el6,serial=koTUXQrb,uuid=feebc8fd-f8b0-4e75-abc3-
> e63fcdb67170 \
> -k en-us \
> -serial unix:/tmp/serial0,server,nowait \
> -boot menu=on \
> -bios /usr/share/seabios/bios.bin \
> -vga std \
> -vnc :1 \
> -qmp tcp:0:6666,server,nowait \
> -chardev file,path=/home/bug/seabios.log,id=seabios \
> -device isa-debugcon,chardev=seabios,iobase=0x402 \
> -device ioh3420,bus=pcie.0,id=root.0,slot=1 \
> -device x3130-upstream,bus=root.0,id=upstream1 \
> -device xio3130-downstream,bus=upstream1,id=downstream1,chassis=1 \
> -drive
> file=/home/bug/1272939/pxb.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,
> cache=none,werror=stop,rerror=stop,aio=threads \
> -device
> virtio-blk-pci,bus=downstream1,drive=drive-virtio-disk0,id=virtio-disk0,
> disable-legacy=on,disable-modern=off,bootindex=0 \
> -device xio3130-downstream,bus=upstream1,id=downstream2,chassis=2 \
> -device
> virtio-scsi-pci,bus=downstream2,id=scsi_pci_bus0,disable-legacy=on,disable-
> modern=off \
> -drive
> file=/home/bug/1272759/test.qcow2,if=none,id=virtio-scsi,format=qcow2,
> cache=none,werror=stop,rerror=stop,aio=threads \
> -device scsi-hd,bus=scsi_pci_bus0.0,drive=virtio-scsi,id=virtio-disk1 \
> -device xio3130-downstream,bus=upstream1,id=downstream3,chassis=3 \
> -device
> virtio-net-pci,bus=downstream3,netdev=tap10,mac=9a:6a:6b:6c:6d:6e,disable-
> legacy=on,disable-modern=off \
> -netdev tap,id=tap10 \
> -monitor stdio \
> 
> 2. In guest, info of "lspci -vnn"
> 03:00.0 SCSI storage controller [0100]: Red Hat, Inc Device [1af4:1042] (rev
> 01)
> 	Subsystem: Red Hat, Inc Device [1af4:1100]
> 	Physical Slot: 0
> 	Flags: bus master, fast devsel, latency 0, IRQ 22
> 	Memory at fe800000 (32-bit, non-prefetchable) [size=4K]
> 	Memory at fd000000 (64-bit, prefetchable) [size=8M]
> 	Capabilities: [dc] MSI-X: Enable+ Count=2 Masked-
> 	Capabilities: [c8] Vendor Specific Information: Len=14 <?>
> 	Capabilities: [b4] Vendor Specific Information: Len=14 <?>
> 	Capabilities: [a4] Vendor Specific Information: Len=10 <?>
> 	Capabilities: [94] Vendor Specific Information: Len=10 <?>
> 	Capabilities: [84] Vendor Specific Information: Len=10 <?>
> 	Capabilities: [7c] Power Management version 3
> 	Capabilities: [40] Express Endpoint, MSI 00
> 	Kernel driver in use: virtio-pci
> 
> 04:00.0 SCSI storage controller [0100]: Red Hat, Inc Device [1af4:1048] (rev
> 01)
> 	Subsystem: Red Hat, Inc Device [1af4:1100]
> 	Physical Slot: 0-1
> 	Flags: bus master, fast devsel, latency 0, IRQ 23
> 	Memory at fe600000 (32-bit, non-prefetchable) [size=4K]
> 	Memory at fc800000 (64-bit, prefetchable) [size=8M]
> 	Capabilities: [dc] MSI-X: Enable+ Count=4 Masked-
> 	Capabilities: [c8] Vendor Specific Information: Len=14 <?>
> 	Capabilities: [b4] Vendor Specific Information: Len=14 <?>
> 	Capabilities: [a4] Vendor Specific Information: Len=10 <?>
> 	Capabilities: [94] Vendor Specific Information: Len=10 <?>
> 	Capabilities: [84] Vendor Specific Information: Len=10 <?>
> 	Capabilities: [7c] Power Management version 3
> 	Capabilities: [40] Express Endpoint, MSI 00
> 	Kernel driver in use: virtio-pci
> 
> 05:00.0 Ethernet controller [0200]: Red Hat, Inc Device [1af4:1041] (rev 01)
> 	Subsystem: Red Hat, Inc Device [1af4:1100]
> 	Physical Slot: 0-2
> 	Flags: bus master, fast devsel, latency 0, IRQ 20
> 	Memory at fe440000 (32-bit, non-prefetchable) [size=4K]
> 	Memory at fc000000 (64-bit, prefetchable) [size=8M]
> 	Expansion ROM at fe400000 [disabled] [size=256K]
> 	Capabilities: [dc] MSI-X: Enable+ Count=3 Masked-
> 	Capabilities: [c8] Vendor Specific Information: Len=14 <?>
> 	Capabilities: [b4] Vendor Specific Information: Len=14 <?>
> 	Capabilities: [a4] Vendor Specific Information: Len=10 <?>
> 	Capabilities: [94] Vendor Specific Information: Len=10 <?>
> 	Capabilities: [84] Vendor Specific Information: Len=10 <?>
> 	Capabilities: [7c] Power Management version 3
> 	Capabilities: [40] Express Endpoint, MSI 00
> 	Kernel driver in use: virtio-pci
> 
> 3. Attachment is the seabios log

Comment 7 jingzhao 2016-05-23 06:36:30 UTC
Tested it with kernel-3.10.0-402.el7.x86_64,qemu-kvm-rhev-2.6.0-2.el7.x86_64 and seabios-1.9.1-4.el7.x86_64 

Test steps
1. Boot vm without disable* parameters
/usr/libexec/qemu-kvm \
-M q35 \
-cpu SandyBridge \
-nodefaults -rtc base=utc \
-m 4G \
-smp 2,sockets=2,cores=1,threads=1 \
-enable-kvm \
-name rhel7 \
-uuid 990ea161-6b67-47b2-b803-19fb01d30d12 \
-smbios type=1,manufacturer='Red Hat',product='RHEV Hypervisor',version=el6,serial=koTUXQrb,uuid=feebc8fd-f8b0-4e75-abc3-e63fcdb67170 \
-k en-us \
-serial unix:/tmp/serial0,server,nowait \
-boot menu=on \
-bios /usr/share/seabios/bios.bin \
-vga std \
-vnc :1 \
-qmp tcp:0:6666,server,nowait \
-chardev file,path=/home/bug/seabios.log,id=seabios \
-device isa-debugcon,chardev=seabios,iobase=0x402 \
-device ioh3420,bus=pcie.0,id=root.0,slot=1 \
-device x3130-upstream,bus=root.0,id=upstream1 \
-device xio3130-downstream,bus=upstream1,id=downstream1,chassis=1 \
-drive file=/home/bug/1272939/pxb.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,werror=stop,rerror=stop,aio=threads \
-device virtio-blk-pci,bus=downstream1,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=0 \
-device xio3130-downstream,bus=upstream1,id=downstream2,chassis=2 \
-device virtio-scsi-pci,bus=downstream2,id=scsi_pci_bus0 \
-drive file=/home/bug/1272759/test.qcow2,if=none,id=virtio-scsi,format=qcow2,cache=none,werror=stop,rerror=stop,aio=threads \
-device scsi-hd,bus=scsi_pci_bus0.0,drive=virtio-scsi,id=virtio-disk1 \
-device xio3130-downstream,bus=upstream1,id=downstream3,chassis=3 \
-device virtio-net-pci,bus=downstream3,netdev=tap10,mac=9a:6a:6b:6c:6d:6e \
-netdev tap,id=tap10 \
-monitor stdio \

2. Check the lspci result in guest

01:00.0 PCI bridge: Texas Instruments XIO3130 PCI Express Switch (Upstream) (rev 02) (prog-if 00 [Normal decode])
	Physical Slot: 1
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Bus: primary=01, secondary=02, subordinate=05, sec-latency=0
	I/O behind bridge: 0000c000-0000efff
	Memory behind bridge: fe400000-fe9fffff
	Prefetchable memory behind bridge: 00000000fd000000-00000000fd5fffff
	Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
	BridgeCtl: Parity- SERR+ NoISA- VGA- MAbort- >Reset- FastB2B-
		PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
	Capabilities: [90] Express (v2) Upstream Port, MSI 00

02:00.0 PCI bridge: Texas Instruments XIO3130 PCI Express Switch (Downstream) (rev 01) (prog-if 00 [Normal decode])
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Bus: primary=02, secondary=03, subordinate=03, sec-latency=0
	I/O behind bridge: 0000e000-0000efff
	Memory behind bridge: fe800000-fe9fffff
	Prefetchable memory behind bridge: 00000000fd400000-00000000fd5fffff
	Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
	BridgeCtl: Parity- SERR+ NoISA- VGA- MAbort- >Reset- FastB2B-
		PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
	Capabilities: [90] Express (v2) Downstream Port (Slot+), MSI 00

02:01.0 PCI bridge: Texas Instruments XIO3130 PCI Express Switch (Downstream) (rev 01) (prog-if 00 [Normal decode])
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Bus: primary=02, secondary=04, subordinate=04, sec-latency=0
	I/O behind bridge: 0000d000-0000dfff
	Memory behind bridge: fe600000-fe7fffff
	Prefetchable memory behind bridge: 00000000fd200000-00000000fd3fffff
	Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
	BridgeCtl: Parity- SERR+ NoISA- VGA- MAbort- >Reset- FastB2B-
		PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
	Capabilities: [90] Express (v2) Downstream Port (Slot+), MSI 00

02:02.0 PCI bridge: Texas Instruments XIO3130 PCI Express Switch (Downstream) (rev 01) (prog-if 00 [Normal decode])
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Bus: primary=02, secondary=05, subordinate=05, sec-latency=0
	I/O behind bridge: 0000c000-0000cfff
	Memory behind bridge: fe400000-fe5fffff
	Prefetchable memory behind bridge: 00000000fd000000-00000000fd1fffff
	Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
	BridgeCtl: Parity- SERR+ NoISA- VGA- MAbort- >Reset- FastB2B-
		PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
	Capabilities: [90] Express (v2) Downstream Port (Slot+), MSI 00

03:00.0 SCSI storage controller: Red Hat, Inc Virtio block device
	Subsystem: Red Hat, Inc Device 0002
	Physical Slot: 0
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 22
	Region 0: I/O ports at e000 [size=64]
	Region 1: Memory at fe800000 (32-bit, non-prefetchable) [size=4K]
	Capabilities: [40] MSI-X: Enable+ Count=2 Masked-
		Vector table: BAR=1 offset=00000000
		PBA: BAR=1 offset=00000800
	Kernel driver in use: virtio-pci

04:00.0 SCSI storage controller: Red Hat, Inc Virtio SCSI
	Subsystem: Red Hat, Inc Device 0008
	Physical Slot: 0-1
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 23
	Region 0: I/O ports at d000 [size=64]
	Region 1: Memory at fe600000 (32-bit, non-prefetchable) [size=4K]
	Capabilities: [40] MSI-X: Enable+ Count=4 Masked-
		Vector table: BAR=1 offset=00000000
		PBA: BAR=1 offset=00000800
	Kernel driver in use: virtio-pci

05:00.0 Ethernet controller: Red Hat, Inc Virtio network device
	Subsystem: Red Hat, Inc Device 0001
	Physical Slot: 0-2
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 20
	Region 0: I/O ports at c000 [size=32]
	Region 1: Memory at fe440000 (32-bit, non-prefetchable) [size=4K]
	Expansion ROM at fe400000 [disabled] [size=256K]
	Capabilities: [40] MSI-X: Enable+ Count=3 Masked-
		Vector table: BAR=1 offset=00000000
		PBA: BAR=1 offset=00000800
	Kernel driver in use: virtio-pci

3.Boot vm with disable* parameters

/usr/libexec/qemu-kvm \
-M q35 \
-cpu SandyBridge \
-nodefaults -rtc base=utc \
-m 4G \
-smp 2,sockets=2,cores=1,threads=1 \
-enable-kvm \
-name rhel7 \
-uuid 990ea161-6b67-47b2-b803-19fb01d30d12 \
-smbios type=1,manufacturer='Red Hat',product='RHEV Hypervisor',version=el6,serial=koTUXQrb,uuid=feebc8fd-f8b0-4e75-abc3-e63fcdb67170 \
-k en-us \
-serial unix:/tmp/serial1,server,nowait \
-boot menu=on \
-bios /usr/share/seabios/bios.bin \
-vga std \
-vnc :2 \
-qmp tcp:0:6667,server,nowait \
-chardev file,path=/home/bug/seabios1.log,id=seabios1 \
-device isa-debugcon,chardev=seabios1,iobase=0x402 \
-device ioh3420,bus=pcie.0,id=root.0,slot=1 \
-device x3130-upstream,bus=root.0,id=upstream1 \
-device xio3130-downstream,bus=upstream1,id=downstream1,chassis=1 \
-drive file=/home/bug/rhel.img,if=none,id=drive-virtio-disk0,format=raw,cache=none,werror=stop,rerror=stop,aio=threads \
-device virtio-blk-pci,bus=downstream1,drive=drive-virtio-disk0,id=virtio-disk0,disable-legacy=on,disable-modern=off,bootindex=0 \
-device xio3130-downstream,bus=upstream1,id=downstream2,chassis=2 \
-device virtio-scsi-pci,bus=downstream2,id=scsi_pci_bus0,disable-legacy=on,disable-modern=off \
-drive file=/home/bug/1272759/test.qcow2,if=none,id=virtio-scsi,format=qcow2,cache=none,werror=stop,rerror=stop,aio=threads \
-device scsi-hd,bus=scsi_pci_bus0.0,drive=virtio-scsi,id=virtio-disk1 \
-device xio3130-downstream,bus=upstream1,id=downstream3,chassis=3 \
-device virtio-net-pci,bus=downstream3,netdev=tap10,mac=9a:6a:6b:6c:6d:6e,disable-legacy=on,disable-modern=off \
-netdev tap,id=tap10 \
-monitor stdio \

4. check the lspci test result in guest

01:00.0 PCI bridge: Texas Instruments XIO3130 PCI Express Switch (Upstream) (rev 02) (prog-if 00 [Normal decode])
	Physical Slot: 1
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Bus: primary=01, secondary=02, subordinate=05, sec-latency=0
	I/O behind bridge: 00001000-00003fff
	Memory behind bridge: fe400000-fe9fffff
	Prefetchable memory behind bridge: 00000000fc000000-00000000fd7fffff
	Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
	BridgeCtl: Parity- SERR+ NoISA- VGA- MAbort- >Reset- FastB2B-
		PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
	Capabilities: [90] Express (v2) Upstream Port, MSI 00

02:00.0 PCI bridge: Texas Instruments XIO3130 PCI Express Switch (Downstream) (rev 01) (prog-if 00 [Normal decode])
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Bus: primary=02, secondary=03, subordinate=03, sec-latency=0
	I/O behind bridge: 00001000-00001fff
	Memory behind bridge: fe800000-fe9fffff
	Prefetchable memory behind bridge: 00000000fd000000-00000000fd7fffff
	Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
	BridgeCtl: Parity- SERR+ NoISA- VGA- MAbort- >Reset- FastB2B-
		PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
	Capabilities: [90] Express (v2) Downstream Port (Slot+), MSI 00

02:01.0 PCI bridge: Texas Instruments XIO3130 PCI Express Switch (Downstream) (rev 01) (prog-if 00 [Normal decode])
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Bus: primary=02, secondary=04, subordinate=04, sec-latency=0
	I/O behind bridge: 00002000-00002fff
	Memory behind bridge: fe600000-fe7fffff
	Prefetchable memory behind bridge: 00000000fc800000-00000000fcffffff
	Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
	BridgeCtl: Parity- SERR+ NoISA- VGA- MAbort- >Reset- FastB2B-
		PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
	Capabilities: [90] Express (v2) Downstream Port (Slot+), MSI 00

02:02.0 PCI bridge: Texas Instruments XIO3130 PCI Express Switch (Downstream) (rev 01) (prog-if 00 [Normal decode])
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Bus: primary=02, secondary=05, subordinate=05, sec-latency=0
	I/O behind bridge: 00003000-00003fff
	Memory behind bridge: fe400000-fe5fffff
	Prefetchable memory behind bridge: 00000000fc000000-00000000fc7fffff
	Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
	BridgeCtl: Parity- SERR+ NoISA- VGA- MAbort- >Reset- FastB2B-
		PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
	Capabilities: [90] Express (v2) Downstream Port (Slot+), MSI 00

03:00.0 SCSI storage controller: Red Hat, Inc Device 1042 (rev 01)
	Subsystem: Red Hat, Inc Device 1100
	Physical Slot: 0
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 22
	Region 1: Memory at fe800000 (32-bit, non-prefetchable) [size=4K]
	Region 4: Memory at fd000000 (64-bit, prefetchable) [size=8M]
	Capabilities: [dc] MSI-X: Enable+ Count=2 Masked-
		Vector table: BAR=1 offset=00000000
		PBA: BAR=1 offset=00000800

04:00.0 SCSI storage controller: Red Hat, Inc Device 1048 (rev 01)
	Subsystem: Red Hat, Inc Device 1100
	Physical Slot: 0-1
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 23
	Region 1: Memory at fe600000 (32-bit, non-prefetchable) [size=4K]
	Region 4: Memory at fc800000 (64-bit, prefetchable) [size=8M]
	Capabilities: [dc] MSI-X: Enable+ Count=4 Masked-
		Vector table: BAR=1 offset=00000000
		PBA: BAR=1 offset=00000800

05:00.0 Ethernet controller: Red Hat, Inc Device 1041 (rev 01)
	Subsystem: Red Hat, Inc Device 1100
	Physical Slot: 0-2
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 20
	Region 1: Memory at fe440000 (32-bit, non-prefetchable) [size=4K]
	Region 4: Memory at fc000000 (64-bit, prefetchable) [size=8M]
	Expansion ROM at fe400000 [disabled] [size=256K]
	Capabilities: [dc] MSI-X: Enable+ Count=3 Masked-
		Vector table: BAR=1 offset=00000000
		PBA: BAR=1 offset=00000800

We mainly focus on check the following test result, right?
such as virtio-net-pci device
Without disable* parameters

	Region 0: I/O ports at c000 [size=32]
	Region 1: Memory at fe440000 (32-bit, non-prefetchable) [size=4K]

With disable* parameters:
	Region 1: Memory at fe440000 (32-bit, non-prefetchable) [size=4K]
	Region 4: Memory at fc000000 (64-bit, prefetchable) [size=8M]

Comment 8 Marcel Apfelbaum 2016-05-23 14:36:12 UTC
> 
> We mainly focus on check the following test result, right?
> such as virtio-net-pci device
> Without disable* parameters
> 
> 	Region 0: I/O ports at c000 [size=32]
> 	Region 1: Memory at fe440000 (32-bit, non-prefetchable) [size=4K]
> 
> With disable* parameters:
> 	Region 1: Memory at fe440000 (32-bit, non-prefetchable) [size=4K]
> 	Region 4: Memory at fc000000 (64-bit, prefetchable) [size=8M]

Hi,

This is a SeaBIOS BZ regarding the PCIe bridges (root ports and downstream ports)
So we are interested to see if SeaBIOS will assign IO ranges to PCIe bridges
even if devices attached to them will not use it.

As you can see the virtio-net do not use  the IO but the SeaBIOS did assign IO
ranges to the PCIe bridges.
If you'll try the brew build from comment #1 you will see that the problem
is solved.
For now :
02:02.0 PCI bridge: Texas Instruments XIO3130 PCI Express Switch (Downstream) 
  I/O behind bridge: 00003000-00003fff
even if the device behind it does not use this range.

Is it more clear now?
Thanks,
Marcel

Comment 9 jingzhao 2016-05-24 00:43:44 UTC
(In reply to Marcel Apfelbaum from comment #8)
> > 
> > We mainly focus on check the following test result, right?
> > such as virtio-net-pci device
> > Without disable* parameters
> > 
> > 	Region 0: I/O ports at c000 [size=32]
> > 	Region 1: Memory at fe440000 (32-bit, non-prefetchable) [size=4K]
> > 
> > With disable* parameters:
> > 	Region 1: Memory at fe440000 (32-bit, non-prefetchable) [size=4K]
> > 	Region 4: Memory at fc000000 (64-bit, prefetchable) [size=8M]
> 
> Hi,
> 
> This is a SeaBIOS BZ regarding the PCIe bridges (root ports and downstream
> ports)
> So we are interested to see if SeaBIOS will assign IO ranges to PCIe bridges
> even if devices attached to them will not use it.
> 
> As you can see the virtio-net do not use  the IO but the SeaBIOS did assign
> IO
> ranges to the PCIe bridges.
> If you'll try the brew build from comment #1 you will see that the problem
> is solved.
> For now :
> 02:02.0 PCI bridge: Texas Instruments XIO3130 PCI Express Switch
> (Downstream) 
>   I/O behind bridge: 00003000-00003fff
> even if the device behind it does not use this range.
> 
> Is it more clear now?
> Thanks,
> Marcel

I see, thanks very much, Marcel.
According to comment 5, verified it on kernel-3.10.0-402.el7.x86_64,qemu-kvm-rhev-2.6.0-2.el7.x86_64 and seabios-1.9.1-4.el7.x86_64

Comment 12 errata-xmlrpc 2016-11-04 00:27:21 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/RHEA-2016-2207.html


Note You need to log in before you can comment on or make changes to this bug.