Bug 1047748 - fail to specify the bootindex for the usb-storage with usb-xhci controller
Summary: fail to specify the bootindex for the usb-storage with usb-xhci controller
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Gerd Hoffmann
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-02 06:30 UTC by Sibiao Luo
Modified: 2015-03-05 09:43 UTC (History)
12 users (show)

Fixed In Version: qemu 2.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 09:43:21 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0624 normal SHIPPED_LIVE Important: qemu-kvm-rhev security, bug fix, and enhancement update 2015-03-05 14:37:36 UTC

Description Sibiao Luo 2014-01-02 06:30:32 UTC
Description of problem:
boot guest with a usb-xhci storage disk specified the bootindex=0, but it fail to boot from it.
BTW, also tried the usb-ehci controller that did not meet such issue.

Version-Release number of selected component (if applicable):
host info:
3.10.0-64.el7.x86_64
qemu-kvm-1.5.3-30.el7.x86_64
seabios-1.7.2.2-6.el7.x86_64
guest info:
3.10.0-64.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.boot guest with a usb-xhci storage disk specified the bootindex=0, and bootindex=1 for system hard disk, bootindex=2 for virtio-nic.
e.g:# /usr/libexec/qemu-kvm -M pc...-device nec-usb-xhci,id=xhci0,bus=pci.0,addr=0x7 -drive file=/home/my-usb-storage.qcow2,id=drive-storage0,if=none,media=disk,cache=none,format=qcow2 -device usb-storage,drive=drive-storage0,bus=xhci0.0,id=storage0,removable=on,bootindex=0
2.press F12 during POST.

Actual results:
after step 2,
Press F12 for boot menu.

Select boot device:

1. Virtio disk PCI:0:4
2. iPXE (PCI 00:05.0)
3. USB MSC Drive QEMU QEMU HARDDISK 1.5.
4. Legacy option rom
5. Floppy [drive A]
6. DVD/CD [ata1-0: QEMU DVD-ROM ATAPI-4 DVD/CD]

Expected results:
the guest should boot from usb-xhci storage disk first, like:
1. USB MSC Drive QEMU QEMU HARDDISK 1.5.
2. Virtio disk PCI:0:4
3. iPXE (PCI 00:05.0)
4. Legacy option rom
5. Floppy [drive A]
6. DVD/CD [ata1-0: QEMU DVD-ROM ATAPI-4 DVD/CD]

Additional info:
# /usr/libexec/qemu-kvm -M pc -S -cpu SandyBridge -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -no-kvm-pit-reinjection -usb -device usb-tablet,id=input0 -name sluo -uuid 990ea161-6b67-47b2-b803-19fb01d30d30 -rtc base=localtime,clock=host,driftfix=slew -device virtio-serial-pci,id=virtio-serial0,max_ports=16,vectors=0,bus=pci.0,addr=0x3 -chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait -device virtserialport,chardev=channel1,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port1 -chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait -device virtserialport,chardev=channel2,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port2 -device nec-usb-xhci,id=xhci0,bus=pci.0,addr=0x7 -drive file=/home/my-usb-storage.qcow2,id=drive-storage0,if=none,media=disk,cache=none,format=qcow2 -device usb-storage,drive=drive-storage0,bus=xhci0.0,id=storage0,removable=on,bootindex=0 -drive file=/home/RHEL-7.0-20131127.1_Server_x86_64.qcow2bk,if=none,id=drive-virtio-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop -device virtio-blk-pci,vectors=0,bus=pci.0,addr=0x4,scsi=off,drive=drive-virtio-disk,id=virtio-disk,bootindex=1 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=00:01:02:03:04:05,bus=pci.0,addr=0x5,bootindex=2 -device virtio-balloon-pci,id=ballooning,bus=pci.0,addr=0x6 -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -k en-us -boot menu=on -qmp tcp:0:4444,server,nowait -vnc :1 -spice disable-ticketing,port=5931 -vga qxl -monitor stdio

Comment 1 Gerd Hoffmann 2014-01-16 08:04:29 UTC
Port numbering issue.  xhci maps one physical port to two virtual ports, one for usb2, one for usb3, and bootindex works only for the usb2 virtual port ...

Think this should be fixed in seabios.

Comment 4 Gerd Hoffmann 2014-07-03 09:06:50 UTC
xhci in qemu 2.1+ orders usb3 ports first (for new machine types), which fixes this as side effect.

Comment 6 langfang 2014-08-28 05:35:30 UTC
Reproduce this bug as follow version:
Host:
# rpm -q qemu-kvm-rhev
qemu-kvm-rhev-1.5.3-60.el7_0_0.6.x86_64
# uname -r
3.10.0-144.el7.x86_64

Steps:
1)Boot guest with usb-xhci storage disk specified the bootindex=0, and bootindex=1 for system hard disk
...-device nec-usb-xhci,id=xhci0,bus=pci.0,addr=0x7 -drive file=/home/my-usb-storage.qcow2,id=drive-storage0,if=none,media=disk,cache=none,format=qcow2 -device usb-storage,drive=drive-storage0,bus=xhci0.0,id=storage0,removable=on,bootindex=0 -drive file=/home/RHEL-Server-6.6-64-virtio.qcow2,if=none,id=drive-virtio-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop -device virtio-blk-pci,vectors=0,bus=pci.0,addr=0x4,scsi=off,drive=drive-virtio-disk,id=virtio-disk,bootindex=1   -boot menu=on...

