Lines Matching refs:nmsrs
788 buffer.header.nmsrs = 1; in vcpu_get_msr()
824 buffer.header.nmsrs = 1; in _vcpu_set_msr()
923 struct kvm_msr_list nmsrs; in kvm_get_num_msrs_fd() local
926 nmsrs.nmsrs = 0; in kvm_get_num_msrs_fd()
927 r = ioctl(kvm_fd, KVM_GET_MSR_INDEX_LIST, &nmsrs); in kvm_get_num_msrs_fd()
931 return nmsrs.nmsrs; in kvm_get_num_msrs_fd()
942 int nmsrs, r, kvm_fd; in kvm_get_msr_index_list() local
948 nmsrs = kvm_get_num_msrs_fd(kvm_fd); in kvm_get_msr_index_list()
949 list = malloc(sizeof(*list) + nmsrs * sizeof(list->indices[0])); in kvm_get_msr_index_list()
950 list->nmsrs = nmsrs; in kvm_get_msr_index_list()
965 int nmsrs, r, i; in vcpu_save_state() local
983 nmsrs = kvm_get_num_msrs(vm); in vcpu_save_state()
984 list = malloc(sizeof(*list) + nmsrs * sizeof(list->indices[0])); in vcpu_save_state()
985 list->nmsrs = nmsrs; in vcpu_save_state()
990 state = malloc(sizeof(*state) + nmsrs * sizeof(state->msrs.entries[0])); in vcpu_save_state()
1028 state->msrs.nmsrs = nmsrs; in vcpu_save_state()
1029 for (i = 0; i < nmsrs; i++) in vcpu_save_state()
1032 TEST_ASSERT(r == nmsrs, "Unexpected result from KVM_GET_MSRS, r: %i (failed MSR was 0x%x)", in vcpu_save_state()
1033 r, r == nmsrs ? -1 : list->indices[r]); in vcpu_save_state()
1063 … TEST_ASSERT(r == state->msrs.nmsrs, "Unexpected result from KVM_SET_MSRS, r: %i (failed at %x)", in vcpu_load_state()
1064 r, r == state->msrs.nmsrs ? -1 : state->msrs.entries[r].index); in vcpu_load_state()