diff options
author | Peter Maydell | 2018-03-20 13:56:19 +0100 |
---|---|---|
committer | Peter Maydell | 2018-03-20 13:56:20 +0100 |
commit | 036793aebfc1dd0ce124fa278d7668d89b5da936 (patch) | |
tree | 5379e9c3085460af6aa2665a07b2250f51c6b60f /exec.c | |
parent | RISC-V: Fix riscv_isa_string memory size bug (diff) | |
parent | i386: Disable Intel PT if packets IP payloads have LIP values (diff) | |
download | qemu-036793aebfc1dd0ce124fa278d7668d89b5da936.tar.gz qemu-036793aebfc1dd0ce124fa278d7668d89b5da936.tar.xz qemu-036793aebfc1dd0ce124fa278d7668d89b5da936.zip |
Merge remote-tracking branch 'remotes/ehabkost/tags/machine-next-pull-request' into staging
Machine and x86 queue, 2018-03-19
* cpu_model/cpu_type cleanups
* x86: Fix on Intel Processor Trace CPUID checks
# gpg: Signature made Mon 19 Mar 2018 20:07:14 GMT
# gpg: using RSA key 2807936F984DC5A6
# gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>"
# Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6
* remotes/ehabkost/tags/machine-next-pull-request:
i386: Disable Intel PT if packets IP payloads have LIP values
cpu: drop unnecessary NULL check and cpu_common_class_by_name()
cpu: get rid of unused cpu_init() defines
Use cpu_create(type) instead of cpu_init(cpu_model)
cpu: add CPU_RESOLVING_TYPE macro
tests: add machine 'none' with -cpu test
nios2: 10m50_devboard: replace cpu_model with cpu_type
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -817,6 +817,29 @@ void cpu_exec_realizefn(CPUState *cpu, Error **errp) #endif } +const char *parse_cpu_model(const char *cpu_model) +{ + ObjectClass *oc; + CPUClass *cc; + gchar **model_pieces; + const char *cpu_type; + + model_pieces = g_strsplit(cpu_model, ",", 2); + + oc = cpu_class_by_name(CPU_RESOLVING_TYPE, model_pieces[0]); + if (oc == NULL) { + error_report("unable to find CPU model '%s'", model_pieces[0]); + g_strfreev(model_pieces); + exit(EXIT_FAILURE); + } + + cpu_type = object_class_get_name(oc); + cc = CPU_CLASS(oc); + cc->parse_features(cpu_type, model_pieces[1], &error_fatal); + g_strfreev(model_pieces); + return cpu_type; +} + #if defined(CONFIG_USER_ONLY) static void breakpoint_invalidate(CPUState *cpu, target_ulong pc) { |