Changeset 45786 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Apr 26, 2013 10:35:59 PM (12 years ago)
- Location:
- trunk/src/VBox/VMM/VMMR0
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMR0.cpp
r45749 r45786 1585 1585 STAM_COUNTER_INC(&pVCpu->hm.s.StatFpu64SwitchBack); 1586 1586 if (pVM->hm.s.vmx.fSupported) 1587 return VMXR0Execute64BitsHandler(pVM, pVCpu, pCtx, pVM->hm.s.pfnSaveGuestFPU64, 0, NULL);1588 return SVMR0Execute64BitsHandler(pVM, pVCpu, pCtx, pVM->hm.s.pfnSaveGuestFPU64, 0, NULL);1587 return VMXR0Execute64BitsHandler(pVM, pVCpu, pCtx, HM64ON32OP_HMRCSaveGuestFPU64, 0, NULL); 1588 return SVMR0Execute64BitsHandler(pVM, pVCpu, pCtx, HM64ON32OP_HMRCSaveGuestFPU64, 0, NULL); 1589 1589 } 1590 1590 … … 1602 1602 STAM_COUNTER_INC(&pVCpu->hm.s.StatDebug64SwitchBack); 1603 1603 if (pVM->hm.s.vmx.fSupported) 1604 return VMXR0Execute64BitsHandler(pVM, pVCpu, pCtx, pVM->hm.s.pfnSaveGuestDebug64, 0, NULL);1605 return SVMR0Execute64BitsHandler(pVM, pVCpu, pCtx, pVM->hm.s.pfnSaveGuestDebug64, 0, NULL);1604 return VMXR0Execute64BitsHandler(pVM, pVCpu, pCtx, HM64ON32OP_HMRCSaveGuestDebug64, 0, NULL); 1605 return SVMR0Execute64BitsHandler(pVM, pVCpu, pCtx, HM64ON32OP_HMRCSaveGuestDebug64, 0, NULL); 1606 1606 } 1607 1607 … … 1622 1622 STAM_PROFILE_ADV_START(&pVCpu->hm.s.StatWorldSwitch3264, z); 1623 1623 if (pVM->hm.s.vmx.fSupported) 1624 rc = VMXR0Execute64BitsHandler(pVM, pVCpu, pCtx, pVM->hm.s.pfnTest64, 5, &aParam[0]);1624 rc = VMXR0Execute64BitsHandler(pVM, pVCpu, pCtx, HM64ON32OP_HMRCTestSwitcher64, 5, &aParam[0]); 1625 1625 else 1626 rc = SVMR0Execute64BitsHandler(pVM, pVCpu, pCtx, pVM->hm.s.pfnTest64, 5, &aParam[0]);1626 rc = SVMR0Execute64BitsHandler(pVM, pVCpu, pCtx, HM64ON32OP_HMRCTestSwitcher64, 5, &aParam[0]); 1627 1627 STAM_PROFILE_ADV_STOP(&pVCpu->hm.s.StatWorldSwitch3264, z); 1628 1628 -
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r45785 r45786 4024 4024 * @param pVCpu Pointer to the VMCPU. 4025 4025 * @param pCtx Pointer to the guest CPU context. 4026 * @param pfnHandler Pointer to the RC handler function.4026 * @param enmOp The operation to perform. 4027 4027 * @param cbParam Number of parameters. 4028 4028 * @param paParam Array of 32-bit parameters. 4029 4029 */ 4030 VMMR0DECL(int) VMXR0Execute64BitsHandler(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, RTRCPTR pfnHandler, uint32_t cbParam,4030 VMMR0DECL(int) VMXR0Execute64BitsHandler(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, HM64ON32OP enmOp, uint32_t cbParam, 4031 4031 uint32_t *paParam) 4032 4032 { … … 4037 4037 4038 4038 AssertReturn(pVM->hm.s.pfnHost32ToGuest64R0, VERR_HM_NO_32_TO_64_SWITCHER); 4039 Assert( pfnHandler);4039 Assert(enmOp > HM64ON32OP_INVALID && enmOp < HM64ON32OP_END); 4040 4040 Assert(pVCpu->hm.s.vmx.VMCSCache.Write.cValidEntries <= RT_ELEMENTS(pVCpu->hm.s.vmx.VMCSCache.Write.aField)); 4041 4041 Assert(pVCpu->hm.s.vmx.VMCSCache.Read.cValidEntries <= RT_ELEMENTS(pVCpu->hm.s.vmx.VMCSCache.Read.aField)); … … 4069 4069 4070 4070 CPUMSetHyperESP(pVCpu, VMMGetStackRC(pVCpu)); 4071 CPUMSetHyperEIP(pVCpu, pfnHandler);4071 CPUMSetHyperEIP(pVCpu, enmOp); 4072 4072 for (int i = (int)cbParam - 1; i >= 0; i--) 4073 4073 CPUMPushHyper(pVCpu, paParam[i]); … … 4117 4117 RTHCPHYS HCPhysCpuPage = 0; 4118 4118 int rc = VERR_INTERNAL_ERROR_5; 4119 AssertReturn(pVM->hm.s.pfnVMXGCStartVM64, VERR_HM_IPE_5); 4119 4120 4120 4121 pCpu = HMR0GetCurrentCpu(); … … 4148 4149 *(uint32_t *)(pVM->hm.s.vmx.pScratch + 16 + 8) = 1; 4149 4150 #endif 4150 rc = VMXR0Execute64BitsHandler(pVM, pVCpu, pCtx, pVM->hm.s.pfnVMXGCStartVM64, 6, &aParam[0]);4151 rc = VMXR0Execute64BitsHandler(pVM, pVCpu, pCtx, HM64ON32OP_VMXRCStartVM64, 6, &aParam[0]); 4151 4152 4152 4153 #ifdef VBOX_WITH_CRASHDUMP_MAGIC -
trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp
r45749 r45786 3122 3122 aParam[3] = (uint32_t)(HCPhysVMCB >> 32); /* Param 2: HCPhysVMCB - Hi. */ 3123 3123 3124 return SVMR0Execute64BitsHandler(pVM, pVCpu, pCtx, pVM->hm.s.pfnSVMGCVMRun64, 4, &aParam[0]);3124 return SVMR0Execute64BitsHandler(pVM, pVCpu, pCtx, HM64ON32OP_SVMRCVMRun64, 4, &aParam[0]); 3125 3125 } 3126 3126 … … 3133 3133 * @param pVCpu Pointer to the VMCPU. 3134 3134 * @param pCtx Pointer to the guest CPU context. 3135 * @param pfnHandler Pointer to the RC handler function.3135 * @param enmOp The operation to perform. 3136 3136 * @param cbParam Number of parameters. 3137 3137 * @param paParam Array of 32-bit parameters. 3138 3138 */ 3139 VMMR0DECL(int) SVMR0Execute64BitsHandler(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, RTRCPTR pfnHandler, uint32_t cbParam,3139 VMMR0DECL(int) SVMR0Execute64BitsHandler(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, HM64ON32OP enmOp, uint32_t cbParam, 3140 3140 uint32_t *paParam) 3141 3141 { … … 3143 3143 RTHCUINTREG uOldEFlags; 3144 3144 3145 Assert(pfnHandler); 3145 AssertReturn(pVM->hm.s.pfnHost32ToGuest64R0, VERR_HM_NO_32_TO_64_SWITCHER); 3146 Assert(enmOp > HM64ON32OP_INVALID && enmOp < HM64ON32OP_END); 3146 3147 3147 3148 /* Disable interrupts. */ … … 3154 3155 3155 3156 CPUMSetHyperESP(pVCpu, VMMGetStackRC(pVCpu)); 3156 CPUMSetHyperEIP(pVCpu, pfnHandler);3157 CPUMSetHyperEIP(pVCpu, enmOp); 3157 3158 for (int i = (int)cbParam - 1; i >= 0; i--) 3158 3159 CPUMPushHyper(pVCpu, paParam[i]); -
trunk/src/VBox/VMM/VMMR0/HWSVMR0.h
r43455 r45786 127 127 128 128 #if HC_ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS) && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL) 129 /** 130 * Prepares for and executes VMRUN (64-bit guests from a 32-bit host). 131 * 132 * @returns VBox status code. 133 * @param pVMCBHostPhys Physical address of host VMCB. 134 * @param pVMCBPhys Physical address of the VMCB. 135 * @param pCtx Pointer to the guest CPU context. 136 * @param pVM Pointer to the VM. 137 * @param pVCpu Pointer to the VMCPU. (not used) 138 */ 139 DECLASM(int) SVMR0VMSwitcherRun64(RTHCPHYS pVMCBHostPhys, RTHCPHYS pVMCBPhys, PCPUMCTX pCtx, PVM pVM, PVMCPU pVCpu); 140 141 /** 142 * Executes the specified handler in 64-bit mode. 143 * 144 * @returns VBox status code. 145 * @param pVM Pointer to the VM. 146 * @param pVCpu Pointer to the VMCPU. 147 * @param pCtx Pointer to the guest CPU context. 148 * @param pfnHandler Pointer to the RC handler function. 149 * @param cbParam Number of parameters. 150 * @param paParam Array of 32-bit parameters. 151 */ 152 VMMR0DECL(int) SVMR0Execute64BitsHandler(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, RTRCPTR pfnHandler, uint32_t cbParam, 129 DECLASM(int) SVMR0VMSwitcherRun64(RTHCPHYS pVMCBHostPhys, RTHCPHYS pVMCBPhys, PCPUMCTX pCtx, PVM pVM, PVMCPU pVCpu); 130 VMMR0DECL(int) SVMR0Execute64BitsHandler(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, HM64ON32OP enmOp, uint32_t cbParam, 153 131 uint32_t *paParam); 154 132 #endif /* HC_ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS) && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL) */ -
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r45749 r45786 5478 5478 *(uint32_t *)(pVM->hm.s.vmx.pScratch + 16 + 8) = 1; 5479 5479 #endif 5480 rc = VMXR0Execute64BitsHandler(pVM, pVCpu, pCtx, pVM->hm.s.pfnVMXGCStartVM64, 6, &aParam[0]);5480 rc = VMXR0Execute64BitsHandler(pVM, pVCpu, pCtx, HM64ON32OP_VMXRCStartVM64, 6, &aParam[0]); 5481 5481 5482 5482 #ifdef VBOX_WITH_CRASHDUMP_MAGIC … … 5610 5610 * @param pVCpu Pointer to the VMCPU. 5611 5611 * @param pCtx Pointer to the guest CPU context. 5612 * @param pfnHandler Pointer to the RC handler function.5612 * @param enmOp The operation to perform. 5613 5613 * @param cbParam Number of parameters. 5614 5614 * @param paParam Array of 32-bit parameters. 5615 5615 */ 5616 VMMR0DECL(int) VMXR0Execute64BitsHandler(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, RTRCPTR pfnHandler, uint32_t cbParam,5616 VMMR0DECL(int) VMXR0Execute64BitsHandler(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, HM64ON32OP enmOp, uint32_t cbParam, 5617 5617 uint32_t *paParam) 5618 5618 { … … 5623 5623 5624 5624 AssertReturn(pVM->hm.s.pfnHost32ToGuest64R0, VERR_HM_NO_32_TO_64_SWITCHER); 5625 Assert( pfnHandler);5625 Assert(enmOp > HM64ON32OP_INVALID && enmOp < HM64ON32OP_END); 5626 5626 Assert(pVCpu->hm.s.vmx.VMCSCache.Write.cValidEntries <= RT_ELEMENTS(pVCpu->hm.s.vmx.VMCSCache.Write.aField)); 5627 5627 Assert(pVCpu->hm.s.vmx.VMCSCache.Read.cValidEntries <= RT_ELEMENTS(pVCpu->hm.s.vmx.VMCSCache.Read.aField)); … … 5655 5655 5656 5656 CPUMSetHyperESP(pVCpu, VMMGetStackRC(pVCpu)); 5657 CPUMSetHyperEIP(pVCpu, pfnHandler);5657 CPUMSetHyperEIP(pVCpu, enmOp); 5658 5658 for (int i=(int)cbParam-1;i>=0;i--) 5659 5659 CPUMPushHyper(pVCpu, paParam[i]); -
trunk/src/VBox/VMM/VMMR0/HWVMXR0.h
r45681 r45786 46 46 # if HC_ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS) && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL) 47 47 DECLASM(int) VMXR0SwitcherStartVM64(RTHCUINT fResume, PCPUMCTX pCtx, PVMCSCACHE pCache, PVM pVM, PVMCPU pVCpu); 48 VMMR0DECL(int) VMXR0Execute64BitsHandler(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, RTRCPTR pfnHandler, uint32_t cbParam,48 VMMR0DECL(int) VMXR0Execute64BitsHandler(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, HM64ON32OP enmOp, uint32_t cbParam, 49 49 uint32_t *paParam); 50 50 # endif
Note:
See TracChangeset
for help on using the changeset viewer.