Changeset 48206 in vbox
- Timestamp:
- Aug 30, 2013 5:34:16 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp
r48204 r48206 2778 2778 2779 2779 /* 2780 * No longjmps to ring-3 from this point on!!! 2781 * Asserts() will still longjmp to ring-3 (but won't return), which is intentional, better than a kernel panic. 2782 * This also disables flushing of the R0-logger instance (if any). 2783 */ 2784 VMMRZCallRing3Disable(pVCpu); 2785 2786 /* 2780 2787 * We disable interrupts so that we don't miss any interrupts that would flag preemption (IPI/timers etc.) 2781 2788 * when thread-context hooks aren't used and we've been running with preemption disabled for a while. … … 2792 2799 { 2793 2800 ASMSetFlags(pSvmTransient->uEflags); 2801 VMMRZCallRing3Enable(pVCpu); 2794 2802 STAM_COUNTER_INC(&pVCpu->hm.s.StatSwitchHmToR3FF); 2795 2803 return VINF_EM_RAW_TO_R3; … … 2798 2806 { 2799 2807 ASMSetFlags(pSvmTransient->uEflags); 2808 VMMRZCallRing3Enable(pVCpu); 2800 2809 STAM_COUNTER_INC(&pVCpu->hm.s.StatPendingHostIrq); 2801 2810 return VINF_EM_RAW_INTERRUPT; 2802 2811 } 2803 2804 /* Indicate the start of guest execution. No more longjmps or returns to ring-3 from this point!!! */2805 VMCPU_ASSERT_STATE(pVCpu, VMCPUSTATE_STARTED_HM);2806 VMCPU_SET_STATE(pVCpu, VMCPUSTATE_STARTED_EXEC);2807 2812 2808 2813 return VINF_SUCCESS; … … 2827 2832 Assert(!VMMRZCallRing3IsEnabled(pVCpu)); 2828 2833 Assert(VMMR0IsLogFlushDisabled(pVCpu)); 2834 Assert(!RTThreadPreemptIsEnabled(NIL_RTTHREAD)); 2835 2836 VMCPU_ASSERT_STATE(pVCpu, VMCPUSTATE_STARTED_HM); 2837 VMCPU_SET_STATE(pVCpu, VMCPUSTATE_STARTED_EXEC); /* Indicate the start of guest execution. */ 2829 2838 2830 2839 hmR0SvmInjectPendingEvent(pVCpu, pCtx); … … 2949 2958 Assert(!(ASMGetFlags() & X86_EFL_IF)); 2950 2959 ASMSetFlags(pSvmTransient->uEflags); /* Enable interrupts. */ 2951 2952 2960 VMMRZCallRing3Enable(pVCpu); /* It is now safe to do longjmps to ring-3!!! */ 2953 2961 … … 3017 3025 break; 3018 3026 3019 /*3020 * No longjmps to ring-3 from this point on!!!3021 * Asserts() will still longjmp to ring-3 (but won't return), which is intentional, better than a kernel panic.3022 * This also disables flushing of the R0-logger instance (if any).3023 */3024 VMMRZCallRing3Disable(pVCpu);3025 3027 hmR0SvmPreRunGuestCommitted(pVM, pVCpu, pCtx, &SvmTransient); 3026 3027 3028 rc = hmR0SvmRunGuest(pVM, pVCpu, pCtx); 3028 3029 3029 /* 3030 * Restore any residual host-state and save any bits shared between host and guest into the guest-CPU state. 3031 * This will also re-enable longjmps to ring-3 when it has reached a safe point!!! 3032 */ 3030 /* Restore any residual host-state and save any bits shared between host and guest into the guest-CPU state. */ 3033 3031 hmR0SvmPostRunGuest(pVM, pVCpu, pCtx, &SvmTransient, rc); 3032 3034 3033 if (RT_UNLIKELY( rc != VINF_SUCCESS /* Check for VMRUN errors. */ 3035 3034 || SvmTransient.u64ExitCode == (uint64_t)SVM_EXIT_INVALID)) /* Check for invalid guest-state errors. */
Note:
See TracChangeset
for help on using the changeset viewer.