Lines Matching defs:mtrr_state

39 	return &vcpu->arch.mtrr_state.var_ranges[index];
104 static bool mtrr_is_enabled(struct kvm_mtrr *mtrr_state)
106 return !!(mtrr_state->deftype & IA32_MTRR_DEF_TYPE_E);
109 static bool fixed_mtrr_is_enabled(struct kvm_mtrr *mtrr_state)
111 return !!(mtrr_state->deftype & IA32_MTRR_DEF_TYPE_FE);
114 static u8 mtrr_default_type(struct kvm_mtrr *mtrr_state)
116 return mtrr_state->deftype & IA32_MTRR_DEF_TYPE_TYPE_MASK;
320 struct kvm_mtrr *mtrr_state = &vcpu->arch.mtrr_state;
326 if (!mtrr_is_enabled(mtrr_state) && msr != MSR_MTRRdefType)
331 if (!fixed_mtrr_is_enabled(mtrr_state))
351 struct kvm_mtrr *mtrr_state = &vcpu->arch.mtrr_state;
371 list_for_each_entry(tmp, &mtrr_state->head, node)
387 *(u64 *)&vcpu->arch.mtrr_state.fixed_ranges[index] = data;
389 vcpu->arch.mtrr_state.deftype = data;
418 *pdata = *(u64 *)&vcpu->arch.mtrr_state.fixed_ranges[index];
420 *pdata = vcpu->arch.mtrr_state.deftype;
436 INIT_LIST_HEAD(&vcpu->arch.mtrr_state.head);
441 struct kvm_mtrr *mtrr_state;
475 if (!fixed_mtrr_is_enabled(iter->mtrr_state))
515 struct kvm_mtrr *mtrr_state = iter->mtrr_state;
517 list_for_each_entry_continue(iter->range, &mtrr_state->head, node)
527 struct kvm_mtrr *mtrr_state = iter->mtrr_state;
532 iter->range = list_prepare_entry(iter->range, &mtrr_state->head, node);
549 if (iter->index >= ARRAY_SIZE(iter->mtrr_state->fixed_ranges))
564 if (!mtrr_is_enabled(iter->mtrr_state)) {
574 struct kvm_mtrr *mtrr_state, u64 start, u64 end)
576 iter->mtrr_state = mtrr_state;
590 iter->mem_type = iter->mtrr_state->fixed_ranges[iter->index];
616 struct kvm_mtrr *mtrr_state = &vcpu->arch.mtrr_state;
626 mtrr_for_each_mem_type(&iter, mtrr_state, start, end) {
678 return mtrr_default_type(mtrr_state);
693 struct kvm_mtrr *mtrr_state = &vcpu->arch.mtrr_state;
700 mtrr_for_each_mem_type(&iter, mtrr_state, start, end) {
719 return type == mtrr_default_type(mtrr_state);