| 1019 | #endif |
| 1020 | |
| 1021 | static __inline void |
| 1022 | enable_intr_window_exiting(struct svm_softc *sc, int vcpu) |
| 1023 | { |
| 1024 | struct vmcb_ctrl *ctrl; |
| 1025 | |
| 1026 | ctrl = svm_get_vmcb_ctrl(sc, vcpu); |
| 1027 | |
| 1028 | if (ctrl->v_irq && ctrl->v_intr_vector == 0) { |
| 1029 | KASSERT(ctrl->v_ign_tpr, ("%s: invalid v_ign_tpr", __func__)); |
| 1030 | KASSERT(vintr_intercept_enabled(sc, vcpu), |
| 1031 | ("%s: vintr intercept should be enabled", __func__)); |
| 1032 | return; |
| 1033 | } |
| 1034 | |
| 1035 | VCPU_CTR0(sc->vm, vcpu, "Enable intr window exiting"); |
| 1036 | ctrl->v_irq = 1; |
| 1037 | ctrl->v_ign_tpr = 1; |
| 1038 | ctrl->v_intr_vector = 0; |
| 1039 | svm_set_dirty(sc, vcpu, VMCB_CACHE_TPR); |
| 1040 | svm_enable_intercept(sc, vcpu, VMCB_CTRL1_INTCPT, VMCB_INTCPT_VINTR); |
| 1041 | } |
| 1042 | |
| 1043 | static __inline void |
| 1044 | disable_intr_window_exiting(struct svm_softc *sc, int vcpu) |
no test coverage detected