Revision 4c9f7372 target-i386/kvm.c

b/target-i386/kvm.c
90 90

  
91 91
        /* Obtain MSR list from KVM.  These are the MSRs that we must
92 92
         * save/restore */
93
        msr_list.nmsrs = 0;
93 94
        ret = kvm_ioctl(env->kvm_state, KVM_GET_MSR_INDEX_LIST, &msr_list);
94 95
        if (ret < 0)
95 96
            return 0;
96 97

  
97
        msr_list.nmsrs = 0;
98 98
        kvm_msr_list = qemu_mallocz(sizeof(msr_list) +
99 99
                                    msr_list.nmsrs * sizeof(msr_list.indices[0]));
100 100
        if (kvm_msr_list == NULL)

Also available in: Unified diff