Changeset 32885 in vbox
- Timestamp:
- Oct 4, 2010 12:56:35 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 18 edited
-
include/VBox/settings.h (modified) (1 diff)
-
include/VBox/vm.h (modified) (1 diff)
-
include/VBox/vm.mac (modified) (1 diff)
-
include/VBox/vmapi.h (modified) (1 diff)
-
src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp (modified) (1 diff)
-
src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp (modified) (2 diffs)
-
src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp (modified) (3 diffs)
-
src/VBox/Main/ConsoleImpl.cpp (modified) (6 diffs)
-
src/VBox/Main/ConsoleImpl2.cpp (modified) (2 diffs)
-
src/VBox/Main/MachineImpl.cpp (modified) (9 diffs)
-
src/VBox/Main/SessionImpl.cpp (modified) (2 diffs)
-
src/VBox/Main/idl/VirtualBox.xidl (modified) (7 diffs)
-
src/VBox/Main/include/ConsoleImpl.h (modified) (1 diff)
-
src/VBox/Main/include/MachineImpl.h (modified) (4 diffs)
-
src/VBox/Main/include/SessionImpl.h (modified) (1 diff)
-
src/VBox/Main/xml/Settings.cpp (modified) (5 diffs)
-
src/VBox/VMM/VM.cpp (modified) (3 diffs)
-
src/VBox/VMM/VMMR0/GVMMR0.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/settings.h
r32431 r32885 693 693 CpuList llCpus; // requires settings version 1.10 (VirtualBox 3.2) 694 694 bool fHpetEnabled; // requires settings version 1.10 (VirtualBox 3.2) 695 uint32_t ulCpu Priority;// requires settings version 1.11 (VirtualBox 3.3)695 uint32_t ulCpuExecutionCap; // requires settings version 1.11 (VirtualBox 3.3) 696 696 697 697 CpuIdLeafsList llCpuIdLeafs; -
trunk/include/VBox/vm.h
r32796 r32885 713 713 /** Number of virtual CPUs. */ 714 714 uint32_t cCpus; 715 /** CPU priority(1-100) */716 uint32_t uCpu Priority;715 /** CPU excution cap (1-100) */ 716 uint32_t uCpuExecutionCap; 717 717 718 718 /** Size of the VM structure including the VMCPU array. */ -
trunk/include/VBox/vm.mac
r32137 r32885 53 53 .hSelf resd 1 54 54 .cCpus resd 1 55 .uCpu Priorityresd 155 .uCpuExecutionCap resd 1 56 56 .cbSelf resd 1 57 57 .offVMCPU resd 1 -
trunk/include/VBox/vmapi.h
r32190 r32885 409 409 VMMR3DECL(int) VMR3HotUnplugCpu(PVM pVM, VMCPUID idCpu); 410 410 VMMR3DECL(int) VMR3HotPlugCpu(PVM pVM, VMCPUID idCpu); 411 VMMR3DECL(int) VMR3SetCpu Priority(PVM pVM, unsigned ulCpuPriority);411 VMMR3DECL(int) VMR3SetCpuExecutionCap(PVM pVM, unsigned ulExecutionCap); 412 412 /** @} */ 413 413 #endif /* IN_RING3 */ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp
r32718 r32885 142 142 CHECK_ERROR_BREAK(sessionMachine, HotPlugCPU(n)); 143 143 } 144 else if (!strcmp(a->argv[1], "cpuexecutioncap")) 145 { 146 if (a->argc <= 1 + 1) 147 { 148 errorArgument("Missing argument to '%s'. Expected execution cap number.", a->argv[1]); 149 rc = E_FAIL; 150 break; 151 } 152 153 unsigned n = parseNum(a->argv[2], 100, "ExecutionCap"); 154 155 CHECK_ERROR_BREAK(machine, COMSETTER(CPUExecutionCap)(n)); 156 } 144 157 else if (!strcmp(a->argv[1], "poweroff")) 145 158 { -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r32712 r32885 184 184 " [--plugcpu <id>]\n" 185 185 " [--unplugcpu <id>]\n" 186 " [--cpuexecutioncap <1-100>]\n" 186 187 " [--rtcuseutc on|off]\n" 187 188 " [--monitorcount <number>]\n" … … 418 419 " plugcpu <id>\n" 419 420 " unplugcpu <id>\n" 421 " cpuexecutioncap <1-100>\n" 420 422 "\n"); 421 423 } -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r32718 r32885 158 158 MODIFYVM_FAULT_TOLERANCE_PORT, 159 159 MODIFYVM_FAULT_TOLERANCE_PASSWORD, 160 MODIFYVM_FAULT_TOLERANCE_SYNC_INTERVAL 160 MODIFYVM_FAULT_TOLERANCE_SYNC_INTERVAL, 161 MODIFYVM_CPU_EXECTUION_CAP 161 162 }; 162 163 … … 185 186 { "--plugcpu", MODIFYVM_PLUGCPU, RTGETOPT_REQ_UINT32 }, 186 187 { "--unplugcpu", MODIFYVM_UNPLUGCPU, RTGETOPT_REQ_UINT32 }, 188 { "--cpuexecutioncap", MODIFYVM_CPU_EXECTUION_CAP, RTGETOPT_REQ_UINT32 }, 187 189 { "--rtcuseutc", MODIFYVM_RTCUSEUTC, RTGETOPT_REQ_BOOL_ONOFF }, 188 190 { "--monitorcount", MODIFYVM_MONITORCOUNT, RTGETOPT_REQ_UINT32 }, … … 517 519 } 518 520 521 case MODIFYVM_CPU_EXECTUION_CAP: 522 { 523 CHECK_ERROR(machine, COMSETTER(CPUExecutionCap)(ValueUnion.u32)); 524 } 525 519 526 case MODIFYVM_MONITORCOUNT: 520 527 { -
trunk/src/VBox/Main/ConsoleImpl.cpp
r32851 r32885 275 275 kOnMediumChanged, 276 276 kOnCPUChanged, 277 kOnCPU PriorityChanged,277 kOnCPUExecutionCapChanged, 278 278 kOnVRDPServerChanged, 279 279 kOnRemoteDisplayInfoChanged, … … 3354 3354 3355 3355 case VMSTATE_RUNNING_LS: 3356 case VMSTATE_RUNNING_FT: 3356 3357 return setErrorInternal(VBOX_E_INVALID_VM_STATE, 3357 3358 COM_IIDOF(IConsole), 3358 3359 getStaticComponentName(), 3359 Utf8Str(tr("Cannot change drive during live migration")),3360 (enmVMState == VMSTATE_RUNNING_LS) ? Utf8Str(tr("Cannot change drive during live migration")) : Utf8Str(tr("Cannot change drive during fault tolerant syncing")), 3360 3361 false /*aWarning*/, 3361 3362 true /*aLogIt*/); … … 3367 3368 /* Determine the base path for the device instance. */ 3368 3369 PCFGMNODE pCtlInst; 3369 pCtlInst = CFGMR3GetChildF(CFGMR3GetRoot(pVM), "Devices/%s/%u/", pcszDevice, 3370 uInstance); 3370 pCtlInst = CFGMR3GetChildF(CFGMR3GetRoot(pVM), "Devices/%s/%u/", pcszDevice, uInstance); 3371 3371 AssertReturn(pCtlInst, VERR_INTERNAL_ERROR); 3372 3372 … … 3906 3906 3907 3907 /** 3908 * Called by IInternalSessionControl::OnC PUPriorityChange().3908 * Called by IInternalSessionControl::OnCpuExecutionCapChange(). 3909 3909 * 3910 3910 * @note Locks this object for writing. 3911 3911 */ 3912 HRESULT Console::onCPU PriorityChange(ULONG aCpuPriority)3912 HRESULT Console::onCPUExecutionCapChange(ULONG aExecutionCap) 3913 3913 { 3914 3914 LogFlowThisFunc(("\n")); … … 3934 3934 { 3935 3935 /* No need to call in the EMT thread. */ 3936 rc = VMR3SetCpu Priority(mpVM, aCpuPriority);3936 rc = VMR3SetCpuExecutionCap(mpVM, aExecutionCap); 3937 3937 } 3938 3938 else … … 3942 3942 /* notify console callbacks on success */ 3943 3943 if (SUCCEEDED(rc)) 3944 CONSOLE_DO_CALLBACKS1(OnCPU PriorityChanged, aCpuPriority);3944 CONSOLE_DO_CALLBACKS1(OnCPUExecutionCapChanged, aExecutionCap); 3945 3945 3946 3946 LogFlowThisFunc(("Leaving rc=%#x\n", rc)); -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r32851 r32885 551 551 hrc = pMachine->COMGETTER(CPUCount)(&cCpus); H(); 552 552 553 ULONG ulCpu Priority= 100;554 hrc = pMachine->COMGETTER(CPU Priority)(&ulCpuPriority);H();553 ULONG ulCpuExecutionCap = 100; 554 hrc = pMachine->COMGETTER(CPUExecutionCap)(&ulCpuExecutionCap); H(); 555 555 556 556 Bstr osTypeId; … … 587 587 InsertConfigInteger(pRoot, "RamHoleSize", cbRamHole); 588 588 InsertConfigInteger(pRoot, "NumCPUs", cCpus); 589 InsertConfigInteger(pRoot, "Cpu Priority", ulCpuPriority);589 InsertConfigInteger(pRoot, "CpuExecutionCap", ulCpuExecutionCap); 590 590 InsertConfigInteger(pRoot, "TimerMillies", 10); 591 591 #ifdef VBOX_WITH_RAW_MODE -
trunk/src/VBox/Main/MachineImpl.cpp
r32780 r32885 196 196 mIoCacheSize = 5; /* 5MB */ 197 197 198 /* Maximum CPU priorityby default. */199 mCpu Priority= 100;198 /* Maximum CPU execution cap by default. */ 199 mCpuExecutionCap = 100; 200 200 } 201 201 … … 1314 1314 } 1315 1315 1316 STDMETHODIMP Machine::COMGETTER(CPU Priority)(ULONG *aPriority)1317 { 1318 if (!a Priority)1316 STDMETHODIMP Machine::COMGETTER(CPUExecutionCap)(ULONG *aExecutionCap) 1317 { 1318 if (!aExecutionCap) 1319 1319 return E_POINTER; 1320 1320 … … 1324 1324 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 1325 1325 1326 *a Priority = mHWData->mCpuPriority;1327 1328 return S_OK; 1329 } 1330 1331 STDMETHODIMP Machine::COMSETTER(CPU Priority)(ULONG aPriority)1326 *aExecutionCap = mHWData->mCpuExecutionCap; 1327 1328 return S_OK; 1329 } 1330 1331 STDMETHODIMP Machine::COMSETTER(CPUExecutionCap)(ULONG aExecutionCap) 1332 1332 { 1333 1333 HRESULT rc = S_OK; 1334 1334 1335 /* check prioritylimits */1336 if ( a Priority< 11337 || a Priority> 1001335 /* check throttle limits */ 1336 if ( aExecutionCap < 1 1337 || aExecutionCap > 100 1338 1338 ) 1339 1339 return setError(E_INVALIDARG, 1340 tr("Invalid CPU priority: %lu (must be in range [%lu, %lu])"),1341 a Priority, 1, 100);1340 tr("Invalid CPU execution cap value: %lu (must be in range [%lu, %lu])"), 1341 aExecutionCap, 1, 100); 1342 1342 1343 1343 AutoCaller autoCaller(this); … … 1347 1347 1348 1348 alock.release(); 1349 rc = onC PUPriorityChange(aPriority);1349 rc = onCpuExecutionCapChange(aExecutionCap); 1350 1350 alock.acquire(); 1351 1351 if (FAILED(rc)) return rc; … … 1353 1353 setModified(IsModified_MachineData); 1354 1354 mHWData.backup(); 1355 mHWData->mCpu Priority = aPriority;1355 mHWData->mCpuExecutionCap = aExecutionCap; 1356 1356 1357 1357 /* Save settings if online - todo why is this required?? */ … … 7021 7021 mHWData->mCPUCount = data.cCPUs; 7022 7022 mHWData->mCPUHotPlugEnabled = data.fCpuHotPlug; 7023 mHWData->mCpu Priority = data.ulCpuPriority;7023 mHWData->mCpuExecutionCap = data.ulCpuExecutionCap; 7024 7024 7025 7025 // cpu … … 8070 8070 } 8071 8071 8072 data.cCPUs = mHWData->mCPUCount;8073 data.fCpuHotPlug = !!mHWData->mCPUHotPlugEnabled;8074 data.ulCpu Priority = mHWData->mCpuPriority;8072 data.cCPUs = mHWData->mCPUCount; 8073 data.fCpuHotPlug = !!mHWData->mCPUHotPlugEnabled; 8074 data.ulCpuExecutionCap = mHWData->mCpuExecutionCap; 8075 8075 8076 8076 data.llCpus.clear(); … … 10991 10991 } 10992 10992 10993 HRESULT SessionMachine::onCPU PriorityChange(ULONG aCpuPriority)10993 HRESULT SessionMachine::onCPUExecutionCapChange(ULONG aExecutionCap) 10994 10994 { 10995 10995 LogFlowThisFunc(("\n")); … … 11008 11008 return S_OK; 11009 11009 11010 return directControl->OnCPU PriorityChange(aCpuPriority);11010 return directControl->OnCPUExecutionCapChange(aExecutionCap); 11011 11011 } 11012 11012 -
trunk/src/VBox/Main/SessionImpl.cpp
r32727 r32885 596 596 } 597 597 598 STDMETHODIMP Session::OnCPU PriorityChange(ULONG aCpuPriority)598 STDMETHODIMP Session::OnCPUExecutionCapChange(ULONG aExecutionCap) 599 599 { 600 600 LogFlowThisFunc(("\n")); … … 607 607 AssertReturn(mType == SessionType_WriteLock, VBOX_E_INVALID_OBJECT_STATE); 608 608 609 return mConsole->onCPU PriorityChange(aCpuPriority);609 return mConsole->onCPUExecutionCapChange(aExecutionCap); 610 610 } 611 611 -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r32870 r32885 3433 3433 <interface 3434 3434 name="IMachine" extends="$unknown" 3435 uuid=" 917a4c5f-9388-4848-bbeb-5f02bfebf3d6"3435 uuid="5c91359b-5bdb-4518-9bd1-5f2c50a3c129" 3436 3436 wsmap="managed" 3437 3437 > … … 3621 3621 </attribute> 3622 3622 3623 <attribute name="CPU Priority" type="unsigned long">3623 <attribute name="CPUExecutionCap" type="unsigned long"> 3624 3624 <desc> 3625 Priority of the virtual CPUs. Means to limit the number of CPU cycles3626 a guest can use. The unit is percentage of host CPU cycles per second.3627 The valid rangeis 1 - 100. 100 (the default) implies no limit.3625 Means to limit the number of CPU cycles a guest can use. The unit 3626 is percentage of host CPU cycles per second. The valid range 3627 is 1 - 100. 100 (the default) implies no limit. 3628 3628 </desc> 3629 3629 </attribute> … … 12525 12525 <interface 12526 12526 name="IInternalSessionControl" extends="$unknown" 12527 uuid=" ef059f1d-2273-4f81-9342-c152a0d2cd40"12527 uuid="0431ef9e-2c2e-42af-87d7-c8f52455f28a" 12528 12528 internal="yes" 12529 12529 wsmap="suppress" … … 12705 12705 </method> 12706 12706 12707 <method name="onCPU PriorityChange">12708 <desc> 12709 Notification when the CPU prioritychanges.12710 </desc> 12711 <param name=" priority" type="unsigned long" dir="in">12712 <desc>The new CPU priorityvalue. (1-100)</desc>12707 <method name="onCPUExecutionCapChange"> 12708 <desc> 12709 Notification when the CPU execution cap changes. 12710 </desc> 12711 <param name="executionCap" type="unsigned long" dir="in"> 12712 <desc>The new CPU execution cap value. (1-100)</desc> 12713 12713 </param> 12714 12714 </method> … … 13934 13934 <enum 13935 13935 name="VBoxEventType" 13936 uuid=" 2c76667e-6981-4122-a71a-cdfd6a6eb575">13936 uuid="d00980f3-bfcb-4e7d-a20e-08cabf3eb89f"> 13937 13937 13938 13938 <desc> … … 14146 14146 </desc> 14147 14147 </const> 14148 <const name="OnCPU PriorityChanged" value="63">14149 <desc> 14150 See <link to="ICPU PriorityChangedEvent">ICPUPriorityChangedEvent</link>.14148 <const name="OnCPUExecutionCapChanged" value="63"> 14149 <desc> 14150 See <link to="ICPUExecutionCapChangedEvent">ICPUExecutionCapChangedEvent</link>. 14151 14151 </desc> 14152 14152 </const> … … 14889 14889 14890 14890 <interface 14891 name="ICPU PriorityChangedEvent" extends="IEvent"14892 uuid=" 657fe2fe-a75a-4cb6-8cf9-072aa41e7d75"14893 wsmap="managed" autogen="VBoxEvent" id="OnCPU PriorityChanged"14891 name="ICPUExecutionCapChangedEvent" extends="IEvent" 14892 uuid="dfa7e4f5-b4a4-44ce-85a8-127ac5eb59dc" 14893 wsmap="managed" autogen="VBoxEvent" id="OnCPUExecutionCapChanged" 14894 14894 > 14895 14895 <desc> 14896 Notification when the CPU prioritychanges.14896 Notification when the CPU execution cap changes. 14897 14897 </desc> 14898 <attribute name=" priority" type="unsigned long" readonly="yes">14898 <attribute name="executionCap" type="unsigned long" readonly="yes"> 14899 14899 <desc> 14900 The new CPU priorityvalue. (1-100)14900 The new CPU execution cap value. (1-100) 14901 14901 </desc> 14902 14902 </attribute> -
trunk/src/VBox/Main/include/ConsoleImpl.h
r32851 r32885 182 182 HRESULT onMediumChange(IMediumAttachment *aMediumAttachment, BOOL aForce); 183 183 HRESULT onCPUChange(ULONG aCPU, BOOL aRemove); 184 HRESULT onCPU PriorityChange(ULONG aCpuPriority);184 HRESULT onCPUExecutionCapChange(ULONG aExecutionCap); 185 185 HRESULT onVRDPServerChange(BOOL aRestart); 186 186 HRESULT onUSBControllerChange(); -
trunk/src/VBox/Main/include/MachineImpl.h
r32398 r32885 263 263 ULONG mCPUCount; 264 264 BOOL mCPUHotPlugEnabled; 265 ULONG mCpu Priority;265 ULONG mCpuExecutionCap; 266 266 BOOL mAccelerate3DEnabled; 267 267 BOOL mHpetEnabled; … … 385 385 STDMETHOD(COMGETTER(CPUHotPlugEnabled))(BOOL *enabled); 386 386 STDMETHOD(COMSETTER(CPUHotPlugEnabled))(BOOL enabled); 387 STDMETHOD(COMGETTER(CPU Priority))(ULONG *aPriority);388 STDMETHOD(COMSETTER(CPU Priority))(ULONG aPriority);387 STDMETHOD(COMGETTER(CPUExecutionCap))(ULONG *aExecutionCap); 388 STDMETHOD(COMSETTER(CPUExecutionCap))(ULONG aExecutionCap); 389 389 STDMETHOD(COMGETTER(HpetEnabled))(BOOL *enabled); 390 390 STDMETHOD(COMSETTER(HpetEnabled))(BOOL enabled); … … 623 623 virtual HRESULT onStorageControllerChange() { return S_OK; } 624 624 virtual HRESULT onCPUChange(ULONG /* aCPU */, BOOL /* aRemove */) { return S_OK; } 625 virtual HRESULT onCPU PriorityChange(ULONG /* aCpuPriority*/) { return S_OK; }625 virtual HRESULT onCPUExecutionCapChange(ULONG /* aExecutionCap */) { return S_OK; } 626 626 virtual HRESULT onMediumChange(IMediumAttachment * /* mediumAttachment */, BOOL /* force */) { return S_OK; } 627 627 virtual HRESULT onSharedFolderChange() { return S_OK; } … … 958 958 HRESULT onParallelPortChange(IParallelPort *parallelPort); 959 959 HRESULT onCPUChange(ULONG aCPU, BOOL aRemove); 960 HRESULT onCPU PriorityChange(ULONG aCpuPriority);960 HRESULT onCPUExecutionCapChange(ULONG aCpuExecutionCap); 961 961 HRESULT onVRDPServerChange(BOOL aRestart); 962 962 HRESULT onUSBControllerChange(); -
trunk/src/VBox/Main/include/SessionImpl.h
r31698 r32885 90 90 STDMETHOD(OnMediumChange)(IMediumAttachment *aMediumAttachment, BOOL aForce); 91 91 STDMETHOD(OnCPUChange)(ULONG aCPU, BOOL aRemove); 92 STDMETHOD(OnCPU PriorityChange)(ULONG aCpuPriority);92 STDMETHOD(OnCPUExecutionCapChange)(ULONG aExecutionCap); 93 93 STDMETHOD(OnVRDPServerChange)(BOOL aRestart); 94 94 STDMETHOD(OnUSBControllerChange)(); -
trunk/src/VBox/Main/xml/Settings.cpp
r32123 r32885 1540 1540 fCpuHotPlug(false), 1541 1541 fHpetEnabled(false), 1542 ulCpu Priority(100),1542 ulCpuExecutionCap(100), 1543 1543 ulMemorySizeMB((uint32_t)-1), 1544 1544 ulVRAMSizeMB(8), … … 1587 1587 && (cCPUs == h.cCPUs) 1588 1588 && (fCpuHotPlug == h.fCpuHotPlug) 1589 && (ulCpu Priority == h.ulCpuPriority)1589 && (ulCpuExecutionCap == h.ulCpuExecutionCap) 1590 1590 && (fHpetEnabled == h.fHpetEnabled) 1591 1591 && (llCpus == h.llCpus) … … 2249 2249 2250 2250 pelmHwChild->getAttributeValue("hotplug", hw.fCpuHotPlug); 2251 pelmHwChild->getAttributeValue(" priority", hw.ulCpuPriority);2251 pelmHwChild->getAttributeValue("executionCap", hw.ulCpuExecutionCap); 2252 2252 2253 2253 const xml::ElementNode *pelmCPUChild; … … 3194 3194 pelmCPU->createChild("SyntheticCpu")->setAttribute("enabled", hw.fSyntheticCpu); 3195 3195 pelmCPU->setAttribute("count", hw.cCPUs); 3196 if (hw.ulCpu Priority!= 100)3197 pelmCPU->setAttribute(" priority", hw.ulCpuPriority);3196 if (hw.ulCpuExecutionCap != 100) 3197 pelmCPU->setAttribute("executionCap", hw.ulCpuExecutionCap); 3198 3198 3199 3199 if (hw.fLargePages) … … 4232 4232 // VirtualBox 4.0 adds HD audio, CPU priorities, fault tolerance and per-machine media registries 4233 4233 if ( hardwareMachine.audioAdapter.controllerType == AudioControllerType_HDA 4234 || hardwareMachine.ulCpu Priority!= 1004234 || hardwareMachine.ulCpuExecutionCap != 100 4235 4235 || machineUserData.enmFaultToleranceState != FaultToleranceState_Inactive 4236 4236 || machineUserData.uFaultTolerancePort -
trunk/src/VBox/VMM/VM.cpp
r32356 r32885 590 590 AssertRelease(pVM->pSession == pUVM->vm.s.pSession); 591 591 AssertRelease(pVM->cCpus == cCpus); 592 AssertRelease(pVM->uCpu Priority== 100);592 AssertRelease(pVM->uCpuExecutionCap == 100); 593 593 AssertRelease(pVM->offVMCPU == RT_UOFFSETOF(VM, aCpus)); 594 594 … … 653 653 if (RT_SUCCESS(rc)) 654 654 { 655 rc = CFGMR3QueryU32Def(pRoot, "Cpu Priority", &pVM->uCpuPriority, 100);656 AssertLogRelMsgRC(rc, ("Configuration error: Querying \"Cpu Priority\" as integer failed, rc=%Rrc\n", rc));655 rc = CFGMR3QueryU32Def(pRoot, "CpuExecutionCap", &pVM->uCpuExecutionCap, 100); 656 AssertLogRelMsgRC(rc, ("Configuration error: Querying \"CpuExecutionCap\" as integer failed, rc=%Rrc\n", rc)); 657 657 658 658 /* … … 4272 4272 4273 4273 /** 4274 * Changes the V CPU priority.4274 * Changes the VMM execution cap. 4275 4275 * 4276 4276 * @returns VBox status code. 4277 * @param pVM The VM to operate on.4278 * @param ulCpu Priority New CPU priority4279 */ 4280 VMMR3DECL(int) VMR3SetCpu Priority(PVM pVM, unsigned ulCpuPriority)4281 { 4282 AssertReturn(ulCpu Priority > 0 && ulCpuPriority<= 100, VERR_INVALID_PARAMETER);4283 4284 Log(("VMR3SetCpu Priority: new priority = %d\n", ulCpuPriority));4277 * @param pVM The VM to operate on. 4278 * @param ulCpuExecutionCap New CPU execution cap 4279 */ 4280 VMMR3DECL(int) VMR3SetCpuExecutionCap(PVM pVM, unsigned ulCpuExecutionCap) 4281 { 4282 AssertReturn(ulCpuExecutionCap > 0 && ulCpuExecutionCap <= 100, VERR_INVALID_PARAMETER); 4283 4284 Log(("VMR3SetCpuExecutionCap: new priority = %d\n", ulCpuExecutionCap)); 4285 4285 /* Note: not called from EMT. */ 4286 pVM->uCpu Priority = ulCpuPriority;4286 pVM->uCpuExecutionCap = ulCpuExecutionCap; 4287 4287 return VINF_SUCCESS; 4288 4288 } -
trunk/src/VBox/VMM/VMMR0/GVMMR0.cpp
r32815 r32885 800 800 PVM pVM = (PVM)RTR0MemObjAddress(pGVM->gvmm.s.VMMemObj); AssertPtr(pVM); 801 801 memset(pVM, 0, cPages << PAGE_SHIFT); 802 pVM->enmVMState = VMSTATE_CREATING;803 pVM->pVMR0 = pVM;804 pVM->pSession = pSession;805 pVM->hSelf = iHandle;806 pVM->cbSelf = cbVM;807 pVM->cCpus = cCpus;808 pVM->uCpu Priority = 100; /* default is maximum priority. */809 pVM->offVMCPU = RT_UOFFSETOF(VM, aCpus);802 pVM->enmVMState = VMSTATE_CREATING; 803 pVM->pVMR0 = pVM; 804 pVM->pSession = pSession; 805 pVM->hSelf = iHandle; 806 pVM->cbSelf = cbVM; 807 pVM->cCpus = cCpus; 808 pVM->uCpuExecutionCap = 100; /* default is no cap. */ 809 pVM->offVMCPU = RT_UOFFSETOF(VM, aCpus); 810 810 811 811 rc = RTR0MemObjAllocPage(&pGVM->gvmm.s.VMPagesMemObj, cPages * sizeof(SUPPAGE), false /* fExecutable */);
Note:
See TracChangeset
for help on using the changeset viewer.

