[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 1/5] 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
---
 src/qemu/qemu_capabilities.c | 4 ++++
 src/qemu/qemu_capabilities.h | 1 +
 2 files changed, 5 insertions(+)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index ed85b6f..623c6a0 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -176,6 +176,7 @@ VIR_ENUM_IMPL(qemuCaps, QEMU_CAPS_LAST,
               "disable-s3",
 
               "disable-s4", /* 105 */
+              "usb-redir.filter",
     );
 
 struct qemu_feature_flags {
@@ -1407,6 +1408,7 @@ qemuCapsExtractDeviceStr(const char *qemu,
                          "-device", "virtio-net-pci,?",
                          "-device", "scsi-disk,?",
                          "-device", "PIIX4_PM,?",
+                         "-device", "usb-redir,?",
                          NULL);
     /* qemu -help goes to stdout, but qemu -device ? goes to stderr.  */
     virCommandSetErrorBuffer(cmd, &output);
@@ -1452,6 +1454,8 @@ qemuCapsParseDeviceStr(const char *str, virBitmapPtr flags)
         qemuCapsSet(flags, QEMU_CAPS_NEC_USB_XHCI);
     if (strstr(str, "name \"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\""))
         qemuCapsSet(flags, QEMU_CAPS_USB_HUB);
     if (strstr(str, "name \"ich9-ahci\""))
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 49d64e5..3b9629b 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -141,6 +141,7 @@ enum qemuCapsFlags {
     QEMU_CAPS_BLOCKIO            = 103, /* -device ...logical_block_size & co */
     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_LAST,                   /* this must always be the last item */
 };
-- 
1.7.11.2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]