[PATCH 2/2] S390: Enable the QMP query-cpu-definitions command

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

 



Since libvirt is using QMP for cpu definition probing, it is
beneficial to have a minimum implementation for that.
This covers only cpu model = host and needs to be reworked into
a full-fledged version later on.

Signed-off-by: Viktor Mihajlovski <mihajlov@xxxxxxxxxxxxxxxxxx>
---
 target-s390x/cpu.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c
index d0d9aa5..1370af5 100644
--- a/target-s390x/cpu.c
+++ b/target-s390x/cpu.c
@@ -25,6 +25,7 @@
 #include "sysemu.h"
 #include "qemu-common.h"
 #include "qemu-timer.h"
+#include "arch_init.h"
 
 #ifndef CONFIG_USER_ONLY
 #include "hw/s390x/sclp.h"
@@ -91,6 +92,20 @@ void s390_cpu_list(FILE *f, fprintf_function cpu_fprintf)
     (*cpu_fprintf)(f, "s390 %16s\n", "[host]");
 }
 
+CpuDefinitionInfoList *arch_query_cpu_definitions(Error **errp)
+{
+    CpuDefinitionInfoList *entry;
+    CpuDefinitionInfo *info;
+
+    info = g_malloc0(sizeof(*info));
+    info->name = g_strdup("host");
+
+    entry = g_malloc0(sizeof(*entry));
+    entry->value = info;
+
+    return entry;
+}
+
 /* CPUClass::reset() */
 static void s390_cpu_reset(CPUState *s)
 {
-- 
1.7.0.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]