Lines Matching full:control
37 if (svm->vmcb->control.exit_code != SVM_EXIT_NPF) { in nested_svm_inject_npf_exit()
42 svm->vmcb->control.exit_code = SVM_EXIT_NPF; in nested_svm_inject_npf_exit()
43 svm->vmcb->control.exit_code_hi = 0; in nested_svm_inject_npf_exit()
44 svm->vmcb->control.exit_info_1 = (1ULL << 32); in nested_svm_inject_npf_exit()
45 svm->vmcb->control.exit_info_2 = fault->address; in nested_svm_inject_npf_exit()
48 svm->vmcb->control.exit_info_1 &= ~0xffffffffULL; in nested_svm_inject_npf_exit()
49 svm->vmcb->control.exit_info_1 |= fault->error_code; in nested_svm_inject_npf_exit()
108 c = &svm->vmcb->control; in recalc_intercepts()
109 h = &svm->nested.hsave->control; in recalc_intercepts()
194 svm->vmcb->control.msrpm_base_pa = __sme_set(__pa(svm->nested.msrpm)); in nested_svm_vmrun_msrpm()
213 static bool nested_vmcb_check_controls(struct vmcb_control_area *control) in nested_vmcb_check_controls() argument
215 if ((vmcb_is_intercept(control, INTERCEPT_VMRUN)) == 0) in nested_vmcb_check_controls()
218 if (control->asid == 0) in nested_vmcb_check_controls()
221 if ((control->nested_ctl & SVM_NESTED_CTL_NP_ENABLE) && in nested_vmcb_check_controls()
260 return nested_vmcb_check_controls(&vmcb12->control); in nested_vmcb_checks()
264 struct vmcb_control_area *control) in load_nested_vmcb_control() argument
266 copy_vmcb_control_area(&svm->nested.ctl, control); in load_nested_vmcb_control()
269 svm->nested.ctl.asid = control->asid; in load_nested_vmcb_control()
281 svm->nested.ctl.event_inj = svm->vmcb->control.event_inj; in sync_nested_vmcb_control()
282 svm->nested.ctl.event_inj_err = svm->vmcb->control.event_inj_err; in sync_nested_vmcb_control()
290 * svm->vmcb->control.int_ctl and possibly setting V_IRQ in sync_nested_vmcb_control()
299 svm->nested.ctl.int_ctl |= svm->vmcb->control.int_ctl & mask; in sync_nested_vmcb_control()
319 vmcb12->control.exit_int_info_err = in nested_vmcb_save_pending_event()
336 vmcb12->control.exit_int_info = exit_int_info; in nested_vmcb_save_pending_event()
409 svm->vmcb->control.tsc_offset = svm->vcpu.arch.tsc_offset = in nested_prepare_vmcb_control()
412 svm->vmcb->control.int_ctl = in nested_prepare_vmcb_control()
414 (svm->nested.hsave->control.int_ctl & mask); in nested_prepare_vmcb_control()
416 svm->vmcb->control.virt_ext = svm->nested.ctl.virt_ext; in nested_prepare_vmcb_control()
417 svm->vmcb->control.int_vector = svm->nested.ctl.int_vector; in nested_prepare_vmcb_control()
418 svm->vmcb->control.int_state = svm->nested.ctl.int_state; in nested_prepare_vmcb_control()
419 svm->vmcb->control.event_inj = svm->nested.ctl.event_inj; in nested_prepare_vmcb_control()
420 svm->vmcb->control.event_inj_err = svm->nested.ctl.event_inj_err; in nested_prepare_vmcb_control()
422 svm->vmcb->control.pause_filter_count = svm->nested.ctl.pause_filter_count; in nested_prepare_vmcb_control()
423 svm->vmcb->control.pause_filter_thresh = svm->nested.ctl.pause_filter_thresh; in nested_prepare_vmcb_control()
443 load_nested_vmcb_control(svm, &vmcb12->control); in enter_svm_guest_mode()
488 vmcb12->control.exit_code = SVM_EXIT_ERR; in nested_svm_vmrun()
489 vmcb12->control.exit_code_hi = 0; in nested_svm_vmrun()
490 vmcb12->control.exit_info_1 = 0; in nested_svm_vmrun()
491 vmcb12->control.exit_info_2 = 0; in nested_svm_vmrun()
497 vmcb12->control.int_ctl, in nested_svm_vmrun()
498 vmcb12->control.event_inj, in nested_svm_vmrun()
499 vmcb12->control.nested_ctl); in nested_svm_vmrun()
501 trace_kvm_nested_intercepts(vmcb12->control.intercepts[INTERCEPT_CR] & 0xffff, in nested_svm_vmrun()
502 vmcb12->control.intercepts[INTERCEPT_CR] >> 16, in nested_svm_vmrun()
503 vmcb12->control.intercepts[INTERCEPT_EXCEPTION], in nested_svm_vmrun()
504 vmcb12->control.intercepts[INTERCEPT_WORD3], in nested_svm_vmrun()
505 vmcb12->control.intercepts[INTERCEPT_WORD4], in nested_svm_vmrun()
506 vmcb12->control.intercepts[INTERCEPT_WORD5]); in nested_svm_vmrun()
534 copy_vmcb_control_area(&hsave->control, &vmcb->control); in nested_svm_vmrun()
547 svm->vmcb->control.exit_code = SVM_EXIT_ERR; in nested_svm_vmrun()
548 svm->vmcb->control.exit_code_hi = 0; in nested_svm_vmrun()
549 svm->vmcb->control.exit_info_1 = 0; in nested_svm_vmrun()
550 svm->vmcb->control.exit_info_2 = 0; in nested_svm_vmrun()
622 vmcb12->control.int_state = vmcb->control.int_state; in nested_svm_vmexit()
623 vmcb12->control.exit_code = vmcb->control.exit_code; in nested_svm_vmexit()
624 vmcb12->control.exit_code_hi = vmcb->control.exit_code_hi; in nested_svm_vmexit()
625 vmcb12->control.exit_info_1 = vmcb->control.exit_info_1; in nested_svm_vmexit()
626 vmcb12->control.exit_info_2 = vmcb->control.exit_info_2; in nested_svm_vmexit()
628 if (vmcb12->control.exit_code != SVM_EXIT_ERR) in nested_svm_vmexit()
632 vmcb12->control.next_rip = vmcb->control.next_rip; in nested_svm_vmexit()
634 vmcb12->control.int_ctl = svm->nested.ctl.int_ctl; in nested_svm_vmexit()
635 vmcb12->control.tlb_ctl = svm->nested.ctl.tlb_ctl; in nested_svm_vmexit()
636 vmcb12->control.event_inj = svm->nested.ctl.event_inj; in nested_svm_vmexit()
637 vmcb12->control.event_inj_err = svm->nested.ctl.event_inj_err; in nested_svm_vmexit()
639 vmcb12->control.pause_filter_count = in nested_svm_vmexit()
640 svm->vmcb->control.pause_filter_count; in nested_svm_vmexit()
641 vmcb12->control.pause_filter_thresh = in nested_svm_vmexit()
642 svm->vmcb->control.pause_filter_thresh; in nested_svm_vmexit()
644 /* Restore the original control entries */ in nested_svm_vmexit()
645 copy_vmcb_control_area(&vmcb->control, &hsave->control); in nested_svm_vmexit()
650 svm->vmcb->control.tsc_offset = svm->vcpu.arch.tsc_offset = in nested_svm_vmexit()
671 svm->vmcb->control.exit_int_info = 0; in nested_svm_vmexit()
675 trace_kvm_nested_vmexit_inject(vmcb12->control.exit_code, in nested_svm_vmexit()
676 vmcb12->control.exit_info_1, in nested_svm_vmexit()
677 vmcb12->control.exit_info_2, in nested_svm_vmexit()
678 vmcb12->control.exit_int_info, in nested_svm_vmexit()
679 vmcb12->control.exit_int_info_err, in nested_svm_vmexit()
754 copy_vmcb_control_area(&vmcb->control, &hsave->control); in svm_leave_nested()
771 write = svm->vmcb->control.exit_info_1 & 1; in nested_svm_exit_handled_msr()
796 port = svm->vmcb->control.exit_info_1 >> 16; in nested_svm_intercept_ioio()
797 size = (svm->vmcb->control.exit_info_1 & SVM_IOIO_SIZE_MASK) >> in nested_svm_intercept_ioio()
813 u32 exit_code = svm->vmcb->control.exit_code; in nested_svm_intercept()
894 svm->vmcb->control.exit_code = SVM_EXIT_EXCP_BASE + nr; in nested_svm_inject_exception_vmexit()
895 svm->vmcb->control.exit_code_hi = 0; in nested_svm_inject_exception_vmexit()
898 svm->vmcb->control.exit_info_1 = svm->vcpu.arch.exception.error_code; in nested_svm_inject_exception_vmexit()
906 svm->vmcb->control.exit_info_2 = svm->vcpu.arch.apf.nested_apf_token; in nested_svm_inject_exception_vmexit()
908 svm->vmcb->control.exit_info_2 = svm->vcpu.arch.exception.payload; in nested_svm_inject_exception_vmexit()
910 svm->vmcb->control.exit_info_2 = svm->vcpu.arch.cr2; in nested_svm_inject_exception_vmexit()
926 svm->vmcb->control.exit_code = SVM_EXIT_SMI; in nested_svm_smi()
927 svm->vmcb->control.exit_info_1 = 0; in nested_svm_smi()
928 svm->vmcb->control.exit_info_2 = 0; in nested_svm_smi()
935 svm->vmcb->control.exit_code = SVM_EXIT_NMI; in nested_svm_nmi()
936 svm->vmcb->control.exit_info_1 = 0; in nested_svm_nmi()
937 svm->vmcb->control.exit_info_2 = 0; in nested_svm_nmi()
946 svm->vmcb->control.exit_code = SVM_EXIT_INTR; in nested_svm_intr()
947 svm->vmcb->control.exit_info_1 = 0; in nested_svm_intr()
948 svm->vmcb->control.exit_info_2 = 0; in nested_svm_intr()
960 svm->vmcb->control.exit_code = SVM_EXIT_INIT; in nested_svm_init()
961 svm->vmcb->control.exit_info_1 = 0; in nested_svm_init()
962 svm->vmcb->control.exit_info_2 = 0; in nested_svm_init()
1026 u32 exit_code = svm->vmcb->control.exit_code; in nested_svm_exit_special()
1036 if (get_host_vmcb(svm)->control.intercepts[INTERCEPT_EXCEPTION] & in nested_svm_exit_special()
1098 if (copy_to_user(&user_vmcb->control, &svm->nested.ctl, in svm_get_nested_state()
1099 sizeof(user_vmcb->control))) in svm_get_nested_state()
1165 if (copy_from_user(ctl, &user_vmcb->control, sizeof(*ctl))) in svm_set_nested_state()
1191 * All checks done, we can enter guest mode. L1 control fields in svm_set_nested_state()
1196 copy_vmcb_control_area(&hsave->control, &svm->vmcb->control); in svm_set_nested_state()