Revision 20420430

b/target-i386/kvm.c
326 326
    return 0;
327 327
}
328 328

  
329
static int kvm_init_identity_map_page(KVMState *s)
330
{
331
#ifdef KVM_CAP_SET_IDENTITY_MAP_ADDR
332
    int ret;
333
    uint64_t addr = 0xfffbc000;
334

  
335
    if (!kvm_check_extension(s, KVM_CAP_SET_IDENTITY_MAP_ADDR)) {
336
        return 0;
337
    }
338

  
339
    ret = kvm_vm_ioctl(s, KVM_SET_IDENTITY_MAP_ADDR, &addr);
340
    if (ret < 0) {
341
        fprintf(stderr, "kvm_set_identity_map_addr: %s\n", strerror(ret));
342
        return ret;
343
    }
344
#endif
345
    return 0;
346
}
347

  
329 348
int kvm_arch_init(KVMState *s, int smp_cpus)
330 349
{
331 350
    int ret;
......
353 372
        perror("e820_add_entry() table is full");
354 373
        exit(1);
355 374
    }
356
    return kvm_vm_ioctl(s, KVM_SET_TSS_ADDR, 0xfffbd000);
375
    ret = kvm_vm_ioctl(s, KVM_SET_TSS_ADDR, 0xfffbd000);
376
    if (ret < 0) {
377
        return ret;
378
    }
379

  
380
    return kvm_init_identity_map_page(s);
357 381
}
358 382
                    
359 383
static void set_v8086_seg(struct kvm_segment *lhs, const SegmentCache *rhs)

Also available in: Unified diff