Bug 1245127

Summary: bootindex doesn't work for vfio-pci
Product: Red Hat Enterprise Linux 7 Reporter: Chao Yang <chayang>
Component: qemu-kvm-rhevAssignee: Alex Williamson <alex.williamson>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 7.2CC: alex.williamson, chayang, hhuang, juzhang, michen, mrezanin, virt-maint, yfu
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: qemu-kvm-rhev-2.3.0-15.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-04 16:52: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:

Description Chao Yang 2015-07-21 09:19:15 UTC
Description of problem:
Sub-option bootindex doesn't work for vfio-pci. If specify bootindex=1 for vfio-pci and don't add such option for other bootable devices, seabios doesn't boot from it as top priority.
 

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.3.0-10.el7.x86_64
seabios-1.7.5-11.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. assign a VF to guest with romfile as well as bootindex=1 specified, like:

-device vfio-pci,host=03:10.6,romfile=808610ca.rom,rombar=1,bootindex=1,addr=0xb 

2. don't add bootindex to other devices
3. 

Actual results:

SeaBIOS (version seabios-1.7.5-11.el7)


iPXE (http://ipxe.org) 00:0B.0 CA00 PCI2.10 PnP PMM+BFF989E0+BFEF89E0 CA00
                                                                               



Press ESC for boot menu.

Booting from Hard Disk...
Boot failed: not a bootable disk

Booting from ROM...
iPXE (PCI 00:0B.0) starting execution...ok
iPXE initialising devices...ok


Expected results:

After hint "Press ESC for boot menu", the assigned VF should be picked to try booting 

Additional info:

This is a regression bug, since qemu-kvm-rhev-2.1.2-23.el7_1.6.x86_64.rpm cannot reproduce such issue. Here is the log:

Press ESC for boot menu.

Booting from ROM...
iPXE (PCI 00:0B.0) starting execution...ok
iPXE initialising devices...ok



iPXE 1.0.0+ () -- Open Source Network Boot Firmware -- http://ipxe.org
Features: DNS HTTP iSCSI TFTP AoE ELF MBOOT PXE bzImage Menu PXEXT

net0: 56:a9:81:44:00:61 using igbvf on PCI00:0b.0 (open)
  [Link:up, TX:0 TXE:0 RX:0 RXE:0]
Configuring (net0 56:a9:81:44:00:61)...... ok

Comment 3 Alex Williamson 2015-07-21 12:52:43 UTC
Does bootindex work for an emulated NIC?

Comment 4 Alex Williamson 2015-07-21 22:34:18 UTC
(In reply to Alex Williamson from comment #3)
> Does bootindex work for an emulated NIC?

Found it.  The problem is isolated to vfio-pci, the code split in preparation for vfio-platform devices added bootindex as a device property, which makes the actual bootindex ignored.  Patch posted upstream:

http://lists.nongnu.org/archive/html/qemu-devel/2015-07/msg04435.html

Comment 5 Miroslav Rezanina 2015-08-05 08:19:55 UTC
Fix included in qemu-kvm-rhev-2.3.0-15.el7

Comment 6 Chao Yang 2015-08-11 07:55:20 UTC
Verified pass with qemu-kvm-rhev-2.3.0-16.el7.x86_64. Setting guest to boot from assigned VF:

iPXE (http://ipxe.org) 00:04.0 CA00 PCI2.10 PnP PMM+BFF98920+BFEF8920 CA00
                                                                               



Press ESC for boot menu.

Booting from ROM...
iPXE (PCI 00:04.0) starting execution...ok
iPXE initialising devices...ok



iPXE 1.0.0+ () -- Open Source Network Boot Firmware -- http://ipxe.org
Features: DNS HTTP iSCSI TFTP AoE ELF MBOOT PXE bzImage Menu PXEXT

net0: 56:48:9f:78:fa:86 using igbvf on PCI00:04.0 (open)
  [Link:up, TX:0 TXE:0 RX:0 RXE:0]
Configuring (net0 56:48:9f:78:fa:86).....


Per above, this issue has fixed.

Comment 13 juzhang 2015-08-17 04:21:33 UTC
According to comment6, set this issue as verified.

Comment 15 errata-xmlrpc 2015-12-04 16:52: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-2546.html