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 1034518

Summary: boot order wrong with q35
Product: Red Hat Enterprise Linux 7 Reporter: mazhang <mazhang>
Component: qemu-kvmAssignee: Gerd Hoffmann <kraxel>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: acathrow, flang, hhuang, juzhang, marcel, michen, mjenner, mrezanin, mst, qzhang, rhod, svenkatr, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-1.5.3-38.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 09:35:10 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:
Attachments:
Description Flags
seabios log none

Description mazhang 2013-11-26 03:05:48 UTC
Description of problem:
boot order wrong with q35


Version-Release number of selected component (if applicable):


host:
kernel-3.10.0-54.el7.x86_64
qemu-kvm-1.5.3-19.el7.x86_64
seabios-bin-1.7.2.2-4.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1.cli:
#/usr/libexec/qemu-kvm \
-M q35 \
-cpu SandyBridge \
-m 4G \
-S \
-smp 4,sockets=2,cores=2,threads=1,maxcpus=16 \
-enable-kvm \
-name win7 \
-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 \
-rtc base=localtime,clock=host,driftfix=slew \
-monitor stdio \
-qmp tcp:0:6666,server,nowait \
-nodefaults \
-boot menu=on \
-bios /usr/share/seabios/bios.bin \
-vga qxl \
-spice port=5900,disable-ticketing \
-global PIIX4_PM.disable_s3=0 \
-global PIIX4_PM.disable_s4=0 \
-device ioh3420,bus=pcie.0,id=root.0,slot=1 \
-device x3130-upstream,bus=root.0,id=upstream \
-device xio3130-downstream,bus=upstream,id=downstream0,chassis=1 \
-drive file=/mnt/rhel7-64.raw,if=none,id=drive-virtio-disk0,format=raw,cache=none,werror=stop,rerror=stop,aio=threads \
-device virtio-blk-pci,scsi=off,bus=downstream0,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=0 \
-device ioh3420,bus=pcie.0,id=root.1,slot=2 \
-device x3130-upstream,bus=root.1,id=upstream1 \
-device xio3130-downstream,bus=upstream1,id=downstream2,chassis=3 \
-netdev tap,id=hostnet0,downscript=no,vhost=on,queues=4,script=/etc/ovs-ifup,downscript=/etc/ovs-ifdown \
-device virtio-net-pci,id=net0,vectors=9,mq=on,netdev=hostnet0,mac=52:54:00:39:13:2c,bus=downstream2 \
-drive file=/home/boot.iso,index=2,if=none,id=drive-ide0-0-1,media=cdrom,format=raw \
-device ide-cd,drive=drive-ide0-0-1,bootindex=1 \
-chardev socket,id=seabios,path=/tmp/seabios,server,nowait \
-device isa-debugcon,chardev=seabios,iobase=0x402 \

2.
3.

Actual results:
First boot device is cdrom, guest will boot from cdrom without press F12.

SeaBIOS (version seabios-1.7.2.2-4.el7)
Machine UUID feebc8fd-f8b0-4e75-abc3-e63fcdb67170
Found 0 lpt ports
Found 0 serial ports
AHCI controller at 1f.2, iobase fc212000, irq 10
Searching bootorder for: /pci@i0cf8/*@1f,2/drive@5/disk@0
found virtio-blk at 3:0
Searching bootorder for: /pci@i0cf8/pci-bridge@2/pci-bridge@0/pci-bridge@0/*@0
AHCI/5: registering: "DVD/CD [AHCI/5: QEMU DVD-ROM ATAPI-4 DVD/CD]"
PS2 keyboard initialized
All threads complete.
Scan for option roms
Running option rom at c900:0003
pmm call arg1=1
pmm call arg1=0
pmm call arg1=1
pmm call arg1=0
Searching bootorder for: /pci@i0cf8/pci-bridge@3/pci-bridge@0/pci-bridge@0/*@0
Searching bootorder for: /rom@genroms/kvmvapic.bin

Press F12 for boot menu.

Select boot device:

1. DVD/CD [AHCI/5: QEMU DVD-ROM ATAPI-4 DVD/CD]
2. Virtio disk PCI:3:0
3. Legacy option rom
4. iPXE (PCI 06:00.0)

Expected results:
virtio disk should be this first boot device.

Additional info:
with "-M pc" not hit this problem.

Comment 1 mazhang 2013-11-26 03:07:06 UTC
Created attachment 829027 [details]
seabios log

Comment 3 Gerd Hoffmann 2013-12-06 08:35:30 UTC
Looks like the pci bridges cause this.

Comment 4 Gerd Hoffmann 2013-12-09 07:18:56 UTC
http://patchwork.ozlabs.org/patch/297716/

Comment 5 Gerd Hoffmann 2014-01-16 14:01:05 UTC
upstream commit 4c41425d2e79f267b2236da31abedb866777d92f now.

Comment 6 Gerd Hoffmann 2014-01-16 14:28:58 UTC
patches posted

Comment 7 Miroslav Rezanina 2014-01-17 13:27:20 UTC
Fix included in qemu-kvm-1.5.3-38.el7

Comment 9 langfang 2014-02-10 07:53:54 UTC
Reproduce this bug as follow version:
Host:
# uname -r
3.10.0-84.el7.x86_64
# rpm -q qemu-kvm
qemu-kvm-1.5.3-37.el7.x86_64
# rpm -q seabios
seabios-1.7.2.2-11.el7.x86_64

Guest:rhel7

Steps:
1)Boot guest with CLI like comment0
2)Continue guest
(qemu)c
3)Press F12 see the seabios boot order and try boot guest

Results:DVD/CD  ranks 1.Guest will boot from DVD/CD in default
1. DVD/CD [AHCI/5: QEMU DVD-ROM ATAPI-4 DVD/CD]
2. Virtio disk PCI:3:0
3. Legacy option rom
4. iPXE (PCI 06:00.0)

Verify this bug as follow version:
Host
# uname -r
3.10.0-84.el7.x86_64
# rpm -q qemu-kvm
qemu-kvm-1.5.3-45.el7.x86_64
# rpm -q seabios
seabios-1.7.2.2-11.el7.x86_64

Guest:rhel7

Steps as same as reproduce

Results:The first is virtio disk, and guest work well
1. Virtio disk PCI:3:0
2. DVD/CD [AHCI/5: QEMU DVD-ROM ATAPI-4 DVD/CD]
3. Legacy option rom
4. iPXE (PCI 06:00.0)


Addtional info:
1)Also test boot guest with two disk and "-M q35",the boot order is correct
2)Also test boot guest with one disk and one scsi CDROM and "-M q35",the boot order is correct

According to above test ,this bug fixed.

Comment 11 Ludek Smid 2014-06-13 09:35:10 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.