Changeset 13517 in vbox
- Timestamp:
- Oct 23, 2008 8:33:55 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/hwaccm.h
r13343 r13517 120 120 * @{ 121 121 */ 122 VMMR0DECL(int) HWACCMR0SetupVM(PVM pVM); 123 VMMR0DECL(int) HWACCMR0RunGuestCode(PVM pVM); 124 VMMR0DECL(int) HWACCMR0Enter(PVM pVM); 125 VMMR0DECL(int) HWACCMR0Leave(PVM pVM); 126 VMMR0DECL(int) HWACCMR0InvalidatePage(PVM pVM, RTGCPTR GCVirt); 127 VMMR0DECL(int) HWACCMR0FlushTLB(PVM pVM); 122 VMMR0DECL(int) HWACCMR0SetupVM(PVM pVM); 123 VMMR0DECL(int) HWACCMR0RunGuestCode(PVM pVM); 124 VMMR0DECL(int) HWACCMR0Enter(PVM pVM); 125 VMMR0DECL(int) HWACCMR0Leave(PVM pVM); 126 VMMR0DECL(int) HWACCMR0InvalidatePage(PVM pVM, RTGCPTR GCVirt); 127 VMMR0DECL(int) HWACCMR0FlushTLB(PVM pVM); 128 VMMR0DECL(bool) HWACCMR0SuspendPending(); 128 129 /** @} */ 129 130 #endif /* IN_RING0 */ -
trunk/src/VBox/VMM/VMMR0/HWACCMR0.cpp
r13516 r13517 800 800 801 801 /* Make sure we don't touch hwaccm after we've disabled hwaccm in preparation of a suspend. */ 802 if (HWACCMR0Globals.fSuspended) 803 return VERR_HWACCM_SUSPEND_PENDING; 802 AssertReturn(!HWACCMR0Globals.fSuspended, VERR_HWACCM_SUSPEND_PENDING); 804 803 805 804 /* Terminate a VT-x or AMD-V VM. */ … … 819 818 820 819 /* Make sure we don't touch hwaccm after we've disabled hwaccm in preparation of a suspend. */ 821 if (HWACCMR0Globals.fSuspended) 822 return VERR_HWACCM_SUSPEND_PENDING; 820 AssertReturn(!HWACCMR0Globals.fSuspended, VERR_HWACCM_SUSPEND_PENDING); 823 821 824 822 #ifdef LOG_ENABLED … … 844 842 845 843 /* Make sure we can't enter a session after we've disabled hwaccm in preparation of a suspend. */ 846 if (HWACCMR0Globals.fSuspended) 847 return VINF_EM_RAW_INTERRUPT; 844 AssertReturn(!HWACCMR0Globals.fSuspended, VERR_HWACCM_SUSPEND_PENDING); 848 845 849 846 rc = CPUMQueryGuestCtxPtr(pVM, &pCtx); … … 949 946 950 947 return HWACCMR0Globals.pfnRunGuestCode(pVM, pCtx); 948 } 949 950 /** 951 * Returns suspend status of the host 952 * 953 * @returns Suspend pending or not 954 */ 955 VMMR0DECL(bool) HWACCMR0SuspendPending() 956 { 957 return HWACCMR0Globals.fSuspended; 951 958 } 952 959 -
trunk/src/VBox/VMM/VMMR0/VMMR0.cpp
r13306 r13517 618 618 * Disable interrupts before we do anything interesting. On Windows we avoid 619 619 * this by having the support driver raise the IRQL before calling us, this way 620 * we hope to get away w epage faults and later calling into the kernel.620 * we hope to get away with page faults and later calling into the kernel. 621 621 */ 622 622 case VMMR0_DO_HWACC_RUN: 623 623 { 624 int rc; 625 624 626 STAM_COUNTER_INC(&pVM->vmm.s.StatRunGC); 625 627 … … 627 629 RTCCUINTREG uFlags = ASMIntDisableFlags(); 628 630 #endif 629 int rc = HWACCMR0Enter(pVM); 630 if (VBOX_SUCCESS(rc)) 631 if (!HWACCMR0SuspendPending()) 631 632 { 632 rc = vmmR0CallHostSetJmp(&pVM->vmm.s.CallHostR0JmpBuf, HWACCMR0RunGuestCode, pVM); /* this may resume code. */ 633 int rc2 = HWACCMR0Leave(pVM); 634 AssertRC(rc2); 633 rc = HWACCMR0Enter(pVM); 634 if (VBOX_SUCCESS(rc)) 635 { 636 rc = vmmR0CallHostSetJmp(&pVM->vmm.s.CallHostR0JmpBuf, HWACCMR0RunGuestCode, pVM); /* this may resume code. */ 637 int rc2 = HWACCMR0Leave(pVM); 638 AssertRC(rc2); 639 } 640 } 641 else 642 { 643 /* System is about to go into suspend mode; go back to ring 3. */ 644 rc = VINF_EM_RAW_INTERRUPT; 635 645 } 636 646 pVM->vmm.s.iLastGCRc = rc;
Note:
See TracChangeset
for help on using the changeset viewer.