Changeset 107893 in vbox for trunk/src/VBox/VMM/VMMR3
- Timestamp:
- Jan 22, 2025 3:31:45 PM (3 months ago)
- svn:sync-xref-src-repo-rev:
- 167114
- Location:
- trunk/src/VBox/VMM/VMMR3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/GVMMR3.cpp
r106061 r107893 46 46 * @returns VBox status code. 47 47 * @param pUVM The user mode VM handle. 48 * @param enmTarget The target platform architecture of the VM. 48 49 * @param cCpus The number of CPUs to create the VM for. 49 50 * @param pSession The support driver session handle. … … 52 53 * for use in VMMR0 calls. 53 54 */ 54 VMMR3_INT_DECL(int) GVMMR3CreateVM(PUVM pUVM, uint32_t cCpus, PSUPDRVSESSION pSession, PVM *ppVM, PRTR0PTR ppVMR0) 55 VMMR3_INT_DECL(int) GVMMR3CreateVM(PUVM pUVM, VMTARGET enmTarget, uint32_t cCpus, PSUPDRVSESSION pSession, 56 PVM *ppVM, PRTR0PTR ppVMR0) 55 57 { 56 58 AssertReturn(cCpus >= VMM_MIN_CPU_COUNT && cCpus <= VMM_MAX_CPU_COUNT, VERR_INVALID_PARAMETER); 59 AssertReturn(enmTarget == VMTARGET_X86 || enmTarget == VMTARGET_ARMV8, VERR_INVALID_PARAMETER); 57 60 AssertCompile((sizeof(VM) & HOST_PAGE_OFFSET_MASK) == 0); 58 61 AssertCompile((sizeof(VMCPU) & HOST_PAGE_OFFSET_MASK) == 0); … … 65 68 CreateVMReq.Hdr.cbReq = sizeof(CreateVMReq); 66 69 CreateVMReq.pSession = pSession; 70 CreateVMReq.enmTarget = enmTarget; 71 CreateVMReq.cCpus = cCpus; 72 CreateVMReq.cbVM = sizeof(VM); 73 CreateVMReq.cbVCpu = sizeof(VMCPU); 74 CreateVMReq.uStructVersion = 1; 75 CreateVMReq.uSvnRevision = VMMGetSvnRev(); 67 76 CreateVMReq.pVMR0 = NIL_RTR0PTR; 68 77 CreateVMReq.pVMR3 = NULL; 69 CreateVMReq.cCpus = cCpus;70 78 rc = SUPR3CallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, VMMR0_DO_GVMM_CREATE_VM, 0, &CreateVMReq.Hdr); 71 79 if (RT_SUCCESS(rc)) … … 73 81 *ppVM = CreateVMReq.pVMR3; 74 82 *ppVMR0 = CreateVMReq.pVMR0; 83 Assert(CreateVMReq.pVMR3->enmTarget == enmTarget); 75 84 } 76 85 } … … 101 110 pVM->cbVCpu = sizeof(VMCPU); 102 111 pVM->uStructVersion = 1; 112 pVM->enmTarget = enmTarget; 103 113 104 114 /* CPUs: */ -
trunk/src/VBox/VMM/VMMR3/VM.cpp
r107661 r107893 598 598 */ 599 599 RTR0PTR pVMR0; 600 int rc = GVMMR3CreateVM(pUVM, cCpus, pUVM->vm.s.pSession, &pUVM->pVM, &pVMR0);600 int rc = GVMMR3CreateVM(pUVM, VMTARGET_DEFAULT, cCpus, pUVM->vm.s.pSession, &pUVM->pVM, &pVMR0); 601 601 if (RT_SUCCESS(rc)) 602 602 { … … 607 607 AssertRelease(pVM->cCpus == cCpus); 608 608 AssertRelease(pVM->uCpuExecutionCap == 100); 609 AssertRelease(pVM->enmTarget == VMTARGET_DEFAULT); 609 610 AssertCompileMemberAlignment(VM, cpum, 64); 610 611 AssertCompileMemberAlignment(VM, tm, 64);
Note:
See TracChangeset
for help on using the changeset viewer.