[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 6/7] target-i386: add implementation of query-cpudef
From: |
Anthony Liguori |
Subject: |
[Qemu-devel] [PATCH 6/7] target-i386: add implementation of query-cpudefs |
Date: |
Fri, 27 Jul 2012 08:37:18 -0500 |
Signed-off-by: Anthony Liguori <address@hidden>
---
target-i386/cpu.c | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 6b9659f..b398439 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -28,6 +28,7 @@
#include "qemu-config.h"
#include "qapi/qapi-visit-core.h"
+#include "qmp-commands.h"
#include "hyperv.h"
@@ -1123,6 +1124,27 @@ void x86_cpu_list(FILE *f, fprintf_function cpu_fprintf,
const char *optarg)
}
}
+CpuDefInfoList *qmp_query_cpudefs(Error **errp)
+{
+ CpuDefInfoList *cpu_list = NULL;
+ x86_def_t *def;
+
+ for (def = x86_defs; def; def = def->next) {
+ CpuDefInfoList *entry;
+ CpuDefInfo *info;
+
+ info = g_malloc0(sizeof(*info));
+ info->name = g_strdup(def->name);
+
+ entry = g_malloc0(sizeof(*entry));
+ entry->value = info;
+ entry->next = cpu_list;
+ cpu_list = entry;
+ }
+
+ return cpu_list;
+}
+
int cpu_x86_register(X86CPU *cpu, const char *cpu_model)
{
CPUX86State *env = &cpu->env;
--
1.7.5.4
- [Qemu-devel] [PATCH 1/7] qmp: introduce device-list-properties command, (continued)
- [Qemu-devel] [PATCH 1/7] qmp: introduce device-list-properties command, Anthony Liguori, 2012/07/27
- [Qemu-devel] [PATCH 2/7] qapi: mark QOM commands stable, Anthony Liguori, 2012/07/27
- [Qemu-devel] [PATCH 5/7] qapi: add query-cpudefs command, Anthony Liguori, 2012/07/27
- [Qemu-devel] [PATCH 7/7] target-ppc: add implementation of query-cpudefs, Anthony Liguori, 2012/07/27
- [Qemu-devel] [PATCH 6/7] target-i386: add implementation of query-cpudefs,
Anthony Liguori <=
- Re: [Qemu-devel] [PATCH 0/7] qapi: add commands to remove the need to parse -help output, Luiz Capitulino, 2012/07/27