- Timestamp:
- Jun 7, 2018 12:39:20 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/NEMAllNativeTemplate-win.cpp.h
r72470 r72472 2678 2678 * Handle the intercept. 2679 2679 */ 2680 TRPMEVENT enmEvtType = TRPM_TRAP; 2680 2681 switch (pMsg->ExceptionVector) 2681 2682 { … … 2716 2717 case X86_XCPT_BP: 2717 2718 STAM_REL_COUNTER_INC(&pVCpu->nem.s.StatExitExceptionBp); 2718 Log4(("XcptExit/%u: %04x:%08RX64/%s: #BP - TODO\n", 2719 pVCpu->idCpu, pMsg->Header.CsSegment.Selector, pMsg->Header.Rip, nemHCWinExecStateToLogStr(&pMsg->Header) )); 2719 Log4(("XcptExit/%u: %04x:%08RX64/%s: #BP - TODO - %u\n", pVCpu->idCpu, pMsg->Header.CsSegment.Selector, 2720 pMsg->Header.Rip, nemHCWinExecStateToLogStr(&pMsg->Header), pMsg->Header.InstructionLength)); 2721 enmEvtType = TRPM_SOFTWARE_INT; /* We're at the INT3 instruction, not after it. */ 2720 2722 break; 2721 2723 … … 2728 2730 * Inject it. 2729 2731 */ 2730 rcStrict = IEMInjectTrap(pVCpu, pMsg->ExceptionVector, TRPM_TRAP, pMsg->ErrorCode,2732 rcStrict = IEMInjectTrap(pVCpu, pMsg->ExceptionVector, enmEvtType, pMsg->ErrorCode, 2731 2733 pMsg->ExceptionParameter /*??*/, pMsg->Header.InstructionLength); 2732 2734 Log4(("XcptExit/%u: %04x:%08RX64/%s: %#u -> injected -> %Rrc\n", … … 2771 2773 * Handle the intercept. 2772 2774 */ 2775 TRPMEVENT enmEvtType = TRPM_TRAP; 2773 2776 switch (pExit->VpException.ExceptionType) 2774 2777 { … … 2812 2815 case X86_XCPT_BP: 2813 2816 STAM_REL_COUNTER_INC(&pVCpu->nem.s.StatExitExceptionBp); 2814 Log4(("XcptExit/%u: %04x:%08RX64/%s: #BP - TODO\n", 2815 pVCpu->idCpu, pExit->VpContext.Cs.Selector, pExit->VpContext.Rip, nemR3WinExecStateToLogStr(&pExit->VpContext) )); 2817 Log4(("XcptExit/%u: %04x:%08RX64/%s: #BP - TODO - %u\n", pVCpu->idCpu, pExit->VpContext.Cs.Selector, 2818 pExit->VpContext.Rip, nemR3WinExecStateToLogStr(&pExit->VpContext), pExit->VpContext.InstructionLength)); 2819 enmEvtType = TRPM_SOFTWARE_INT; /* We're at the INT3 instruction, not after it. */ 2816 2820 break; 2817 2821 … … 2824 2828 * Inject it. 2825 2829 */ 2826 rcStrict = IEMInjectTrap(pVCpu, pExit->VpException.ExceptionType, TRPM_TRAP, pExit->VpException.ErrorCode,2830 rcStrict = IEMInjectTrap(pVCpu, pExit->VpException.ExceptionType, enmEvtType, pExit->VpException.ErrorCode, 2827 2831 pExit->VpException.ExceptionParameter /*??*/, pExit->VpContext.InstructionLength); 2828 2832 Log4(("XcptExit/%u: %04x:%08RX64/%s: %#u -> injected -> %Rrc\n", … … 3233 3237 enmVidMsgType, pMappingHeader->cbMessage), 3234 3238 RT_SUCCESS(rcStrict) ? VERR_NEM_IPE_5 : rcStrict); 3239 3240 /* 3241 * Mark the VidMessageStopRequestComplete message as handled. 3242 */ 3243 # ifdef IN_RING0 3244 pVCpu->nem.s.uIoCtlBuf.MsgSlotHandleAndGetNext.iCpu = pGVCpu->idCpu; 3245 pVCpu->nem.s.uIoCtlBuf.MsgSlotHandleAndGetNext.fFlags = VID_MSHAGN_F_HANDLE_MESSAGE; 3246 pVCpu->nem.s.uIoCtlBuf.MsgSlotHandleAndGetNext.cMillies = 30000; /*ms*/ 3247 rcNt = nemR0NtPerformIoControl(pGVM, pGVM->nem.s.IoCtlMessageSlotHandleAndGetNext.uFunction, 3248 &pVCpu->nem.s.uIoCtlBuf.MsgSlotHandleAndGetNext, 3249 sizeof(pVCpu->nem.s.uIoCtlBuf.MsgSlotHandleAndGetNext), 3250 NULL, 0); 3251 AssertLogRelMsgReturn(NT_SUCCESS(rcNt), ("3rd VidMessageSlotHandleAndGetNext after ERROR_VID_STOP_PENDING failed: %#x\n", rcNt), 3252 RT_SUCCESS(rcStrict) ? VERR_NEM_IPE_5 : rcStrict); 3253 # else 3254 fWait = g_pfnVidMessageSlotHandleAndGetNext(pVM->nem.s.hPartitionDevice, pVCpu->idCpu, VID_MSHAGN_F_HANDLE_MESSAGE, 30000 /*ms*/); 3255 AssertLogRelMsgReturn(fWait, ("3rd VidMessageSlotHandleAndGetNext after ERROR_VID_STOP_PENDING failed: %u\n", RTNtLastErrorValue()), 3256 RT_SUCCESS(rcStrict) ? VERR_NEM_IPE_5 : rcStrict); 3257 # endif 3258 Log8(("nemHCWinStopCpu: Stopped the CPU (rcStrict=%Rrc)\n", VBOXSTRICTRC_VAL(rcStrict) )); 3235 3259 } 3236 3260 else 3237 Log8(("nemHCWinStopCpu: 1st VidMessageSlotHandleAndGetNext got VidMessageStopRequestComplete.\n")); 3238 3239 /* 3240 * Mark the VidMessageStopRequestComplete message as handled. 3241 */ 3242 # ifdef IN_RING0 3243 pVCpu->nem.s.uIoCtlBuf.MsgSlotHandleAndGetNext.iCpu = pGVCpu->idCpu; 3244 pVCpu->nem.s.uIoCtlBuf.MsgSlotHandleAndGetNext.fFlags = VID_MSHAGN_F_HANDLE_MESSAGE; 3245 pVCpu->nem.s.uIoCtlBuf.MsgSlotHandleAndGetNext.cMillies = 30000; /*ms*/ 3246 rcNt = nemR0NtPerformIoControl(pGVM, pGVM->nem.s.IoCtlMessageSlotHandleAndGetNext.uFunction, 3247 &pVCpu->nem.s.uIoCtlBuf.MsgSlotHandleAndGetNext, 3248 sizeof(pVCpu->nem.s.uIoCtlBuf.MsgSlotHandleAndGetNext), 3249 NULL, 0); 3250 AssertLogRelMsgReturn(NT_SUCCESS(rcNt), ("3rd VidMessageSlotHandleAndGetNext after ERROR_VID_STOP_PENDING failed: %#x\n", rcNt), 3251 RT_SUCCESS(rcStrict) ? VERR_NEM_IPE_5 : rcStrict); 3252 # else 3253 fWait = g_pfnVidMessageSlotHandleAndGetNext(pVM->nem.s.hPartitionDevice, pVCpu->idCpu, VID_MSHAGN_F_HANDLE_MESSAGE, 30000 /*ms*/); 3254 AssertLogRelMsgReturn(fWait, ("3rd VidMessageSlotHandleAndGetNext after ERROR_VID_STOP_PENDING failed: %u\n", RTNtLastErrorValue()), 3255 RT_SUCCESS(rcStrict) ? VERR_NEM_IPE_5 : rcStrict); 3256 # endif 3257 Log8(("nemHCWinStopCpu: Stopped the CPU (rcStrict=%Rrc)\n", VBOXSTRICTRC_VAL(rcStrict) )); 3261 Log8(("nemHCWinStopCpu: Stopped the CPU (rcStrict=%Rrc) - 1st VidMessageSlotHandleAndGetNext got VidMessageStopRequestComplete.\n", 3262 VBOXSTRICTRC_VAL(rcStrict) )); 3258 3263 return rcStrict; 3259 3264 }
Note:
See TracChangeset
for help on using the changeset viewer.