Changeset 31326 in vbox
- Timestamp:
- Aug 3, 2010 9:56:22 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
-
include/VBox/vm.h (modified) (2 diffs)
-
include/VBox/vm.mac (modified) (1 diff)
-
include/VBox/vmapi.h (modified) (1 diff)
-
src/VBox/Main/ConsoleImpl2.cpp (modified) (2 diffs)
-
src/VBox/VMM/VM.cpp (modified) (5 diffs)
-
src/VBox/VMM/VMMR0/GVMMR0.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vm.h
r31123 r31326 705 705 /** Number of virtual CPUs. */ 706 706 uint32_t cCpus; 707 /** CPU priority (1-100) */ 708 uint32_t uCpuPriority; 707 709 708 710 /** Size of the VM structure including the VMCPU array. */ … … 713 715 714 716 /** Reserved; alignment. */ 715 uint32_t u32Reserved[ 6];717 uint32_t u32Reserved[5]; 716 718 717 719 /** @name Public VMM Switcher APIs -
trunk/include/VBox/vm.mac
r28800 r31326 53 53 .hSelf resd 1 54 54 .cCpus resd 1 55 .uCpuPriority resd 1 55 56 .cbSelf resd 1 56 57 .offVMCPU resd 1 57 .u32Reserved resd 658 .u32Reserved resd 5 58 59 59 60 .pfnVMMGCGuestToHostAsmGuestCtx RTRCPTR_RES 1 -
trunk/include/VBox/vmapi.h
r28800 r31326 406 406 VMMR3DECL(int) VMR3HotUnplugCpu(PVM pVM, VMCPUID idCpu); 407 407 VMMR3DECL(int) VMR3HotPlugCpu(PVM pVM, VMCPUID idCpu); 408 408 VMMR3DECL(int) VMR3SetCpuPriority(PVM pVM, unsigned ulCpuPriority); 409 409 /** @} */ 410 410 #endif /* IN_RING3 */ -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r31287 r31326 534 534 hrc = pMachine->COMGETTER(CPUCount)(&cCpus); H(); 535 535 536 ULONG ulCpuPriority = 100; 537 hrc = pMachine->COMGETTER(CPUPriority)(&ulCpuPriority); H(); 538 536 539 Bstr osTypeId; 537 540 hrc = pMachine->COMGETTER(OSTypeId)(osTypeId.asOutParam()); H(); … … 567 570 InsertConfigInteger(pRoot, "RamHoleSize", cbRamHole); 568 571 InsertConfigInteger(pRoot, "NumCPUs", cCpus); 572 InsertConfigInteger(pRoot, "CpuPriority", ulCpuPriority); 569 573 InsertConfigInteger(pRoot, "TimerMillies", 10); 570 574 #ifdef VBOX_WITH_RAW_MODE -
trunk/src/VBox/VMM/VM.cpp
r30473 r31326 561 561 AssertRelease(pVM->pSession == pUVM->vm.s.pSession); 562 562 AssertRelease(pVM->cCpus == cCpus); 563 AssertRelease(pVM->uCpuPriority == 100); 563 564 AssertRelease(pVM->offVMCPU == RT_UOFFSETOF(VM, aCpus)); 564 565 … … 589 590 if (RT_SUCCESS(rc)) 590 591 { 591 rc = CFGMR3QueryBoolDef(CFGMR3GetRoot(pVM), "HwVirtExtForced", &pVM->fHwVirtExtForced, false); 592 PCFGMNODE pRoot = CFGMR3GetRoot(pVM); 593 rc = CFGMR3QueryBoolDef(pRoot, "HwVirtExtForced", &pVM->fHwVirtExtForced, false); 592 594 if (RT_SUCCESS(rc) && pVM->fHwVirtExtForced) 593 595 pVM->fHWACCMEnabled = true; … … 599 601 if (psz && !strcmp(psz, "fake")) 600 602 { 601 CFGMR3RemoveValue( CFGMR3GetRoot(pVM), "RawR3Enabled");602 CFGMR3InsertInteger( CFGMR3GetRoot(pVM), "RawR3Enabled", 0);603 CFGMR3RemoveValue( CFGMR3GetRoot(pVM), "RawR0Enabled");604 CFGMR3InsertInteger( CFGMR3GetRoot(pVM), "RawR0Enabled", 0);603 CFGMR3RemoveValue(pRoot, "RawR3Enabled"); 604 CFGMR3InsertInteger(pRoot, "RawR3Enabled", 0); 605 CFGMR3RemoveValue(pRoot, "RawR0Enabled"); 606 CFGMR3InsertInteger(pRoot, "RawR0Enabled", 0); 605 607 } 606 608 … … 611 613 { 612 614 uint32_t cCPUsCfg; 613 rc = CFGMR3QueryU32Def( CFGMR3GetRoot(pVM), "NumCPUs", &cCPUsCfg, 1);615 rc = CFGMR3QueryU32Def(pRoot, "NumCPUs", &cCPUsCfg, 1); 614 616 AssertLogRelMsgRC(rc, ("Configuration error: Querying \"NumCPUs\" as integer failed, rc=%Rrc\n", rc)); 615 617 if (RT_SUCCESS(rc) && cCPUsCfg != cCpus) … … 622 624 if (RT_SUCCESS(rc)) 623 625 { 626 rc = CFGMR3QueryU32Def(pRoot, "CpuPriority", &pVM->uCpuPriority, 100); 627 AssertLogRelMsgRC(rc, ("Configuration error: Querying \"CpuPriority\" as integer failed, rc=%Rrc\n", rc)); 628 624 629 /* 625 630 * Init the ring-3 components and ring-3 per cpu data, finishing it off -
trunk/src/VBox/VMM/VMMR0/GVMMR0.cpp
r30334 r31326 588 588 pGVM->hSelf = iHandle; 589 589 pGVM->pVM = NULL; 590 pGVM->cCpus = cCpus; 590 pGVM->cCpus = cCpus; 591 591 592 592 gvmmR0InitPerVMData(pGVM); … … 607 607 PVM pVM = (PVM)RTR0MemObjAddress(pGVM->gvmm.s.VMMemObj); AssertPtr(pVM); 608 608 memset(pVM, 0, cPages << PAGE_SHIFT); 609 pVM->enmVMState = VMSTATE_CREATING; 610 pVM->pVMR0 = pVM; 611 pVM->pSession = pSession; 612 pVM->hSelf = iHandle; 613 pVM->cbSelf = cbVM; 614 pVM->cCpus = cCpus; 615 pVM->offVMCPU = RT_UOFFSETOF(VM, aCpus); 609 pVM->enmVMState = VMSTATE_CREATING; 610 pVM->pVMR0 = pVM; 611 pVM->pSession = pSession; 612 pVM->hSelf = iHandle; 613 pVM->cbSelf = cbVM; 614 pVM->cCpus = cCpus; 615 pVM->uCpuPriority = 100; /* default is maximum priority. */ 616 pVM->offVMCPU = RT_UOFFSETOF(VM, aCpus); 616 617 617 618 rc = RTR0MemObjAllocPage(&pGVM->gvmm.s.VMPagesMemObj, cPages * sizeof(SUPPAGE), false /* fExecutable */);
Note:
See TracChangeset
for help on using the changeset viewer.

