Commit 61dcd775 authored by Andreas Färber's avatar Andreas Färber
Browse files

target-i386: Pass X86CPU to cpu_x86_register()



Avoids an x86_env_get_cpu() call there, to work with QOM properties.
Signed-off-by: default avatarAndreas Färber <afaerber@suse.de>
Reviewed-by: default avatarEduardo Habkost <ehabkost@redhat.com>
Reviewed-by: default avatarIgor Mammedov <imammedo@redhat.com>
parent d0a6acf4
......@@ -905,8 +905,9 @@ void x86_cpu_list(FILE *f, fprintf_function cpu_fprintf, const char *optarg)
}
}
int cpu_x86_register (CPUX86State *env, const char *cpu_model)
int cpu_x86_register(X86CPU *cpu, const char *cpu_model)
{
CPUX86State *env = &cpu->env;
x86_def_t def1, *def = &def1;
memset(def, 0, sizeof(*def));
......
......@@ -901,7 +901,7 @@ int cpu_x86_signal_handler(int host_signum, void *pinfo,
void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count,
uint32_t *eax, uint32_t *ebx,
uint32_t *ecx, uint32_t *edx);
int cpu_x86_register (CPUX86State *env, const char *cpu_model);
int cpu_x86_register(X86CPU *cpu, const char *cpu_model);
void cpu_clear_apic_feature(CPUX86State *env);
void host_cpuid(uint32_t function, uint32_t count,
uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx);
......
......@@ -1176,7 +1176,7 @@ CPUX86State *cpu_x86_init(const char *cpu_model)
cpu_set_debug_excp_handler(breakpoint_handler);
#endif
}
if (cpu_x86_register(env, cpu_model) < 0) {
if (cpu_x86_register(cpu, cpu_model) < 0) {
object_delete(OBJECT(cpu));
return NULL;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment