diff mbox

[RFC,22/25] target-i386: Add AccelState parameter to cpu_x86_create()

Message ID 1404943462-711-23-git-send-email-ehabkost@redhat.com
State New
Headers show

Commit Message

Eduardo Habkost July 9, 2014, 10:04 p.m. UTC
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 hw/i386/pc.c      | 3 ++-
 target-i386/cpu.c | 4 ++--
 target-i386/cpu.h | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 2cf22b1..03a108c 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -960,7 +960,8 @@  static X86CPU *pc_new_cpu(const char *cpu_model, int64_t apic_id,
     X86CPU *cpu;
     Error *local_err = NULL;
 
-    cpu = cpu_x86_create(cpu_model, icc_bridge, &local_err);
+    cpu = cpu_x86_create(cpu_model, icc_bridge, current_machine->accelerator,
+                         &local_err);
     if (local_err != NULL) {
         error_propagate(errp, local_err);
         return NULL;
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 45c662d..428ced3 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -2015,7 +2015,7 @@  static void x86_cpu_load_def(X86CPU *cpu, X86CPUDefinition *def, Error **errp)
 }
 
 X86CPU *cpu_x86_create(const char *cpu_model, DeviceState *icc_bridge,
-                       Error **errp)
+                       AccelState *accel, Error **errp)
 {
     X86CPU *cpu = NULL;
     X86CPUClass *xcc;
@@ -2077,7 +2077,7 @@  X86CPU *cpu_x86_init(const char *cpu_model)
     Error *error = NULL;
     X86CPU *cpu;
 
-    cpu = cpu_x86_create(cpu_model, NULL, &error);
+    cpu = cpu_x86_create(cpu_model, NULL, NULL, &error);
     if (error) {
         goto out;
     }
diff --git a/target-i386/cpu.h b/target-i386/cpu.h
index e634d83..421859a 100644
--- a/target-i386/cpu.h
+++ b/target-i386/cpu.h
@@ -964,7 +964,7 @@  typedef struct CPUX86State {
 
 X86CPU *cpu_x86_init(const char *cpu_model);
 X86CPU *cpu_x86_create(const char *cpu_model, DeviceState *icc_bridge,
-                       Error **errp);
+                       AccelState *accel, Error **errp);
 int cpu_x86_exec(CPUX86State *s);
 void x86_cpu_list(FILE *f, fprintf_function cpu_fprintf);
 void x86_cpudef_setup(void);