diff options
author | Andreas Färber <afaerber@suse.de> | 2012-10-10 12:18:02 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2012-10-30 22:38:37 +0100 |
commit | 449994eb58a4175a2e7656175b18c65ead6c09ca (patch) | |
tree | b54e34b26b4b4d5e2f39caab225a8ca3d8224be1 /target-i386/cpu.c | |
parent | bdeec802170d5dc9f0f8a01235c3488dca3ff83b (diff) | |
download | qemu-449994eb58a4175a2e7656175b18c65ead6c09ca.zip qemu-449994eb58a4175a2e7656175b18c65ead6c09ca.tar.gz qemu-449994eb58a4175a2e7656175b18c65ead6c09ca.tar.bz2 |
target-i386: Inline APIC cpu_env property setting
This prepares for changing the variable type from void*.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Diffstat (limited to 'target-i386/cpu.c')
-rw-r--r-- | target-i386/cpu.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 18b8549..c30cc79 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -41,6 +41,7 @@ #ifndef CONFIG_USER_ONLY #include "hw/xen.h" #include "hw/sysbus.h" +#include "hw/apic_internal.h" #endif /* feature flags taken from "Intel Processor Identification and the CPUID @@ -1892,6 +1893,7 @@ static void x86_cpu_apic_init(X86CPU *cpu, Error **errp) { static int apic_mapped; CPUX86State *env = &cpu->env; + APICCommonState *apic; const char *apic_type = "apic"; if (kvm_irqchip_in_kernel()) { @@ -1910,7 +1912,8 @@ static void x86_cpu_apic_init(X86CPU *cpu, Error **errp) OBJECT(env->apic_state), NULL); qdev_prop_set_uint8(env->apic_state, "id", env->cpuid_apic_id); /* TODO: convert to link<> */ - qdev_prop_set_ptr(env->apic_state, "cpu_env", env); + apic = APIC_COMMON(env->apic_state); + apic->cpu_env = env; if (qdev_init(env->apic_state)) { error_setg(errp, "APIC device '%s' could not be initialized", |