MCPcopy Create free account
hub / github.com/F-Stack/f-stack / enable_intr_window_exiting

Function enable_intr_window_exiting

freebsd/amd64/vmm/amd/svm.c:1021–1041  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1019#endif
1020
1021static __inline void
1022enable_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
1043static __inline void
1044disable_intr_window_exiting(struct svm_softc *sc, int vcpu)

Callers 1

svm_inj_interruptsFunction · 0.85

Calls 4

svm_get_vmcb_ctrlFunction · 0.85
vintr_intercept_enabledFunction · 0.85
svm_set_dirtyFunction · 0.85
svm_enable_interceptFunction · 0.85

Tested by

no test coverage detected