Changeset 43867 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Nov 13, 2012 5:23:34 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp
r43865 r43867 514 514 } 515 515 516 /** 517 * Posts a pending event (trap or external interrupt). An injected event should only 518 * be written to the VMCB immediately before VMRUN, otherwise we might have stale events 519 * injected across VM resets and suchlike. See @bugref{6220}. 520 * 521 * @param pVCpu Pointer to the VMCPU. 522 * @param pCtx Pointer to the guest CPU context. 523 * @param pIntInfo Pointer to the SVM interrupt info. 524 */ 525 DECLINLINE(void) hmR0SvmSetPendingEvent(PVMCPU pVCpu, SVM_EVENT *pEvent) 526 { 527 #ifdef VBOX_STRICT 528 Log(("SVM: Set pending event: intInfo=%016llx\n", pEvent->au64[0])); 529 #endif 530 531 /* If there's an event pending already, we're in trouble... */ 532 Assert(!pVCpu->hm.s.Event.fPending); 533 534 /* Set pending event state. */ 535 pVCpu->hm.s.Event.intInfo = pEvent->au64[0]; 536 pVCpu->hm.s.Event.fPending = true; 537 } 516 538 517 539 /** … … 1873 1895 Event.n.u8Vector = X86_XCPT_DB; 1874 1896 1875 hmR0Svm InjectEvent(pVCpu, pvVMCB, pCtx, &Event);1897 hmR0SvmSetPendingEvent(pVCpu, &Event); 1876 1898 goto ResumeExecution; 1877 1899 } … … 1907 1929 Event.n.u8Vector = X86_XCPT_NM; 1908 1930 1909 hmR0Svm InjectEvent(pVCpu, pvVMCB, pCtx, &Event);1931 hmR0SvmSetPendingEvent(pVCpu, &Event); 1910 1932 goto ResumeExecution; 1911 1933 } … … 1936 1958 Event.n.u32ErrorCode = errCode; 1937 1959 1938 hmR0Svm InjectEvent(pVCpu, pvVMCB, pCtx, &Event);1960 hmR0SvmSetPendingEvent(pVCpu, &Event); 1939 1961 goto ResumeExecution; 1940 1962 } … … 2010 2032 Event.n.u32ErrorCode = errCode; 2011 2033 2012 hmR0Svm InjectEvent(pVCpu, pvVMCB, pCtx, &Event);2034 hmR0SvmSetPendingEvent(pVCpu, &Event); 2013 2035 goto ResumeExecution; 2014 2036 } … … 2039 2061 Event.n.u8Vector = X86_XCPT_MF; 2040 2062 2041 hmR0Svm InjectEvent(pVCpu, pvVMCB, pCtx, &Event);2063 hmR0SvmSetPendingEvent(pVCpu, &Event); 2042 2064 goto ResumeExecution; 2043 2065 } … … 2084 2106 } 2085 2107 Log(("Trap %x at %04x:%RGv esi=%x\n", vector, pCtx->cs.Sel, (RTGCPTR)pCtx->rip, pCtx->esi)); 2086 hmR0Svm InjectEvent(pVCpu, pvVMCB, pCtx, &Event);2108 hmR0SvmSetPendingEvent(pVCpu, &Event); 2087 2109 goto ResumeExecution; 2088 2110 } … … 2564 2586 Event.n.u8Vector = X86_XCPT_DB; 2565 2587 2566 hmR0Svm InjectEvent(pVCpu, pvVMCB, pCtx, &Event);2588 hmR0SvmSetPendingEvent(pVCpu, &Event); 2567 2589 goto ResumeExecution; 2568 2590 } … … 2665 2687 2666 2688 Log(("Forced #UD trap at %RGv\n", (RTGCPTR)pCtx->rip)); 2667 hmR0Svm InjectEvent(pVCpu, pvVMCB, pCtx, &Event);2689 hmR0SvmSetPendingEvent(pVCpu, &Event); 2668 2690 goto ResumeExecution; 2669 2691 }
Note:
See TracChangeset
for help on using the changeset viewer.