diff options
Diffstat (limited to 'target-i386')
-rw-r--r-- | target-i386/cpu.c | 8 | ||||
-rw-r--r-- | target-i386/cpu.h | 9 |
2 files changed, 3 insertions, 14 deletions
diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 50907d0bf1..ed7e5d5de3 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -2728,12 +2728,8 @@ static void x86_cpu_apic_realize(X86CPU *cpu, Error **errp) if (cpu->apic_state == NULL) { return; } - - if (qdev_init(cpu->apic_state)) { - error_setg(errp, "APIC device '%s' could not be initialized", - object_get_typename(OBJECT(cpu->apic_state))); - return; - } + object_property_set_bool(OBJECT(cpu->apic_state), true, "realized", + errp); } #else static void x86_cpu_apic_realize(X86CPU *cpu, Error **errp) diff --git a/target-i386/cpu.h b/target-i386/cpu.h index 0638d24a88..e4c27b1fa8 100644 --- a/target-i386/cpu.h +++ b/target-i386/cpu.h @@ -1170,14 +1170,7 @@ uint64_t cpu_get_tsc(CPUX86State *env); # define PHYS_ADDR_MASK 0xfffffffffLL # endif -static inline CPUX86State *cpu_init(const char *cpu_model) -{ - X86CPU *cpu = cpu_x86_init(cpu_model); - if (cpu == NULL) { - return NULL; - } - return &cpu->env; -} +#define cpu_init(cpu_model) CPU(cpu_x86_init(cpu_model)) #define cpu_exec cpu_x86_exec #define cpu_gen_code cpu_x86_gen_code |