[PATCH v2 1/3] qemu: Introduce QEMU_CAPS_MACH_VIRT_GIC_VERSION capability

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

 



Unfortunately qemu currently doesn't offer introspection for machine types,
so we have to rely on version number, similar to QEMU_CAPS_MACHINE_USB_OPT.

Signed-off-by: Pavel Fedin <p.fedin@xxxxxxxxxxx>
---
 src/qemu/qemu_capabilities.c | 5 +++++
 src/qemu/qemu_capabilities.h | 1 +
 2 files changed, 6 insertions(+)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index eb2edf5..98d306c 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -298,6 +298,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
               "rtl8139",
               "e1000",
               "virtio-net",
+              "gic-version",
     );
 
 
@@ -3404,6 +3405,10 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps,
     if (qemuCaps->version >= 2004000)
         virQEMUCapsSet(qemuCaps, QEMU_CAPS_VHOSTUSER_MULTIQUEUE);
 
+    /* Since 2.4.50 ARM virt machine supports gic-version option */
+    if (qemuCaps->version >= 2004050)
+        virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACH_VIRT_GIC_VERSION);
+
     if (virQEMUCapsProbeQMPCommands(qemuCaps, mon) < 0)
         goto cleanup;
     if (virQEMUCapsProbeQMPEvents(qemuCaps, mon) < 0)
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 2623574..a1d98d0 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -238,6 +238,7 @@ typedef enum {
     QEMU_CAPS_DEVICE_RTL8139 = 196, /* -device rtl8139 */
     QEMU_CAPS_DEVICE_E1000 = 197, /* -device e1000 */
     QEMU_CAPS_DEVICE_VIRTIO_NET = 198, /* -device virtio-net-* */
+    QEMU_CAPS_MACH_VIRT_GIC_VERSION = 199, /* -machine virt,gic-version */
 
     QEMU_CAPS_LAST,                   /* this must always be the last item */
 } virQEMUCapsFlags;
-- 
2.1.4

--
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]