[libvirt] AHCI support in qemu driver

Jim Fehlig jfehlig at suse.com
Wed Sep 28 04:22:48 UTC 2011

I have some time this week to work on libvirt and thought Daniel's
suggestion [1] for adding AHCI support in the qemu driver would be a
useful endeavor.

I've managed to start a qemu instance using AHCI with attached hackery,
iff I have a controller defined.  E.g.

  <disk type='file' device='disk'>
    <driver name='qemu' type='raw'/>
    <source file='/var/lib/libvirt/images/test/disk0.raw'/>
    <target dev='sda' bus='sata'/>
  <controller type='sata' index='0'>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x03'

which results in qemu args

-device ahci,id=ahci0,bus=pci.0,multifunction=on,addr=0x3.0x0 -drive

If the controller is not explicitly defined, the AHCI device (-device
ahci,...) is not created and qemu fails with

qemu-kvm: -device
Bus 'a
hci0.0' not found

I'm not quite sure how to create the controller when not explicitly
defined in the config.

Also, I suspect there are many things I'm missing in adding support for
this controller.  E.g., I've ignored hotplug for the moment.  What would
be considered minimal functionality for supporting this controller?


[1] http://www.redhat.com/archives/libvir-list/2011-August/msg01034.html

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ahci.patch
Type: text/x-patch
Size: 4419 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110927/0902207b/attachment-0001.bin>

More information about the libvir-list mailing list