]> xenbits.xensource.com Git - libvirt.git/commit
qemu: use "ide" as device name for implicit SATA controller on Q35
authorLaine Stump <laine@laine.org>
Fri, 20 Sep 2013 10:00:48 +0000 (06:00 -0400)
committerLaine Stump <laine@laine.org>
Fri, 20 Sep 2013 11:03:23 +0000 (07:03 -0400)
commit30bb4c4b54ed3a23adc90c52540dd96b0cbcfbcc
tree92fc336ebca13698c270e59032a69be3070202b4
parent604ae65744938df19973a1d84d628a5f64d20db2
qemu: use "ide" as device name for implicit SATA controller on Q35

This resolves https://bugzilla.redhat.com/show_bug.cgi?id=1008903

The Q35 machinetype has an implicit SATA controller at 00:1F.2 which
isn't given the "expected" id of ahci0 by qemu when it's created. The
original suggested solution to this problem was to not specify any
controller for the disks that use the default controller and just
specify "unit=n" instead; qemu should then use the first IDE or SATA
controller for the disk.

Unfortunately, this "solution" is ignorant of the fact that in the
case of SATA disks, the "unit" attribute in the disk XML is actually
*not* being used for the unit, but is instead used to specify the
"bus" number; each SATA controller has 6 buses, and each bus only
allows a single unit. This makes it nonsensical to specify unit='n'
where n is anything other than 0. It also means that the only way to
connect more than a single device to the implicit SATA controller is
to explicitly give the bus names, which happen to be "ide.$n", where
$n can be replaced by the disk's "unit" number.
src/qemu/qemu_command.c
tests/qemuxml2argvdata/qemuxml2argv-pcihole64-q35.args
tests/qemuxml2argvdata/qemuxml2argv-q35.args