]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Build command line for the new address format
authorOsier Yang <jyang@redhat.com>
Tue, 28 Feb 2012 03:39:43 +0000 (11:39 +0800)
committerOsier Yang <jyang@redhat.com>
Tue, 28 Feb 2012 06:27:17 +0000 (14:27 +0800)
commitc56fe7f1d6cbd3dd2ab16df100101dbf357969cd
treea80f801c0ae9d150c5c0de4aa7493a163d546e9d
parent05fbe728ee6d4a609d62825702219a19bce01e0b
qemu: Build command line for the new address format

For any disk controller model which is not "lsilogic", the command
line will be like:

  -drive file=/dev/sda,if=none,id=drive-scsi0-0-3-0,format=raw \
  -device scsi-disk,bus=scsi0.0,channel=0,scsi-id=3,lun=0,i\
  drive=drive-scsi0-0-3-0,id=scsi0-0-3-0

The relationship between the libvirt address attrs and the qdev
properties are (controller model is not "lsilogic"; strings
inside <> represent libvirt adress attrs):
  bus=scsi<controller>.0
  channel=<bus>
  scsi-id=<target>
  lun=<unit>

* src/qemu/qemu_command.h: (New param "virDomainDefPtr def"
  for function qemuBuildDriveDevStr; new param "virDomainDefPtr
  vmdef" for function qemuAssignDeviceDiskAlias. Both for
  virDomainDiskFindControllerModel's use).

* src/qemu/qemu_command.c:
  - New param "virDomainDefPtr def" for qemuAssignDeviceDiskAliasCustom.
    For virDomainDiskFindControllerModel's use, if the disk bus is "scsi"
    and the controller model is not "lsilogic", "target" is one part of
    the alias name.
  - According change on qemuAssignDeviceDiskAlias and qemuBuildDriveDevStr

* src/qemu/qemu_hotplug.c:
  - Changes to be consistent with declarations of qemuAssignDeviceDiskAlias
    qemuBuildDriveDevStr, and qemuBuildControllerDevStr.

* tests/qemuxml2argvdata/qemuxml2argv-pseries-vio-user-assigned.args,
  tests/qemuxml2argvdata/qemuxml2argv-pseries-vio.args: Update the
  generated command line.
src/qemu/qemu_command.c
src/qemu/qemu_command.h
src/qemu/qemu_hotplug.c
tests/qemuxml2argvdata/qemuxml2argv-pseries-vio-user-assigned.args
tests/qemuxml2argvdata/qemuxml2argv-pseries-vio.args