qemu: New cap flag to indicate if channel is supported by scsi-disk

This commit is contained in:
Osier Yang 2012-02-27 18:20:21 +08:00
parent 4288b22fb2
commit 05fbe728ee
2 changed files with 5 additions and 0 deletions

View 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;
}

View 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 */
};