Changeset 10502 in vbox
- Timestamp:
- Jul 11, 2008 9:31:15 AM (17 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/HWACCMInternal.h
r10489 r10502 396 396 397 397 #ifdef VBOX_STRICT 398 /** 399 * Returns the cpu structure for the current cpu. 400 * Keep in mind that there is no guarantee it will stay the same (long jumps to ring 3!!!). 401 * 402 * @returns cpu structure pointer 403 * @param pVM The VM to operate on. 404 */ 405 HWACCMR0DECL(PHWACCM_CPUINFO) HWACCMR0GetCurrentCpu(); 406 398 407 HWACCMR0DECL(void) HWACCMDumpRegs(PCPUMCTX pCtx); 399 408 HWACCMR0DECL(void) HWACCMR0DumpDescriptor(PX86DESCHC Desc, RTSEL Sel, const char *pszMsg); … … 411 420 HWACCMR0DECL(int) HWACCMR0DummyTermVM(PVM pVM); 412 421 HWACCMR0DECL(int) HWACCMR0DummySetupVM(PVM pVM); 413 HWACCMR0DECL(int) HWACCMR0DummyRunGuestCode(PVM pVM, CPUMCTX *pCtx , PHWACCM_CPUINFO pCpu);422 HWACCMR0DECL(int) HWACCMR0DummyRunGuestCode(PVM pVM, CPUMCTX *pCtx); 414 423 HWACCMR0DECL(int) HWACCMR0DummySaveHostState(PVM pVM); 415 424 HWACCMR0DECL(int) HWACCMR0DummyLoadGuestState(PVM pVM, CPUMCTX *pCtx); -
trunk/src/VBox/VMM/VMMR0/HWACCMR0.cpp
r10489 r10502 67 67 DECLR0CALLBACKMEMBER(int, pfnSaveHostState,(PVM pVM)); 68 68 DECLR0CALLBACKMEMBER(int, pfnLoadGuestState,(PVM pVM, CPUMCTX *pCtx)); 69 DECLR0CALLBACKMEMBER(int, pfnRunGuestCode,(PVM pVM, CPUMCTX *pCtx , PHWACCM_CPUINFO pCpu));69 DECLR0CALLBACKMEMBER(int, pfnRunGuestCode,(PVM pVM, CPUMCTX *pCtx)); 70 70 DECLR0CALLBACKMEMBER(int, pfnEnableCpu, (PHWACCM_CPUINFO pCpu, PVM pVM, void *pvPageCpu, RTHCPHYS pPageCpuPhys)); 71 71 DECLR0CALLBACKMEMBER(int, pfnDisableCpu, (PHWACCM_CPUINFO pCpu, void *pvPageCpu, RTHCPHYS pPageCpuPhys)); … … 795 795 796 796 Assert(!VM_FF_ISPENDING(pVM, VM_FF_PGM_SYNC_CR3 | VM_FF_PGM_SYNC_CR3_NON_GLOBAL)); 797 Assert(HWACCMR0Globals.aCpuInfo[idCpu].fConfigured); 797 798 798 799 rc = CPUMQueryGuestCtxPtr(pVM, &pCtx); … … 800 801 return rc; 801 802 802 return HWACCMR0Globals.pfnRunGuestCode(pVM, pCtx, &HWACCMR0Globals.aCpuInfo[idCpu]); 803 } 804 803 return HWACCMR0Globals.pfnRunGuestCode(pVM, pCtx); 804 } 805 806 /** 807 * Returns the cpu structure for the current cpu. 808 * Keep in mind that there is no guarantee it will stay the same (long jumps to ring 3!!!). 809 * 810 * @returns cpu structure pointer 811 * @param pVM The VM to operate on. 812 */ 813 HWACCMR0DECL(PHWACCM_CPUINFO) HWACCMR0GetCurrentCpu() 814 { 815 RTCPUID idCpu = RTMpCpuId(); 816 817 return &HWACCMR0Globals.aCpuInfo[idCpu]; 818 } 805 819 806 820 #ifdef VBOX_STRICT … … 1047 1061 } 1048 1062 1049 HWACCMR0DECL(int) HWACCMR0DummyRunGuestCode(PVM pVM, CPUMCTX *pCtx , PHWACCM_CPUINFO pCpu)1063 HWACCMR0DECL(int) HWACCMR0DummyRunGuestCode(PVM pVM, CPUMCTX *pCtx) 1050 1064 { 1051 1065 return VINF_SUCCESS; -
trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp
r10500 r10502 765 765 * @param pVM The VM to operate on. 766 766 * @param pCtx Guest context 767 * @param pCpu CPU info struct768 767 */ 769 HWACCMR0DECL(int) SVMR0RunGuestCode(PVM pVM, CPUMCTX *pCtx , PHWACCM_CPUINFO pCpu)768 HWACCMR0DECL(int) SVMR0RunGuestCode(PVM pVM, CPUMCTX *pCtx) 770 769 { 771 770 int rc = VINF_SUCCESS; … … 777 776 778 777 STAM_PROFILE_ADV_START(&pVM->hwaccm.s.StatEntry, x); 779 780 AssertReturn(pCpu->fConfigured, VERR_EM_INTERNAL_ERROR);781 778 782 779 pVMCB = (SVM_VMCB *)pVM->hwaccm.s.svm.pVMCB; … … 879 876 * (until the actual world switch) 880 877 */ 878 PHWACCM_CPUINFO pCpu = HWACCMR0GetCurrentCpu(); 881 879 /* Force a TLB flush for the first world switch if the current cpu differs from the one we ran on last. */ 882 880 /* Note that this can happen both for start and resume due to long jumps back to ring 3. */ -
trunk/src/VBox/VMM/VMMR0/HWSVMR0.h
r9421 r10502 113 113 * @param pVM The VM to operate on. 114 114 * @param pCtx Guest context 115 * @param pCpu CPU info struct116 115 */ 117 HWACCMR0DECL(int) SVMR0RunGuestCode(PVM pVM, CPUMCTX *pCtx , PHWACCM_CPUINFO pCpu);116 HWACCMR0DECL(int) SVMR0RunGuestCode(PVM pVM, CPUMCTX *pCtx); 118 117 119 118 -
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r10473 r10502 1022 1022 * @param pVM The VM to operate on. 1023 1023 * @param pCtx Guest context 1024 * @param pCpu CPU info struct1025 1024 */ 1026 HWACCMR0DECL(int) VMXR0RunGuestCode(PVM pVM, CPUMCTX *pCtx , PHWACCM_CPUINFO pCpu)1025 HWACCMR0DECL(int) VMXR0RunGuestCode(PVM pVM, CPUMCTX *pCtx) 1027 1026 { 1028 1027 int rc = VINF_SUCCESS; … … 1036 1035 1037 1036 Log2(("\nE")); 1038 1039 AssertReturn(pCpu->fConfigured, VERR_EM_INTERNAL_ERROR);1040 1037 1041 1038 STAM_PROFILE_ADV_START(&pVM->hwaccm.s.StatEntry, x); -
trunk/src/VBox/VMM/VMMR0/HWVMXR0.h
r9535 r10502 132 132 * @param pVM The VM to operate on. 133 133 * @param pCtx Guest context 134 * @param pCpu CPU info struct135 134 */ 136 HWACCMR0DECL(int) VMXR0RunGuestCode(PVM pVM, CPUMCTX *pCtx , PHWACCM_CPUINFO pCpu);135 HWACCMR0DECL(int) VMXR0RunGuestCode(PVM pVM, CPUMCTX *pCtx); 137 136 138 137
Note:
See TracChangeset
for help on using the changeset viewer.