Changeset 72452 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Jun 5, 2018 2:35:45 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/NEMAllNativeTemplate-win.cpp.h
r72446 r72452 2729 2729 */ 2730 2730 AssertMsg(pExit->VpContext.InstructionLength < 0x10, ("%#x\n", pExit->VpContext.InstructionLength)); 2731 #if 0 2732 Log4(("XcptExit/%u: %04x:%08RX64/%s: %x\n", pVCpu->idCpu, pExit->VpContext.Cs.Selector, pExit->VpContext.Rip, nemR3WinExecStateToLogStr(&pExit->VpContext), pExit->VpException.ExceptionType)); 2731 2732 /* 2733 * Get most of the register state since we'll end up making IEM inject the 2734 * event. The exception isn't normally flaged as a pending event, so duh. 2735 * 2736 * Note! We can optimize this later with event injection. 2737 */ 2738 Log4(("XcptExit/%u: %04x:%08RX64/%s: %x errcd=%#x parm=%RX64\n", pVCpu->idCpu, pExit->VpContext.Cs.Selector, 2739 pExit->VpContext.Rip, nemR3WinExecStateToLogStr(&pExit->VpContext), pExit->VpException.ExceptionType, 2740 pExit->VpException.ErrorCode, pExit->VpException.ExceptionParameter )); 2733 2741 nemR3WinCopyStateFromExceptionMessage(pVCpu, pExit, pCtx, true /*fClearXcpt*/); 2734 VBOXSTRICTRC rcStrict = nemHCWinImportStateIfNeededStrict(pVCpu, NULL, pCtx, NEM_WIN_CPUMCTX_EXTRN_MASK_FOR_IEM, " #UD");2742 VBOXSTRICTRC rcStrict = nemHCWinImportStateIfNeededStrict(pVCpu, NULL, pCtx, NEM_WIN_CPUMCTX_EXTRN_MASK_FOR_IEM, "Xcpt"); 2735 2743 if (rcStrict != VINF_SUCCESS) 2736 2744 return rcStrict; 2737 #endif2738 Assert(pExit->VpContext.ExecutionState.InterruptionPending);2739 2745 2740 2746 /* … … 2748 2754 */ 2749 2755 case X86_XCPT_UD: 2756 /** @todo Call GIMXcptUD if required. */ 2750 2757 if (nemHcWinIsInterestingUndefinedOpcode(pExit->VpException.InstructionByteCount, pExit->VpException.InstructionBytes, 2751 2758 pExit->VpContext.ExecutionState.EferLma && pExit->VpContext.Cs.Long )) 2752 2759 { 2753 nemR3WinCopyStateFromExceptionMessage(pVCpu, pExit, pCtx, true /*fClearXcpt*/); 2754 VBOXSTRICTRC rcStrict = nemHCWinImportStateIfNeededStrict(pVCpu, NULL, pCtx, 2755 NEM_WIN_CPUMCTX_EXTRN_MASK_FOR_IEM, "#UD"); 2756 if (rcStrict == VINF_SUCCESS) 2757 { 2758 rcStrict = IEMExecOneWithPrefetchedByPC(pVCpu, CPUMCTX2CORE(pCtx), pExit->VpContext.Rip, 2759 pExit->VpException.InstructionBytes, 2760 pExit->VpException.InstructionByteCount); 2761 Log4(("XcptExit/%u: %04x:%08RX64/%s: #UD -> emulated -> %Rrc\n", 2762 pVCpu->idCpu, pExit->VpContext.Cs.Selector, pExit->VpContext.Rip, 2763 nemR3WinExecStateToLogStr(&pExit->VpContext), VBOXSTRICTRC_VAL(rcStrict) )); 2764 } 2765 else 2766 Log4(("XcptExit/%u: %04x:%08RX64/%s: #UD -> state import (emulate) -> %Rrc\n", 2767 pVCpu->idCpu, pExit->VpContext.Cs.Selector, pExit->VpContext.Rip, 2768 nemR3WinExecStateToLogStr(&pExit->VpContext), VBOXSTRICTRC_VAL(rcStrict) )); 2760 rcStrict = IEMExecOneWithPrefetchedByPC(pVCpu, CPUMCTX2CORE(pCtx), pExit->VpContext.Rip, 2761 pExit->VpException.InstructionBytes, 2762 pExit->VpException.InstructionByteCount); 2763 Log4(("XcptExit/%u: %04x:%08RX64/%s: #UD -> emulated -> %Rrc\n", 2764 pVCpu->idCpu, pExit->VpContext.Cs.Selector, pExit->VpContext.Rip, 2765 nemR3WinExecStateToLogStr(&pExit->VpContext), VBOXSTRICTRC_VAL(rcStrict) )); 2769 2766 return rcStrict; 2770 2767 } 2768 2771 2769 Log4(("XcptExit/%u: %04x:%08RX64/%s: #UD [%.*Rhxs] -> re-injected\n", pVCpu->idCpu, 2772 2770 pExit->VpContext.Cs.Selector, pExit->VpContext.Rip, nemR3WinExecStateToLogStr(&pExit->VpContext), … … 2778 2776 */ 2779 2777 case X86_XCPT_DB: 2778 Log4(("XcptExit/%u: %04x:%08RX64/%s: #DB - TODO\n", 2779 pVCpu->idCpu, pExit->VpContext.Cs.Selector, pExit->VpContext.Rip, nemR3WinExecStateToLogStr(&pExit->VpContext) )); 2780 2780 break; 2781 2781 2782 2782 case X86_XCPT_BP: 2783 Log4(("XcptExit/%u: %04x:%08RX64/%s: #BP - TODO\n", 2784 pVCpu->idCpu, pExit->VpContext.Cs.Selector, pExit->VpContext.Rip, nemR3WinExecStateToLogStr(&pExit->VpContext) )); 2783 2785 break; 2784 2786 … … 2788 2790 } 2789 2791 2792 /* 2793 * Inject it. 2794 */ 2795 rcStrict = IEMInjectTrap(pVCpu, pExit->VpException.ExceptionType, TRPM_TRAP, pExit->VpException.ErrorCode, 2796 pExit->VpException.ExceptionParameter /*??*/, pExit->VpContext.InstructionLength); 2797 Log4(("XcptExit/%u: %04x:%08RX64/%s: %#u -> injected -> %Rrc\n", 2798 pVCpu->idCpu, pExit->VpContext.Cs.Selector, pExit->VpContext.Rip, 2799 nemR3WinExecStateToLogStr(&pExit->VpContext), pExit->VpException.ExceptionType, VBOXSTRICTRC_VAL(rcStrict) )); 2800 2790 2801 RT_NOREF_PV(pVM); 2791 return VINF_SUCCESS;2802 return rcStrict; 2792 2803 } 2793 2804 #endif /* IN_RING3 && !NEM_WIN_USE_OUR_OWN_RUN_API */
Note:
See TracChangeset
for help on using the changeset viewer.