mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-18 23:52:14 -06:00
target-i386: add implementation of query-cpu-definitions (v2)
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
parent
e4e31c6324
commit
e3966126d0
1 changed files with 22 additions and 0 deletions
|
@ -28,6 +28,7 @@
|
||||||
#include "qemu-config.h"
|
#include "qemu-config.h"
|
||||||
|
|
||||||
#include "qapi/qapi-visit-core.h"
|
#include "qapi/qapi-visit-core.h"
|
||||||
|
#include "qmp-commands.h"
|
||||||
|
|
||||||
#include "hyperv.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)
|
int cpu_x86_register(X86CPU *cpu, const char *cpu_model)
|
||||||
{
|
{
|
||||||
CPUX86State *env = &cpu->env;
|
CPUX86State *env = &cpu->env;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue