Revision 4917cf44 hw/i386/pc.c

b/hw/i386/pc.c
886 886

  
887 887
DeviceState *cpu_get_current_apic(void)
888 888
{
889
    if (cpu_single_env) {
890
        return cpu_single_env->apic_state;
889
    if (current_cpu) {
890
        X86CPU *cpu = X86_CPU(current_cpu);
891
        return cpu->env.apic_state;
891 892
    } else {
892 893
        return NULL;
893 894
    }
......
1176 1177

  
1177 1178
static void cpu_request_exit(void *opaque, int irq, int level)
1178 1179
{
1179
    CPUX86State *env = cpu_single_env;
1180
    CPUState *cpu = current_cpu;
1180 1181

  
1181
    if (env && level) {
1182
        cpu_exit(CPU(x86_env_get_cpu(env)));
1182
    if (cpu && level) {
1183
        cpu_exit(cpu);
1183 1184
    }
1184 1185
}
1185 1186

  

Also available in: Unified diff