aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2009-09-18 19:28:36 +0200
committerMarcelo Tosatti <mtosatti@redhat.com>2009-09-18 17:03:07 -0300
commitd643efa6cab743f9eff4a9c8dfa60310d6381215 (patch)
treefdc7596a06afd07bba2776e4781816e74acbbb3d
parentRemove build-targets-* rules that are always empty (diff)
downloadqemu-kvm-d643efa6cab743f9eff4a9c8dfa60310d6381215.tar.gz
qemu-kvm-d643efa6cab743f9eff4a9c8dfa60310d6381215.tar.bz2
qemu-kvm-d643efa6cab743f9eff4a9c8dfa60310d6381215.zip
qemu-kvm: Reindent pc_new_cpu
...for better match with upstream. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
-rw-r--r--hw/pc.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/hw/pc.c b/hw/pc.c
index 7e2a5020d..b5bef0572 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -1097,19 +1097,21 @@ int cpu_is_bsp(CPUState *env)
CPUState *pc_new_cpu(const char *cpu_model)
{
- CPUState *env = cpu_init(cpu_model);
- if (!env) {
- fprintf(stderr, "Unable to find x86 CPU definition\n");
- exit(1);
- }
- env->kvm_cpu_state.regs_modified = 1;
- if ((env->cpuid_features & CPUID_APIC) || smp_cpus > 1) {
- env->cpuid_apic_id = env->cpu_index;
- /* APIC reset callback resets cpu */
- apic_init(env);
- } else {
- qemu_register_reset((QEMUResetHandler*)cpu_reset, env);
- }
+ CPUState *env;
+
+ env = cpu_init(cpu_model);
+ if (!env) {
+ fprintf(stderr, "Unable to find x86 CPU definition\n");
+ exit(1);
+ }
+ env->kvm_cpu_state.regs_modified = 1;
+ if ((env->cpuid_features & CPUID_APIC) || smp_cpus > 1) {
+ env->cpuid_apic_id = env->cpu_index;
+ /* APIC reset callback resets cpu */
+ apic_init(env);
+ } else {
+ qemu_register_reset((QEMUResetHandler*)cpu_reset, env);
+ }
/* kvm needs this to run after the apic is initialized. Otherwise,
* it can access invalid state and crash.