6ae9ed
From 5872dbc70ce1acf41445442c13703f22bc2d2c9b Mon Sep 17 00:00:00 2001
6ae9ed
Message-Id: <5872dbc70ce1acf41445442c13703f22bc2d2c9b@dist-git>
6ae9ed
From: Peter Krempa <pkrempa@redhat.com>
6ae9ed
Date: Wed, 24 Aug 2016 16:11:19 -0400
6ae9ed
Subject: [PATCH] qemu: Add capability for query-hotpluggable-cpus command
6ae9ed
6ae9ed
https://bugzilla.redhat.com/show_bug.cgi?id=1097930
6ae9ed
https://bugzilla.redhat.com/show_bug.cgi?id=1224341
6ae9ed
6ae9ed
(cherry picked from commit f17ddfeee39858b98ae195ac1639645748a80e6f)
6ae9ed
---
6ae9ed
 src/qemu/qemu_capabilities.c                     | 2 ++
6ae9ed
 src/qemu/qemu_capabilities.h                     | 1 +
6ae9ed
 tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 1 +
6ae9ed
 3 files changed, 4 insertions(+)
6ae9ed
6ae9ed
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
6ae9ed
index 49ad9df..ffd54c5 100644
6ae9ed
--- a/src/qemu/qemu_capabilities.c
6ae9ed
+++ b/src/qemu/qemu_capabilities.c
6ae9ed
@@ -339,6 +339,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
6ae9ed
               "tls-creds-x509", /* 230 */
6ae9ed
               "intel-iommu",
6ae9ed
               "smm",
6ae9ed
+              "query-hotpluggable-cpus",
6ae9ed
     );
6ae9ed
 
6ae9ed
 
6ae9ed
@@ -1457,6 +1458,7 @@ struct virQEMUCapsStringFlags virQEMUCapsCommands[] = {
6ae9ed
     { "__com.redhat_change-backing-file", QEMU_CAPS_CHANGE_BACKING_FILE },
6ae9ed
     { "rtc-reset-reinjection", QEMU_CAPS_RTC_RESET_REINJECTION },
6ae9ed
     { "migrate-incoming", QEMU_CAPS_INCOMING_DEFER },
6ae9ed
+    { "query-hotpluggable-cpus", QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS },
6ae9ed
 };
6ae9ed
 
6ae9ed
 struct virQEMUCapsStringFlags virQEMUCapsMigration[] = {
6ae9ed
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
6ae9ed
index ac1593d..68d1ea8 100644
6ae9ed
--- a/src/qemu/qemu_capabilities.h
6ae9ed
+++ b/src/qemu/qemu_capabilities.h
6ae9ed
@@ -372,6 +372,7 @@ typedef enum {
6ae9ed
     QEMU_CAPS_OBJECT_TLS_CREDS_X509, /* -object tls-creds-x509 */
6ae9ed
     QEMU_CAPS_DEVICE_INTEL_IOMMU, /* -device intel-iommu */
6ae9ed
     QEMU_CAPS_MACHINE_SMM_OPT, /* -machine xxx,smm=on/off/auto */
6ae9ed
+    QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS, /* qmp command query-hotpluggable-cpus */
6ae9ed
 
6ae9ed
     QEMU_CAPS_LAST /* this must always be the last item */
6ae9ed
 } virQEMUCapsFlags;
6ae9ed
diff --git a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
6ae9ed
index 8fb66d2..0f3c17a 100644
6ae9ed
--- a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
6ae9ed
+++ b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
6ae9ed
@@ -191,6 +191,7 @@
6ae9ed
   <flag name='tls-creds-x509'/>
6ae9ed
   <flag name='intel-iommu'/>
6ae9ed
   <flag name='smm'/>
6ae9ed
+  <flag name='query-hotpluggable-cpus'/>
6ae9ed
   <version>2006091</version>
6ae9ed
   <kvmVersion>0</kvmVersion>
6ae9ed
   <package> (v2.7.0-rc1-52-g42e0d60)</package>
6ae9ed
-- 
6ae9ed
2.10.0
6ae9ed