Bug 1515393

Summary: bootindex is not taken into account for virtio-scsi devices on ppc64 if the LUN is >= 256
Product: Red Hat Enterprise Linux 7 Reporter: Thomas Huth <thuth>
Component: qemu-kvm-rhevAssignee: Thomas Huth <thuth>
Status: CLOSED ERRATA QA Contact: Yongxue Hong <yhong>
Severity: low Docs Contact:
Priority: low    
Version: 7.5CC: coli, lmiksik, micai, michen, qzhang, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: ppc64le   
OS: Linux   
Whiteboard:
Fixed In Version: qemu-kvm-rhev-2.10.0-9.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-11 00:49:36 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 Thomas Huth 2017-11-20 17:47:28 UTC
Description of problem:
When using virtio-scsi disks with "bootindex" properties, the guest firmware (SLOF) fails to honor the boot order of devices that are using a LUN >= 256.

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.10.0-4.el7
SLOF-20170724-2.git89f519f.el7.noarch

How reproducible:
100%

Steps to Reproduce:
Start QEMU for example with a command line like this:
sudo /usr/libexec/qemu-kvm -nodefaults -serial mon:stdio -nographic -enable-kvm -device virtio-scsi-pci,id=vsp0,bus=pci.0 -drive id=hdimg1,if=none,format=qcow2,file=/var/lib/libvirt/images/disk.img -device scsi-hd,drive=hdimg1,id=hd1,bus=vsp0.0,bootindex=0,channel=0,scsi-id=0,lun=256 -drive id=cdimg1,if=none,media=cdrom,file=/var/lib/libvirt/images/RHEL-7.iso -device scsi-cd,id=cd1,drive=cdimg1,bus=vsp0.0,bootindex=1

Actual results:
SLOF boots from the CD-ROM device (that has bootindex=1).

Expected results:
SLOF should boot from the harddisk device (that has bootindex=0)

Additional info:
I've already suggested a patch for this problem on the upstream qemu mailing list here:
https://lists.gnu.org/archive/html/qemu-devel/2017-11/msg03521.html
("hw/ppc/spapr: Fix virtio-scsi bootindex handling for LUNs >= 256")

Comment 2 Miroslav Rezanina 2017-11-28 10:52:57 UTC
Fix included in qemu-kvm-rhev-2.10.0-9.el7

Comment 3 Minjia Cai 2017-11-30 08:53:21 UTC
Reproduced Version:
Host (RHEL7.5):
Compose: RHEL-7.5-20171107.1
kernel-3.10.0-797.el7
qemu-kvm-rhev-2.10.0-7.el7
SLOF-20170724-2.git89f519f.el7.noarch

Guest:
Compose: RHEL-7.5-20171107.1
kernel-3.10.0-797.el7
Steps to Reproduce is same the as comment0:

/usr/libexec/qemu-kvm -nodefaults -serial mon:stdio -nographic -enable-kvm -device virtio-scsi-pci,id=vsp0,bus=pci.0 -drive id=hdimg1,if=none,format=qcow2,file=/home/micai/RHEL.7.5.qcow2  -device scsi-hd,drive=hdimg1,id=hd1,bus=vsp0.0,bootindex=0,channel=0,scsi-id=0,lun=256 -drive id=cdimg1,if=none,media=cdrom,file=/home/micai/RHEL-7.5-20171107.1-Server-ppc64-dvd1.iso  -device scsi-cd,id=cd1,drive=cdimg1,bus=vsp0.0,bootindex=1

Actual results:
SLOF boots from the CD-ROM device (that has bootindex=1).

Steps to verified is same the as comment0:
Change qemu-kvm-rhev-2.10.0-7.el7 to qemu-kvm-rhev-2.10.0-9.el7
Actual results:

SLOF should boot from the harddisk device (that has bootindex=0)

