[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 7/7] target-ppc: add implementation of query-cpudefs
From: |
Anthony Liguori |
Subject: |
[Qemu-devel] [PATCH 7/7] target-ppc: add implementation of query-cpudefs |
Date: |
Fri, 27 Jul 2012 08:37:19 -0500 |
Signed-off-by: Anthony Liguori <address@hidden>
---
target-ppc/translate_init.c | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index 5742229..7e025cb 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -10345,6 +10345,31 @@ void ppc_cpu_list (FILE *f, fprintf_function
cpu_fprintf)
}
}
+CpuDefInfoList *qmp_query_cpudefs(Error **errp)
+{
+ CpuDefInfoList *cpu_list = NULL;
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(ppc_defs); i++) {
+ CpuDefInfoList *entry;
+ CpuDefInfo *info;
+
+ if (!ppc_cpu_usable(&ppc_defs[i])) {
+ continue;
+ }
+
+ info = g_malloc0(sizeof(*info));
+ info->name = g_strdup(pcc_defs[i].name);
+
+ entry = g_malloc0(sizeof(*entry));
+ entry->value = info;
+ entry->next = cpu_list;
+ cpu_list = entry;
+ }
+
+ return cpu_list;
+}
+
/* CPUClass::reset() */
static void ppc_cpu_reset(CPUState *s)
{
--
1.7.5.4
- Re: [Qemu-devel] [PATCH 3/7] qapi: add query-machines 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 <=
- [Qemu-devel] [PATCH 6/7] target-i386: add implementation of query-cpudefs, Anthony Liguori, 2012/07/27
- Re: [Qemu-devel] [PATCH 0/7] qapi: add commands to remove the need to parse -help output, Luiz Capitulino, 2012/07/27