qemu: introduce qemu_init_vcpu (Marcelo Tosatti)
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7242 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
		
							parent
							
								
									43b9685807
								
							
						
					
					
						commit
						0bf46a40a1
					
				| 
						 | 
				
			
			@ -189,6 +189,12 @@ void qemu_service_io(void);
 | 
			
		|||
/* Force QEMU to process pending events */
 | 
			
		||||
void qemu_notify_event(void);
 | 
			
		||||
 | 
			
		||||
#ifdef CONFIG_USER_ONLY
 | 
			
		||||
#define qemu_init_vcpu(env) do { } while (0)
 | 
			
		||||
#else
 | 
			
		||||
void qemu_init_vcpu(void *env);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
typedef struct QEMUIOVector {
 | 
			
		||||
    struct iovec *iov;
 | 
			
		||||
    int niov;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2505,6 +2505,7 @@ CPUAlphaState * cpu_alpha_init (const char *cpu_model)
 | 
			
		|||
    env->ipr[IPR_SISR] = 0;
 | 
			
		||||
    env->ipr[IPR_VIRBND] = -1ULL;
 | 
			
		||||
 | 
			
		||||
    qemu_init_vcpu(env);
 | 
			
		||||
    return env;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -267,6 +267,7 @@ CPUARMState *cpu_arm_init(const char *cpu_model)
 | 
			
		|||
        gdb_register_coprocessor(env, vfp_gdb_get_reg, vfp_gdb_set_reg,
 | 
			
		||||
                                 19, "arm-vfp.xml", 0);
 | 
			
		||||
    }
 | 
			
		||||
    qemu_init_vcpu(env);
 | 
			
		||||
    return env;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3405,6 +3405,7 @@ CPUCRISState *cpu_cris_init (const char *cpu_model)
 | 
			
		|||
 | 
			
		||||
	cpu_exec_init(env);
 | 
			
		||||
	cpu_reset(env);
 | 
			
		||||
	qemu_init_vcpu(env);
 | 
			
		||||
 | 
			
		||||
	if (tcg_initialized)
 | 
			
		||||
		return env;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1692,7 +1692,8 @@ CPUX86State *cpu_x86_init(const char *cpu_model)
 | 
			
		|||
#ifdef CONFIG_KQEMU
 | 
			
		||||
    kqemu_init(env);
 | 
			
		||||
#endif
 | 
			
		||||
    if (kvm_enabled())
 | 
			
		||||
        kvm_init_vcpu(env);
 | 
			
		||||
 | 
			
		||||
    qemu_init_vcpu(env);
 | 
			
		||||
 | 
			
		||||
    return env;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -180,6 +180,7 @@ CPUM68KState *cpu_m68k_init(const char *cpu_model)
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    cpu_reset(env);
 | 
			
		||||
    qemu_init_vcpu(env);
 | 
			
		||||
    return env;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8551,6 +8551,7 @@ CPUMIPSState *cpu_mips_init (const char *cpu_model)
 | 
			
		|||
    env->cpu_model_str = cpu_model;
 | 
			
		||||
    mips_tcg_init();
 | 
			
		||||
    cpu_reset(env);
 | 
			
		||||
    qemu_init_vcpu(env);
 | 
			
		||||
    return env;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2831,8 +2831,7 @@ CPUPPCState *cpu_ppc_init (const char *cpu_model)
 | 
			
		|||
    cpu_ppc_register_internal(env, def);
 | 
			
		||||
    cpu_ppc_reset(env);
 | 
			
		||||
 | 
			
		||||
    if (kvm_enabled())
 | 
			
		||||
        kvm_init_vcpu(env);
 | 
			
		||||
    qemu_init_vcpu(env);
 | 
			
		||||
 | 
			
		||||
    return env;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -290,6 +290,7 @@ CPUSH4State *cpu_sh4_init(const char *cpu_model)
 | 
			
		|||
    cpu_sh4_reset(env);
 | 
			
		||||
    cpu_sh4_register(env, def);
 | 
			
		||||
    tlb_flush(env, 1);
 | 
			
		||||
    qemu_init_vcpu(env);
 | 
			
		||||
    return env;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -723,6 +723,7 @@ CPUSPARCState *cpu_sparc_init(const char *cpu_model)
 | 
			
		|||
        return NULL;
 | 
			
		||||
    }
 | 
			
		||||
    cpu_reset(env);
 | 
			
		||||
    qemu_init_vcpu(env);
 | 
			
		||||
 | 
			
		||||
    return env;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue