Revision 84b4915d cpus.c

b/cpus.c
265 265
void qemu_init_vcpu(void *_env)
266 266
{
267 267
    CPUState *env = _env;
268
    int r;
268 269

  
269 270
    env->nr_cores = smp_cores;
270 271
    env->nr_threads = smp_threads;
271
    if (kvm_enabled())
272
        kvm_init_vcpu(env);
273
    return;
272

  
273
    if (kvm_enabled()) {
274
        r = kvm_init_vcpu(env);
275
        if (r < 0) {
276
            fprintf(stderr, "kvm_init_vcpu failed: %s\n", strerror(-r));
277
            exit(1);
278
        }
279
    }
274 280
}
275 281

  
276 282
int qemu_cpu_self(void *env)
......
600 606
static void *kvm_cpu_thread_fn(void *arg)
601 607
{
602 608
    CPUState *env = arg;
609
    int r;
603 610

  
604 611
    qemu_mutex_lock(&qemu_global_mutex);
605 612
    qemu_thread_self(env->thread);
606 613

  
607
    kvm_init_vcpu(env);
614
    r = kvm_init_vcpu(env);
615
    if (r < 0) {
616
        fprintf(stderr, "kvm_init_vcpu failed: %s\n", strerror(-r));
617
        exit(1);
618
    }
608 619

  
609 620
    kvm_init_ipi(env);
610 621

  

Also available in: Unified diff