提交 331934b2 编写于 作者: O Osier Yang

qemu: Add caps to indentify if setting wwn is supported by qemu

This assumes ide-drive.wwn, ide-hd.wwn, ide-cd.wwn were supported
at the same time, similar for scsi-disk.wwn, scsi-hd.wwn, and
scsi-cd.wwn. So only two new caps (QEMU_CAPS_IDE_DRIVE_WWN,
and QEMU_CAPS_SCSI_DISK_WWN) are introduced.
上级 facc1c00
......@@ -177,6 +177,8 @@ VIR_ENUM_IMPL(qemuCaps, QEMU_CAPS_LAST,
"disable-s4", /* 105 */
"usb-redir.filter",
"ide-drive.wwn",
"scsi-disk.wwn",
);
struct _qemuCaps {
......@@ -1466,6 +1468,7 @@ qemuCapsExtractDeviceStr(const char *qemu,
"-device", "scsi-disk,?",
"-device", "PIIX4_PM,?",
"-device", "usb-redir,?",
"-device", "ide-drive,?",
NULL);
/* qemu -help goes to stdout, but qemu -device ? goes to stderr. */
virCommandSetErrorBuffer(cmd, &output);
......@@ -1558,12 +1561,17 @@ qemuCapsParseDeviceStr(const char *str, qemuCapsPtr caps)
qemuCapsSet(caps, QEMU_CAPS_VIRTIO_BLK_SCSI);
if (strstr(str, "scsi-disk.channel"))
qemuCapsSet(caps, QEMU_CAPS_SCSI_DISK_CHANNEL);
if (strstr(str, "scsi-disk.wwn"))
qemuCapsSet(caps, QEMU_CAPS_SCSI_DISK_WWN);
if (strstr(str, "scsi-block"))
qemuCapsSet(caps, QEMU_CAPS_SCSI_BLOCK);
if (strstr(str, "scsi-cd"))
qemuCapsSet(caps, QEMU_CAPS_SCSI_CD);
if (strstr(str, "ide-cd"))
qemuCapsSet(caps, QEMU_CAPS_IDE_CD);
if (strstr(str, "ide-drive.wwn"))
qemuCapsSet(caps, QEMU_CAPS_IDE_DRIVE_WWN);
/*
* the iolimit detection is not really straight forward:
* in qemu this is a capability of the block layer, if
......
......@@ -142,6 +142,8 @@ enum qemuCapsFlags {
QEMU_CAPS_DISABLE_S3 = 104, /* S3 BIOS Advertisement on/off */
QEMU_CAPS_DISABLE_S4 = 105, /* S4 BIOS Advertisement on/off */
QEMU_CAPS_USB_REDIR_FILTER = 106, /* usb-redir.filter */
QEMU_CAPS_IDE_DRIVE_WWN = 107, /* Is ide-drive.wwn available? */
QEMU_CAPS_SCSI_DISK_WWN = 108, /* Is scsi-disk.wwn available? */
QEMU_CAPS_LAST, /* this must always be the last item */
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册