- Timestamp:
- May 5, 2009 2:56:15 PM (16 years ago)
- Location:
- trunk/src/VBox/VMM/VMMR0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/GVMMR0.cpp
r19381 r19382 1054 1054 } 1055 1055 1056 /** 1057 * Register a new VCPU EMT thread (VCPU 0 is automatically registered during VM creation) 1058 * 1059 * @returns VBox status code 1060 * @param pVM The shared VM structure (the ring-0 mapping). 1061 * @param idCpu VCPU id 1062 */ 1063 GVMMR0DECL(int) GVMMR0RegisterVCpu(PVM pVM, unsigned idCpu) 1064 { 1065 AssertReturn(idCpu < pVM->cCPUs, VERR_INVALID_CPU_ID); 1066 1067 /* 1068 * Validate the VM structure, state and handle. 1069 */ 1070 PGVMM pGVMM; 1071 PGVM pGVM; 1072 PGVMCPU pCurGVCpu; 1073 1074 int rc = gvmmR0ByVMAndEMT(pVM, idCpu, &pGVM, &pGVMM); 1075 if (RT_FAILURE(rc)) 1076 return rc; 1077 1078 AssertReturn(!pGVM->aCpus[idCpu].hEMT, VERR_ACCESS_DENIED); 1079 1080 pGVM->aCpus[idCpu].hEMT = RTThreadNativeSelf(); 1081 return VINF_SUCCESS; 1082 } 1056 1083 1057 1084 /** -
trunk/src/VBox/VMM/VMMR0/VMMR0.cpp
r19381 r19382 743 743 return GVMMR0DestroyVM(pVM); 744 744 745 case VMMR0_DO_GVMM_REGISTER_VMCPU: 746 if (!pVM) 747 return VERR_INVALID_PARAMETER; 748 return GVMMR0RegisterVCpu(pVM, idCpu); 749 745 750 case VMMR0_DO_GVMM_SCHED_HALT: 746 751 if (pReqHdr)
Note:
See TracChangeset
for help on using the changeset viewer.