Bug 706797

Summary: Only can find 7 virtio disks in boot menu
Product: Red Hat Enterprise Linux 6 Reporter: Mike Cao <bcao>
Component: qemu-kvmAssignee: Gleb Natapov <gleb>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: bcao, ehabkost, juzhang, knoel, michen, mkenneth, tburke, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-02 14:54:31 UTC Type: ---
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
CommandLine
none
Screendump none

Description Mike Cao 2011-05-23 03:33:27 UTC
Description of problem:
start a guest with 26 virtio disks and with -boot menu=on ,after VM start press F12, I found there are only 7 virtio disks lists in boot menu

Version-Release number of selected component (if applicable):
# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.160.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Start a guest with 26 virtio disks and with -boot menu=on (CLI will attached)
2.after guest start press F12

Actual results:
only can find 7 virtio disks lists in boot menu (referring to screendump)

Expected results:
all the virtio disks should list in boot menu

Additional info:

Comment 1 Mike Cao 2011-05-23 04:52:05 UTC
Created attachment 500325 [details]
CommandLine

Comment 2 Mike Cao 2011-05-23 04:52:41 UTC
Created attachment 500326 [details]
Screendump

Comment 5 Gleb Natapov 2011-06-09 11:38:13 UTC
Bios environment has limited resources and each virtio queue take enormous amount of memory (at least 5404 byte for each queue). Bios fails to initialize more then 7 virtio disks because there is no enough memory for all of them.

Bios always has only one request in flight to virtio block, so virtio queue shouldn't be so big (1 element should be qnough, we have 128 now), but unfortunately, in current virtio implementation host device decides what virtio queue length should be and a guest has no way to negotiate smaller queue size. The proper fix would be to have queue size negotiable between a host and a guest.

Another fix would be to have only one vq for all virtio devices and reinitialize it on each disk access. This is hackish and may slow down BIOS access to virtio disk though.

As a temporary solution we can also enlarge amount of memory available to BIOS, but then by specifying more virtio disks it will be possible to overflow that too.

So the question is do we really need to support such big number of virtio disks?

Comment 6 Dor Laor 2011-10-02 14:54:31 UTC
I think Gleb is right and it is not requirement.