]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: New cap flag to indicate if channel is supported by scsi-disk
authorOsier Yang <jyang@redhat.com>
Mon, 27 Feb 2012 10:20:21 +0000 (18:20 +0800)
committerOsier Yang <jyang@redhat.com>
Tue, 28 Feb 2012 06:27:13 +0000 (14:27 +0800)
src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.h

index 6d35676b0bf1848ae7a8dc7f6b0445f938a0b336..64a45463cb60f4b2e05a2a17c8265bf2ba4a8e3c 100644 (file)
@@ -153,6 +153,7 @@ VIR_ENUM_IMPL(qemuCaps, QEMU_CAPS_LAST,
 
               "drive-iotune", /* 85 */
               "system_wakeup",
+              "scsi-disk.channel",
     );
 
 struct qemu_feature_flags {
@@ -1363,6 +1364,7 @@ qemuCapsExtractDeviceStr(const char *qemu,
                                "-device", "pci-assign,?",
                                "-device", "virtio-blk-pci,?",
                                "-device", "virtio-net-pci,?",
+                               "-device", "scsi-disk,?",
                                NULL);
     virCommandAddEnvPassCommon(cmd);
     /* qemu -help goes to stdout, but qemu -device ? goes to stderr.  */
@@ -1440,6 +1442,8 @@ qemuCapsParseDeviceStr(const char *str, virBitmapPtr flags)
         qemuCapsSet(flags, QEMU_CAPS_VIRTIO_NET_EVENT_IDX);
     if (strstr(str, "virtio-blk-pci.scsi"))
         qemuCapsSet(flags, QEMU_CAPS_VIRTIO_BLK_SCSI);
+    if (strstr(str, "scsi-disk.channel"))
+        qemuCapsSet(flags, QEMU_CAPS_SCSI_DISK_CHANNEL);
 
     return 0;
 }
index b9666e12fe5f9e7551a2e51caa04a17842baf671..db584ce9c2f6cba2485b28f628ccef70fc815e43 100644 (file)
@@ -121,6 +121,7 @@ enum qemuCapsFlags {
     QEMU_CAPS_FSDEV_WRITEOUT     = 84, /* -fsdev writeout supported */
     QEMU_CAPS_DRIVE_IOTUNE       = 85, /* -drive bps= and friends */
     QEMU_CAPS_WAKEUP             = 86, /* system_wakeup monitor command */
+    QEMU_CAPS_SCSI_DISK_CHANNEL  = 87, /* Is scsi-disk.channel available? */
 
     QEMU_CAPS_LAST,                   /* this must always be the last item */
 };