[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 47/48] target-i386: add implementation of query-cpu-
From: |
Luiz Capitulino |
Subject: |
[Qemu-devel] [PATCH 47/48] target-i386: add implementation of query-cpu-definitions (v2) |
Date: |
Mon, 13 Aug 2012 16:49:08 -0300 |
From: Anthony Liguori <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>
---
target-i386/cpu.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 880cfea..6d5d0d6 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"
@@ -1125,6 +1126,27 @@ void x86_cpu_list(FILE *f, fprintf_function cpu_fprintf,
const char *optarg)
}
}
+CpuDefinitionInfoList *qmp_query_cpu_definitions(Error **errp)
+{
+ CpuDefinitionInfoList *cpu_list = NULL;
+ x86_def_t *def;
+
+ for (def = x86_defs; def; def = def->next) {
+ CpuDefinitionInfoList *entry;
+ CpuDefinitionInfo *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.11.2.249.g31c7954.dirty
- [Qemu-devel] [PATCH 38/48] qmp: emit the WAKEUP event when the guest is put to run, (continued)
- [Qemu-devel] [PATCH 38/48] qmp: emit the WAKEUP event when the guest is put to run, Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 37/48] qmp: don't emit the RESET event on wakeup from S3, Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 42/48] qmp: introduce device-list-properties command, Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 43/48] qapi: mark QOM commands stable, Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 26/48] error: add error_get_class(), Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 29/48] qmp: switch to the new error format on the wire, Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 21/48] qapi: don't convert enum strings to lowercase, Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 25/48] qerror: add proper ErrorClass value for QERR_ macros, Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 48/48] target-ppc: add implementation of query-cpu-definitions (v2), Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 24/48] error, qerror: add ErrorClass argument to error functions, Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 47/48] target-i386: add implementation of query-cpu-definitions (v2),
Luiz Capitulino <=
- [Qemu-devel] [PATCH 31/48] error: drop error_get_qobject()/error_set_qobject(), Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 27/48] hmp: hmp_change(): use error_get_class(), Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 30/48] qemu-ga: switch to the new error format on the wire, Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 41/48] qmp: add SUSPEND_DISK event, Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 23/48] qerror: qerror_table: don't use C99 struct initializers, Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 46/48] qapi: add query-cpu-definitions command (v2), Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 39/48] qmp: qmp-events.txt: put events in alphabetical order, Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 40/48] qmp: qmp-events.txt: add missing doc for the SUSPEND event, Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 32/48] error, qerror: pass desc string to error calls, Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 45/48] compiler: add macro for GCC weak symbols, Luiz Capitulino, 2012/08/13