Comment 5 Qunfang Zhang 2017-12-04 03:30:32 UTC
(In reply to Minjia Cai from comment #3)
> Reproduced Version:
> Host (RHEL7.5):
> Compose: RHEL-7.5-20171107.1
> kernel-3.10.0-797.el7
> qemu-kvm-rhev-2.10.0-7.el7
> SLOF-20170724-2.git89f519f.el7.noarch
> 
> Guest:
> Compose: RHEL-7.5-20171107.1
> kernel-3.10.0-797.el7
> Steps to Reproduce is same the as comment0:
> 
> /usr/libexec/qemu-kvm -nodefaults -serial mon:stdio -nographic -enable-kvm
> -device virtio-scsi-pci,id=vsp0,bus=pci.0 -drive
> id=hdimg1,if=none,format=qcow2,file=/home/micai/RHEL.7.5.qcow2  -device
> scsi-hd,drive=hdimg1,id=hd1,bus=vsp0.0,bootindex=0,channel=0,scsi-id=0,
> lun=256 -drive
> id=cdimg1,if=none,media=cdrom,file=/home/micai/RHEL-7.5-20171107.1-Server-
> ppc64-dvd1.iso  -device scsi-cd,id=cd1,drive=cdimg1,bus=vsp0.0,bootindex=1
> 
> Actual results:
> SLOF boots from the CD-ROM device (that has bootindex=1).
> 
> Steps to verified is same the as comment0:
> Change qemu-kvm-rhev-2.10.0-7.el7 to qemu-kvm-rhev-2.10.0-9.el7
> Actual results:
> 
> SLOF should boot from the harddisk device (that has bootindex=0)

Hi, Minjia

In the test result of qemu-kvm-rhev-2.10.0-9.el7, you used the word "should", but actually SLOF indeed boot from harddisk that has bootindex=0, right?

Thanks,
Qunfang

Comment 6 Minjia Cai 2017-12-04 04:29:29 UTC
(In reply to Qunfang Zhang from comment #5)
> (In reply to Minjia Cai from comment #3)
> > Reproduced Version:
> > Host (RHEL7.5):
> > Compose: RHEL-7.5-20171107.1
> > kernel-3.10.0-797.el7
> > qemu-kvm-rhev-2.10.0-7.el7
> > SLOF-20170724-2.git89f519f.el7.noarch
> > 
> > Guest:
> > Compose: RHEL-7.5-20171107.1
> > kernel-3.10.0-797.el7
> > Steps to Reproduce is same the as comment0:
> > 
> > /usr/libexec/qemu-kvm -nodefaults -serial mon:stdio -nographic -enable-kvm
> > -device virtio-scsi-pci,id=vsp0,bus=pci.0 -drive
> > id=hdimg1,if=none,format=qcow2,file=/home/micai/RHEL.7.5.qcow2  -device
> > scsi-hd,drive=hdimg1,id=hd1,bus=vsp0.0,bootindex=0,channel=0,scsi-id=0,
> > lun=256 -drive
> > id=cdimg1,if=none,media=cdrom,file=/home/micai/RHEL-7.5-20171107.1-Server-
> > ppc64-dvd1.iso  -device scsi-cd,id=cd1,drive=cdimg1,bus=vsp0.0,bootindex=1
> > 
> > Actual results:
> > SLOF boots from the CD-ROM device (that has bootindex=1).
> > 
> > Steps to verified is same the as comment0:
> > Change qemu-kvm-rhev-2.10.0-7.el7 to qemu-kvm-rhev-2.10.0-9.el7
> > Actual results:
> > 
> > SLOF should boot from the harddisk device (that has bootindex=0)
> 
> Hi, Minjia
> 
> In the test result of qemu-kvm-rhev-2.10.0-9.el7, you used the word
> "should", but actually SLOF indeed boot from harddisk that has bootindex=0,
> right?
> 
> Thanks,
> Qunfang

Hi,Qunfang
 Yes,you are right.I want to express that SLOF boots from harddisk that has bootindex=0.Sorry,I use the wrong word "should"

Comment 7 Qunfang Zhang 2017-12-05 06:35:37 UTC
(In reply to Minjia Cai from comment #6)
> 
> Hi,Qunfang
>  Yes,you are right.I want to express that SLOF boots from harddisk that has
> bootindex=0.Sorry,I use the wrong word "should"

Thanks for confirmation, never mind.

Comment 10 errata-xmlrpc 2018-04-11 00:49:36 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://access.redhat.com/errata/RHSA-2018:1104