Bug 1000118

Summary: AHCI assignes ide-hd automatically only to the last bus (ahci.5)
Product: [Fedora] Fedora Reporter: Lukáš Doktor <ldoktor>
Component: qemuAssignee: Fedora Virtualization Maintainers <virt-maint>
Status: CLOSED DEFERRED QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: amit.shah, berrange, cfergeau, crobinso, dwmw2, itamar, pbonzini, rjones, scottt.tw, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-31 15:05:49 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 Lukáš Doktor 2013-08-22 18:24:06 UTC
Description of problem:
Hi guys, when I add -device ahci, the following ide-hds are added automatically into ahci.5. In order to get more than one working disk I have to specify the bus=ahci.4 (3,2,1..).

Version-Release number of selected component (if applicable):
qemu-kvm-1.4.2-5.fc19.x86_64 (+ upstream 1.5.0)

How reproducible:
Always

Steps to Reproduce:
1. qemu-system-x86_64 -device ahci -drive id=aa,file=/tmp/asdf,if=none -drive id=bb,file=/tmp/asdf,if=none -device ide-hd,drive=aa -device ide-hd,drive=bb

Actual results:
qemu-system-x86_64: -device ide-hd,drive=bb: Can't create IDE unit 1, bus supports only 1 units
qemu-system-x86_64: -device ide-hd,drive=bb: Device initialization failed.
qemu-system-x86_64: -device ide-hd,drive=bb: Device 'ide-hd' could not be initialized


Expected results:
Assign the disks into the free IDE-compatible bus (ahci.4, ahci.3, ...)

Additional info:
When I explicitly specify the bus.port it works fine:
qemu-system-x86_64 -device ahci -drive id=aa,file=/tmp/asdf,if=none -drive id=bb,file=/tmp/asdf,if=none -device ide-hd,drive=aa -device ide-hd,drive=bb,bus=ahci.1
=> ahci.5 is taken by first ide-hd, ahci.1 by the second one.

Comment 1 Cole Robinson 2013-08-31 15:05:49 UTC
This is still relevant upstream, and since it's just a minor RFE I moved it to the upstream qemu tracker, please track progress there.

https://bugs.launchpad.net/qemu/+bug/1219234