[PATCH 09/10] linkstate: qemu: Add detection of link state setting capability.

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

 



Adds a capability flag based on version number to detect if qemu
supports setting link state.
---
 src/qemu/qemu_capabilities.c |    5 +++++
 src/qemu/qemu_capabilities.h |    1 +
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 3f36212..d1823d0 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -123,6 +123,7 @@ VIR_ENUM_IMPL(qemuCaps, QEMU_CAPS_LAST,
               "pci-multifunction", /* 60 */
               "virtio-blk-pci.ioeventfd",
               "sga",
+              "link-state",
     );

 struct qemu_feature_flags {
@@ -1033,6 +1034,10 @@ qemuCapsComputeCmdFlags(const char *help,

     if (version >= 13000)
         qemuCapsSet(flags, QEMU_CAPS_PCI_MULTIFUNCTION);
+
+    /* link state modification appeared before 0.11.0*/
+    if (version >= 11000)
+        qemuCapsSet(flags, QEMU_CAPS_LINK_SET);
 }

 /* We parse the output of 'qemu -help' to get the QEMU
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index d251262..10631f7 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -98,6 +98,7 @@ enum qemuCapsFlags {
     QEMU_CAPS_PCI_MULTIFUNCTION = 60, /* -device multifunction=on|off */
     QEMU_CAPS_VIRTIO_IOEVENTFD  = 61, /* IOeventFD feature: virtio-{net|blk}-pci.ioeventfd=on/off */
     QEMU_CAPS_SGA               = 62, /* Serial Graphics Adapter */
+    QEMU_CAPS_LINK_SET          = 63, /* Modification of link state */

     QEMU_CAPS_LAST,                   /* this must always be the last item */
 };
-- 
1.7.6

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]