Changeset 44346 in vbox
- Timestamp:
- Jan 23, 2013 11:39:39 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 83304
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/tm.h
r37517 r44346 88 88 VMMR3DECL(int) TMR3NotifySuspend(PVM pVM, PVMCPU pVCpu); 89 89 VMMR3DECL(int) TMR3NotifyResume(PVM pVM, PVMCPU pVCpu); 90 VMMR3DECL(int) TMR3SetWarpDrive(P VM pVM, uint32_t u32Percent);91 #endif 92 VMMDECL(uint32_t) TMGetWarpDrive(PVM pVM); 90 VMMR3DECL(int) TMR3SetWarpDrive(PUVM pUVM, uint32_t u32Percent); 91 VMMR3DECL(uint32_t) TMR3GetWarpDrive(PUVM pUVM); 92 #endif 93 93 VMM_INT_DECL(uint32_t) TMCalcHostTimerFrequency(PVM pVM, PVMCPU pVCpu); 94 94 #ifdef IN_RING3 -
trunk/src/VBox/Main/src-client/MachineDebuggerImpl.cpp
r44340 r44346 786 786 hrc = ptrVM.rc(); 787 787 if (SUCCEEDED(hrc)) 788 *a_puPct = TM GetWarpDrive(ptrVM.raw());788 *a_puPct = TMR3GetWarpDrive(ptrVM.rawUVM()); 789 789 } 790 790 … … 816 816 if (SUCCEEDED(hrc)) 817 817 { 818 int vrc = TMR3SetWarpDrive(ptrVM.raw (), a_uPct);818 int vrc = TMR3SetWarpDrive(ptrVM.rawUVM(), a_uPct); 819 819 if (RT_FAILURE(vrc)) 820 820 hrc = setError(VBOX_E_VM_ERROR, tr("TMR3SetWarpDrive(, %u) failed with rc=%Rrc"), a_uPct, vrc); -
trunk/src/VBox/VMM/VMMAll/TMAll.cpp
r41965 r44346 72 72 # define TMTIMER_ASSERT_CRITSECT(pTimer) do { } while (0) 73 73 #endif 74 75 76 /**77 * Gets the current warp drive percent.78 *79 * @returns The warp drive percent.80 * @param pVM Pointer to the VM.81 */82 VMMDECL(uint32_t) TMGetWarpDrive(PVM pVM)83 {84 return pVM->tm.s.u32VirtualWarpDrivePercentage;85 }86 74 87 75 -
trunk/src/VBox/VMM/VMMR3/TM.cpp
r42493 r44346 135 135 #include "TMInternal.h" 136 136 #include <VBox/vmm/vm.h> 137 #include <VBox/vmm/uvm.h> 137 138 138 139 #include <VBox/vmm/pdmdev.h> … … 171 172 static void tmR3TimerQueueRun(PVM pVM, PTMTIMERQUEUE pQueue); 172 173 static void tmR3TimerQueueRunVirtualSync(PVM pVM); 173 static DECLCALLBACK(int) tmR3SetWarpDrive(P VM pVM, uint32_t u32Percent);174 static DECLCALLBACK(int) tmR3SetWarpDrive(PUVM pUVM, uint32_t u32Percent); 174 175 #ifndef VBOX_WITHOUT_NS_ACCOUNTING 175 176 static DECLCALLBACK(void) tmR3CpuLoadTimer(PVM pVM, PTMTIMER pTimer, void *pvUser); … … 2719 2720 * @param u32Percent The new percentage. 100 means normal operation. 2720 2721 */ 2721 VMMDECL(int) TMR3SetWarpDrive(P VM pVM, uint32_t u32Percent)2722 { 2723 return VMR3ReqPriorityCallWait (pVM, VMCPUID_ANY, (PFNRT)tmR3SetWarpDrive, 2, pVM, u32Percent);2722 VMMDECL(int) TMR3SetWarpDrive(PUVM pUVM, uint32_t u32Percent) 2723 { 2724 return VMR3ReqPriorityCallWaitU(pUVM, VMCPUID_ANY, (PFNRT)tmR3SetWarpDrive, 2, pUVM, u32Percent); 2724 2725 } 2725 2726 … … 2729 2730 * 2730 2731 * @returns VBox status code. 2731 * @param p VM Pointer to the VM.2732 * @param pUVM The user mode VM handle. 2732 2733 * @param u32Percent See TMR3SetWarpDrive(). 2733 2734 * @internal 2734 2735 */ 2735 static DECLCALLBACK(int) tmR3SetWarpDrive(PVM pVM, uint32_t u32Percent) 2736 { 2736 static DECLCALLBACK(int) tmR3SetWarpDrive(PUVM pUVM, uint32_t u32Percent) 2737 { 2738 PVM pVM = pUVM->pVM; 2739 VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE); 2737 2740 PVMCPU pVCpu = VMMGetCpu(pVM); 2738 2741 … … 2765 2768 TM_UNLOCK_TIMERS(pVM); 2766 2769 return VINF_SUCCESS; 2770 } 2771 2772 2773 /** 2774 * Gets the current warp drive percent. 2775 * 2776 * @returns The warp drive percent. 2777 * @param pVM Pointer to the VM. 2778 */ 2779 VMMR3DECL(uint32_t) TMR3GetWarpDrive(PUVM pUVM) 2780 { 2781 UVM_ASSERT_VALID_EXT_RETURN(pUVM, UINT32_MAX); 2782 PVM pVM = pUVM->pVM; 2783 VM_ASSERT_VALID_EXT_RETURN(pVM, UINT32_MAX); 2784 return pVM->tm.s.u32VirtualWarpDrivePercentage; 2767 2785 } 2768 2786 -
trunk/src/VBox/VMM/VMMR3/VMReq.cpp
r44340 r44346 465 465 */ 466 466 AssertPtrReturn(pfnFunction, VERR_INVALID_POINTER); 467 AssertPtrReturn(pUVM, VERR_INVALID_POINTER);467 UVM_ASSERT_VALID_EXT_RETURN(pUVM, VERR_INVALID_VM_HANDLE); 468 468 AssertReturn(!(fFlags & ~(VMREQFLAGS_RETURN_MASK | VMREQFLAGS_NO_WAIT | VMREQFLAGS_POKE | VMREQFLAGS_PRIORITY)), VERR_INVALID_PARAMETER); 469 469 if (!(fFlags & VMREQFLAGS_NO_WAIT) || ppReq) -
trunk/src/VBox/VMM/testcase/tstAnimate.cpp
r44340 r44346 861 861 if (u32WarpDrive != 100) 862 862 { 863 rc = TMR3SetWarpDrive(p VM, u32WarpDrive);863 rc = TMR3SetWarpDrive(pUVM, u32WarpDrive); 864 864 if (RT_FAILURE(rc)) 865 865 RTPrintf("warning: TMVirtualSetWarpDrive(,%u) -> %Rrc\n", u32WarpDrive, rc);
Note:
See TracChangeset
for help on using the changeset viewer.