提交 16e41ab6 编写于 作者: G Guannan Ren

qemu: add usb-redir.filter qemu capability flag

Add a qemu flag for USB redirection filter support.

The output:
usb-redir.chardev=chr
usb-redir.debug=uint8
usb-redir.filter=string
usb-redir.port=string
上级 51b708c6
...@@ -176,6 +176,7 @@ VIR_ENUM_IMPL(qemuCaps, QEMU_CAPS_LAST, ...@@ -176,6 +176,7 @@ VIR_ENUM_IMPL(qemuCaps, QEMU_CAPS_LAST,
"disable-s3", "disable-s3",
"disable-s4", /* 105 */ "disable-s4", /* 105 */
"usb-redir.filter",
); );
struct qemu_feature_flags { struct qemu_feature_flags {
...@@ -1407,6 +1408,7 @@ qemuCapsExtractDeviceStr(const char *qemu, ...@@ -1407,6 +1408,7 @@ qemuCapsExtractDeviceStr(const char *qemu,
"-device", "virtio-net-pci,?", "-device", "virtio-net-pci,?",
"-device", "scsi-disk,?", "-device", "scsi-disk,?",
"-device", "PIIX4_PM,?", "-device", "PIIX4_PM,?",
"-device", "usb-redir,?",
NULL); NULL);
/* qemu -help goes to stdout, but qemu -device ? goes to stderr. */ /* qemu -help goes to stdout, but qemu -device ? goes to stderr. */
virCommandSetErrorBuffer(cmd, &output); virCommandSetErrorBuffer(cmd, &output);
...@@ -1452,6 +1454,8 @@ qemuCapsParseDeviceStr(const char *str, virBitmapPtr flags) ...@@ -1452,6 +1454,8 @@ qemuCapsParseDeviceStr(const char *str, virBitmapPtr flags)
qemuCapsSet(flags, QEMU_CAPS_NEC_USB_XHCI); qemuCapsSet(flags, QEMU_CAPS_NEC_USB_XHCI);
if (strstr(str, "name \"usb-redir\"")) if (strstr(str, "name \"usb-redir\""))
qemuCapsSet(flags, QEMU_CAPS_USB_REDIR); qemuCapsSet(flags, QEMU_CAPS_USB_REDIR);
if (strstr(str, "usb-redir.filter"))
qemuCapsSet(flags, QEMU_CAPS_USB_REDIR_FILTER);
if (strstr(str, "name \"usb-hub\"")) if (strstr(str, "name \"usb-hub\""))
qemuCapsSet(flags, QEMU_CAPS_USB_HUB); qemuCapsSet(flags, QEMU_CAPS_USB_HUB);
if (strstr(str, "name \"ich9-ahci\"")) if (strstr(str, "name \"ich9-ahci\""))
......
...@@ -141,6 +141,7 @@ enum qemuCapsFlags { ...@@ -141,6 +141,7 @@ enum qemuCapsFlags {
QEMU_CAPS_BLOCKIO = 103, /* -device ...logical_block_size & co */ QEMU_CAPS_BLOCKIO = 103, /* -device ...logical_block_size & co */
QEMU_CAPS_DISABLE_S3 = 104, /* S3 BIOS Advertisement on/off */ QEMU_CAPS_DISABLE_S3 = 104, /* S3 BIOS Advertisement on/off */
QEMU_CAPS_DISABLE_S4 = 105, /* S4 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_LAST, /* this must always be the last item */ 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.
先完成此消息的编辑!
想要评论请 注册