Revision 6fb6d245 target-i386/kvm.c

b/target-i386/kvm.c
244 244
         * save/restore */
245 245
        msr_list.nmsrs = 0;
246 246
        ret = kvm_ioctl(env->kvm_state, KVM_GET_MSR_INDEX_LIST, &msr_list);
247
        if (ret < 0)
247
        if (ret < 0 && ret != -E2BIG) {
248 248
            return 0;
249

  
249
        }
250 250
        /* Old kernel modules had a bug and could write beyond the provided
251 251
           memory. Allocate at least a safe amount of 1K. */
252 252
        kvm_msr_list = qemu_mallocz(MAX(1024, sizeof(msr_list) +

Also available in: Unified diff