2)Press F12

Results:
1. Virtio disk PCI:0:4
2. iPXE (PCI 00:05.0)
3. USB MSC Drive QEMU QEMU HARDDISK 1.5.
4. Legacy option rom
5. Floppy [drive A]
6. DVD/CD [ata1-0: QEMU DVD-ROM ATAPI-4 DVD/CD]

Test on latest version:
# uname -r
3.10.0-144.el7.x86_64
# rpm -q qemu-kvm-rhev
qemu-kvm-rhev-2.1.0-2.el7.x86_64

Steps as same as above

Results:
1. Virtio disk PCI:0:4
2. USB MSC Drive QEMU QEMU HARDDISK 1.5.
3. Legacy option rom
4. Floppy [drive A]
5. DVD/CD [ata1-0: QEMU DVD-ROM ATAPI-4 DVD/CD]
6. iPXE (PCI 00:05.0)


Attional info :
CLI: /usr/libexec/qemu-kvm -M pc -S -cpu SandyBridge -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -no-kvm-pit-reinjection -usb -device usb-tablet,id=input0 -name flang -uuid 990ea161-6b67-47b2-b803-19fb01d30d30 -rtc base=localtime,clock=host,driftfix=slew  -device nec-usb-xhci,id=xhci0,bus=pci.0,addr=0x7 -drive file=/home/my-usb-storage.qcow2,id=drive-storage0,if=none,media=disk,cache=none,format=qcow2 -device usb-storage,drive=drive-storage0,bus=xhci0.0,id=storage0,removable=on,bootindex=0 -drive file=/home/RHEL-Server-6.6-64-virtio.qcow2,if=none,id=drive-virtio-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop -device virtio-blk-pci,vectors=0,bus=pci.0,addr=0x4,scsi=off,drive=drive-virtio-disk,id=virtio-disk,bootindex=1 -monitor stdio -vnc :10 -boot menu=on


According to above test ,i think this bug has not been fixed.

Comment 7 Gerd Hoffmann 2014-08-28 07:12:45 UTC
Works only with the 7.1.0 machine type, which seems not to be there yet ...

Comment 8 langfang 2014-08-29 01:27:14 UTC
According to comment7,i will change the bug status to "ASSIGNED",anything i was wrong ,please correct me .thanks

Comment 9 Gerd Hoffmann 2014-10-27 09:54:11 UTC
7.1 machine type patches have been merged meanwhile, please retest with latest build and make sure to use machine type "pc-i440fx-rhel7.1.0"

Comment 10 juzhang 2014-10-28 00:51:41 UTC
Hi Flang,

Could you retest it according to comment9?

Best Regards,
Junyi

Comment 11 langfang 2014-10-28 02:48:18 UTC
Test on latest version:
# uname -r
3.10.0-191.el7.x86_64
# rpm -q qemu-kvm-rhev
qemu-kvm-rhev-2.1.2-5.el7.x86_64

Guest:rhel7

1)Boot guest with usb-xhci storage disk specified the bootindex=0, and bootindex=1 for system hard disk

...-M pc-i440fx-rhel7.1.0...-device nec-usb-xhci,id=xhci0,bus=pcie.0,addr=0x7 -drive file=/home/my-usb-storage.qcow2,id=drive-storage0,if=none,media=disk,cache=none,format=qcow2 -device usb-storage,drive=drive-storage0,bus=xhci0.0,id=storage0,removable=on,bootindex=0 -drive file=/home/RHEL-Server-7.0-64-virtio.qcow2,if=none,id=drive-virtio-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop -device virtio-blk-pci,vectors=0,bus=pci.0,addr=0x4,scsi=off,drive=drive-virtio-disk,id=virtio-disk,bootindex=1....

2)Press F12

Results:
1. USB MSC Drive QEMU QEMU HARDDISK 2.1.
2. Virtio disk PCI:0:4
3. Legacy option rom
4. Floppy [drive A]
5. DVD/CD [ata1-0: QEMU DVD-ROM ATAPI-4 DVD/CD]
6. iPXE (PCI 00:03.0)



Also test -M pc/q35/pc-q35-rhel7.1.0--->work well,results same as above


pc-q35-rhel7.0.0/rhel6.5.0--->failed, as comment7 and comment9,this is expect resutls,so this bug is fixed.

Hi Gerd 
    Please help me to see the above test ,thanks 

best regards
fang lang

Comment 12 Gerd Hoffmann 2014-10-28 07:15:39 UTC
> pc-q35-rhel7.0.0/rhel6.5.0--->failed, as comment7 and comment9,this is
> expect resutls,so this bug is fixed.

Correct, only the rhel7.1.0 machine types will work, rhel7.0.0 is expected to fail.

Comment 16 errata-xmlrpc 2015-03-05 09:43: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/RHSA-2015-0624.html


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