Changeset 19257 in vbox
- Timestamp:
- Apr 29, 2009 11:51:55 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/sup.h
r19255 r19257 447 447 * @returns error code specific to uFunction. 448 448 * @param pVMR0 Pointer to the Ring-0 (Host Context) mapping of the VM structure. 449 * @param idCpu VMCPU id. 449 450 * @param uOperation Operation to execute. 450 451 * @param pvArg Argument. 451 452 */ 452 SUPR3DECL(int) SUPCallVMMR0(PVMR0 pVMR0, unsigned uOperation, void *pvArg);453 SUPR3DECL(int) SUPCallVMMR0(PVMR0 pVMR0, unsigned idCpu, unsigned uOperation, void *pvArg); 453 454 454 455 /** … … 459 460 * @param pVMR0 The ring-0 VM handle. 460 461 * @param uOperation The operation; only the SUP_VMMR0_DO_* ones are valid. 461 * @param idC PUVMCPU id.462 */ 463 SUPR3DECL(int) SUPCallVMMR0Fast(PVMR0 pVMR0, unsigned uOperation, unsigned idC PU);462 * @param idCpu VMCPU id. 463 */ 464 SUPR3DECL(int) SUPCallVMMR0Fast(PVMR0 pVMR0, unsigned uOperation, unsigned idCpu); 464 465 465 466 /** … … 472 473 * @returns error code specific to uFunction. 473 474 * @param pVMR0 Pointer to the Ring-0 (Host Context) mapping of the VM structure. 475 * @param idCpu VMCPU id. 474 476 * @param uOperation Operation to execute. 475 477 * @param u64Arg Constant argument. … … 478 480 * limit on this, just below 4KB. 479 481 */ 480 SUPR3DECL(int) SUPCallVMMR0Ex(PVMR0 pVMR0, unsigned uOperation, uint64_t u64Arg, PSUPVMMR0REQHDR pReqHdr);482 SUPR3DECL(int) SUPCallVMMR0Ex(PVMR0 pVMR0, unsigned idCpu, unsigned uOperation, uint64_t u64Arg, PSUPVMMR0REQHDR pReqHdr); 481 483 482 484 /** -
trunk/include/VBox/vmm.h
r18927 r19257 296 296 VMMR0DECL(int) VMMR0EntryInt(PVM pVM, VMMR0OPERATION enmOperation, void *pvArg); 297 297 VMMR0DECL(void) VMMR0EntryFast(PVM pVM, unsigned idCpu, VMMR0OPERATION enmOperation); 298 VMMR0DECL(int) VMMR0EntryEx(PVM pVM, VMMR0OPERATION enmOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION);298 VMMR0DECL(int) VMMR0EntryEx(PVM pVM, unsigned idCpu, VMMR0OPERATION enmOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION); 299 299 VMMR0DECL(int) VMMR0TermVM(PVM pVM, PGVM pGVM); 300 300 VMMR0DECL(int) VMMR0CallHost(PVM pVM, VMMCALLHOST enmOperation, uint64_t uArg); -
trunk/src/VBox/Devices/Network/testcase/tstIntNet-1.cpp
r19255 r19257 312 312 SendReq.pSession = pSession; 313 313 SendReq.hIf = hIf; 314 rc = SUPCallVMMR0Ex(NIL_RTR0PTR, VMMR0_DO_INTNET_IF_SEND, 0, &SendReq.Hdr);314 rc = SUPCallVMMR0Ex(NIL_RTR0PTR, 0 /* VPCU 0 */, VMMR0_DO_INTNET_IF_SEND, 0, &SendReq.Hdr); 315 315 if (RT_FAILURE(rc)) 316 316 { … … 542 542 WaitReq.hIf = hIf; 543 543 WaitReq.cMillies = cMillies - (uint32_t)cElapsedMillies; 544 int rc = SUPCallVMMR0Ex(NIL_RTR0PTR, VMMR0_DO_INTNET_IF_WAIT, 0, &WaitReq.Hdr);544 int rc = SUPCallVMMR0Ex(NIL_RTR0PTR, 0 /* VPCU 0 */, VMMR0_DO_INTNET_IF_WAIT, 0, &WaitReq.Hdr); 545 545 if (rc == VERR_TIMEOUT) 546 546 break; … … 882 882 OpenReq.szNetwork, OpenReq.szTrunk); 883 883 RTStrmFlush(g_pStdOut); 884 rc = SUPCallVMMR0Ex(NIL_RTR0PTR, VMMR0_DO_INTNET_OPEN, 0, &OpenReq.Hdr);884 rc = SUPCallVMMR0Ex(NIL_RTR0PTR, 0 /* VPCU 0 */, VMMR0_DO_INTNET_OPEN, 0, &OpenReq.Hdr); 885 885 if (RT_SUCCESS(rc)) 886 886 { … … 898 898 GetRing3BufferReq.hIf = OpenReq.hIf; 899 899 GetRing3BufferReq.pRing3Buf = NULL; 900 rc = SUPCallVMMR0Ex(NIL_RTR0PTR, VMMR0_DO_INTNET_IF_GET_RING3_BUFFER, 0, &GetRing3BufferReq.Hdr);900 rc = SUPCallVMMR0Ex(NIL_RTR0PTR, 0 /* VPCU 0 */, VMMR0_DO_INTNET_IF_GET_RING3_BUFFER, 0, &GetRing3BufferReq.Hdr); 901 901 if (RT_SUCCESS(rc)) 902 902 { … … 913 913 PromiscReq.hIf = OpenReq.hIf; 914 914 PromiscReq.fPromiscuous = true; 915 rc = SUPCallVMMR0Ex(NIL_RTR0PTR, VMMR0_DO_INTNET_IF_SET_PROMISCUOUS_MODE, 0, &PromiscReq.Hdr);915 rc = SUPCallVMMR0Ex(NIL_RTR0PTR, 0 /* VPCU 0 */, VMMR0_DO_INTNET_IF_SET_PROMISCUOUS_MODE, 0, &PromiscReq.Hdr); 916 916 if (RT_SUCCESS(rc)) 917 917 RTPrintf("tstIntNet-1: interface in promiscuous mode\n"); … … 928 928 ActiveReq.hIf = OpenReq.hIf; 929 929 ActiveReq.fActive = true; 930 rc = SUPCallVMMR0Ex(NIL_RTR0PTR, VMMR0_DO_INTNET_IF_SET_ACTIVE, 0, &ActiveReq.Hdr);930 rc = SUPCallVMMR0Ex(NIL_RTR0PTR, 0 /* VPCU 0 */, VMMR0_DO_INTNET_IF_SET_ACTIVE, 0, &ActiveReq.Hdr); 931 931 if (RT_SUCCESS(rc)) 932 932 { -
trunk/src/VBox/HostDrivers/Support/SUPDrv.c
r19255 r19257 149 149 150 150 #ifdef RT_WITH_W64_UNWIND_HACK 151 DECLASM(int) supdrvNtWrapVMMR0EntryEx(PFNRT pfnVMMR0EntryEx, PVM pVM, unsigned uOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION pSession);151 DECLASM(int) supdrvNtWrapVMMR0EntryEx(PFNRT pfnVMMR0EntryEx, PVM pVM, unsigned idCpu, unsigned uOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION pSession); 152 152 DECLASM(int) supdrvNtWrapVMMR0EntryFast(PFNRT pfnVMMR0EntryFast, PVM pVM, unsigned idCpu, unsigned uOperation); 153 153 DECLASM(void) supdrvNtWrapObjDestructor(PFNRT pfnDestruction, void *pvObj, void *pvUser1, void *pvUser2); … … 1328 1328 if (RT_LIKELY(pDevExt->pfnVMMR0EntryEx)) 1329 1329 #ifdef RT_WITH_W64_UNWIND_HACK 1330 pReq->Hdr.rc = supdrvNtWrapVMMR0EntryEx((PFNRT)pDevExt->pfnVMMR0EntryEx, pReq->u.In.pVMR0, pReq->u.In. uOperation, NULL, pReq->u.In.u64Arg, pSession);1330 pReq->Hdr.rc = supdrvNtWrapVMMR0EntryEx((PFNRT)pDevExt->pfnVMMR0EntryEx, pReq->u.In.pVMR0, pReq->u.In.idCpu, pReq->u.In.uOperation, NULL, pReq->u.In.u64Arg, pSession); 1331 1331 #else 1332 pReq->Hdr.rc = pDevExt->pfnVMMR0EntryEx(pReq->u.In.pVMR0, pReq->u.In. uOperation, NULL, pReq->u.In.u64Arg, pSession);1332 pReq->Hdr.rc = pDevExt->pfnVMMR0EntryEx(pReq->u.In.pVMR0, pReq->u.In.idCpu, pReq->u.In.uOperation, NULL, pReq->u.In.u64Arg, pSession); 1333 1333 #endif 1334 1334 else … … 1346 1346 if (RT_LIKELY(pDevExt->pfnVMMR0EntryEx)) 1347 1347 #ifdef RT_WITH_W64_UNWIND_HACK 1348 pReq->Hdr.rc = supdrvNtWrapVMMR0EntryEx((PFNRT)pDevExt->pfnVMMR0EntryEx, pReq->u.In.pVMR0, pReq->u.In. uOperation, pVMMReq, pReq->u.In.u64Arg, pSession);1348 pReq->Hdr.rc = supdrvNtWrapVMMR0EntryEx((PFNRT)pDevExt->pfnVMMR0EntryEx, pReq->u.In.pVMR0, pReq->u.In.idCpu, pReq->u.In.uOperation, pVMMReq, pReq->u.In.u64Arg, pSession); 1349 1349 #else 1350 pReq->Hdr.rc = pDevExt->pfnVMMR0EntryEx(pReq->u.In.pVMR0, pReq->u.In. uOperation, pVMMReq, pReq->u.In.u64Arg, pSession);1350 pReq->Hdr.rc = pDevExt->pfnVMMR0EntryEx(pReq->u.In.pVMR0, pReq->u.In.idCpu, pReq->u.In.uOperation, pVMMReq, pReq->u.In.u64Arg, pSession); 1351 1351 #endif 1352 1352 else -
trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h
r19255 r19257 188 188 * and renaming the related IOCtls too. 189 189 */ 190 #define SUPDRV_IOC_VERSION 0x000 a0009190 #define SUPDRV_IOC_VERSION 0x000b0000 191 191 192 192 /** SUP_IOCTL_COOKIE. */ … … 527 527 /** The VM handle. */ 528 528 PVMR0 pVMR0; 529 /** VCPU id. */ 530 uint32_t idCpu; 529 531 /** Which operation to execute. */ 530 532 uint32_t uOperation; 531 #if R0_ARCH_BITS == 64532 /** Alignment. */533 uint32_t u32Reserved;534 #endif535 533 /** Argument to use when no request packet is supplied. */ 536 534 uint64_t u64Arg; -
trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h
r19255 r19257 570 570 DECLR0CALLBACKMEMBER(void, pfnVMMR0EntryFast, (PVM pVM, unsigned idCpu, unsigned uOperation)); 571 571 /** VMMR0EntryEx() pointer. */ 572 DECLR0CALLBACKMEMBER(int, pfnVMMR0EntryEx, (PVM pVM, unsigned uOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION pSession));572 DECLR0CALLBACKMEMBER(int, pfnVMMR0EntryEx, (PVM pVM, unsigned idCpu, unsigned uOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION pSession)); 573 573 574 574 /** Linked list of loaded code. */ -
trunk/src/VBox/HostDrivers/Support/SUPLib.cpp
r19255 r19257 582 582 583 583 584 SUPR3DECL(int) SUPCallVMMR0Ex(PVMR0 pVMR0, unsigned uOperation, uint64_t u64Arg, PSUPVMMR0REQHDR pReqHdr)584 SUPR3DECL(int) SUPCallVMMR0Ex(PVMR0 pVMR0, unsigned idCpu, unsigned uOperation, uint64_t u64Arg, PSUPVMMR0REQHDR pReqHdr) 585 585 { 586 586 /* … … 609 609 Req.Hdr.rc = VERR_INTERNAL_ERROR; 610 610 Req.u.In.pVMR0 = pVMR0; 611 Req.u.In.idCpu = idCpu; 611 612 Req.u.In.uOperation = uOperation; 612 613 Req.u.In.u64Arg = u64Arg; … … 629 630 pReq->Hdr.rc = VERR_INTERNAL_ERROR; 630 631 pReq->u.In.pVMR0 = pVMR0; 632 pReq->u.In.idCpu = idCpu; 631 633 pReq->u.In.uOperation = uOperation; 632 634 pReq->u.In.u64Arg = u64Arg; … … 643 645 644 646 645 SUPR3DECL(int) SUPCallVMMR0(PVMR0 pVMR0, unsigned uOperation, void *pvArg)647 SUPR3DECL(int) SUPCallVMMR0(PVMR0 pVMR0, unsigned idCpu, unsigned uOperation, void *pvArg) 646 648 { 647 649 /* … … 653 655 ("%#x\n", uOperation), 654 656 VERR_INTERNAL_ERROR); 655 return SUPCallVMMR0Ex(pVMR0, uOperation, (uintptr_t)pvArg, NULL);657 return SUPCallVMMR0Ex(pVMR0, idCpu, uOperation, (uintptr_t)pvArg, NULL); 656 658 } 657 659 -
trunk/src/VBox/HostDrivers/Support/testcase/tstInt.cpp
r19255 r19257 124 124 for (i = cIterations; i > 0; i--) 125 125 { 126 rc = SUPCallVMMR0(pVMR0, VMMR0_DO_SLOW_NOP, NULL);126 rc = SUPCallVMMR0(pVMR0, 0, VMMR0_DO_SLOW_NOP, NULL); 127 127 if (rc != VINF_SUCCESS) 128 128 { … … 174 174 { 175 175 uint64_t OneStartTick = ASMReadTSC(); 176 rc = SUPCallVMMR0Ex(pVMR0, VMMR0_DO_SLOW_NOP, 0, NULL);176 rc = SUPCallVMMR0Ex(pVMR0, 0, VMMR0_DO_SLOW_NOP, 0, NULL); 177 177 uint64_t Ticks = ASMReadTSC() - OneStartTick; 178 178 if (Ticks < MinTicks) -
trunk/src/VBox/HostDrivers/Support/win/SUPDrvA-win.asm
r19255 r19257 170 170 171 171 ;; 172 ; @cproto DECLASM(int) supdrvNtWrapVMMR0EntryEx(PFNRT pfnVMMR0EntryEx, PVM pVM, unsigned uOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION pSession);172 ; @cproto DECLASM(int) supdrvNtWrapVMMR0EntryEx(PFNRT pfnVMMR0EntryEx, PVM pVM, unsigned idCpu, unsigned uOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION pSession); 173 173 ; 174 174 ; @param pfnVMMR0EntryEx rcx 175 175 ; @param pVM rdx 176 ; @param uOperation r8 177 ; @param pReq r9 178 ; @param u64Arg [rsp + 28h] / [rbp + 30h] 179 ; @param pSession [rsp + 30h] / [rbp + 38h] 176 ; @param idCpu r8 177 ; @param uOperation r9 178 ; @param pReq [rsp + 28h] / [rbp + 30h] 179 ; @param u64Arg [rsp + 30h] / [rbp + 38h] 180 ; @param pSession [rsp + 38h] / [rbp + 40h] 180 181 ; 181 182 BEGINPROC supdrvNtWrapVMMR0EntryEx … … 190 191 mov r11, [rbp + 38h] 191 192 mov [rsp + 20h], r11 193 mov r11, [rbp + 40h] 194 mov [rsp + 28h], r11 192 195 call rax 193 196 -
trunk/src/VBox/NetworkServices/DHCP/VBoxNetDHCP.cpp
r19255 r19257 577 577 CloseReq.hIf = m_hIf; 578 578 m_hIf = INTNET_HANDLE_INVALID; 579 int rc = SUPCallVMMR0Ex(NIL_RTR0PTR, VMMR0_DO_INTNET_IF_CLOSE, 0, &CloseReq.Hdr);579 int rc = SUPCallVMMR0Ex(NIL_RTR0PTR, 0 /* VPCU 0 */, VMMR0_DO_INTNET_IF_CLOSE, 0, &CloseReq.Hdr); 580 580 AssertRC(rc); 581 581 } … … 907 907 */ 908 908 debugPrint(2, false, "attempting to open/create network \"%s\"...", OpenReq.szNetwork); 909 rc = SUPCallVMMR0Ex(NIL_RTR0PTR, VMMR0_DO_INTNET_OPEN, 0, &OpenReq.Hdr);909 rc = SUPCallVMMR0Ex(NIL_RTR0PTR, 0 /* VPCU 0 */, VMMR0_DO_INTNET_OPEN, 0, &OpenReq.Hdr); 910 910 if (RT_SUCCESS(rc)) 911 911 { … … 922 922 GetRing3BufferReq.hIf = m_hIf; 923 923 GetRing3BufferReq.pRing3Buf = NULL; 924 rc = SUPCallVMMR0Ex(NIL_RTR0PTR, VMMR0_DO_INTNET_IF_GET_RING3_BUFFER, 0, &GetRing3BufferReq.Hdr);924 rc = SUPCallVMMR0Ex(NIL_RTR0PTR, 0 /* VPCU 0 */, VMMR0_DO_INTNET_IF_GET_RING3_BUFFER, 0, &GetRing3BufferReq.Hdr); 925 925 if (RT_SUCCESS(rc)) 926 926 { … … 939 939 ActiveReq.hIf = m_hIf; 940 940 ActiveReq.fActive = true; 941 rc = SUPCallVMMR0Ex(NIL_RTR0PTR, VMMR0_DO_INTNET_IF_SET_ACTIVE, 0, &ActiveReq.Hdr);941 rc = SUPCallVMMR0Ex(NIL_RTR0PTR, 0 /* VPCU 0 */, VMMR0_DO_INTNET_IF_SET_ACTIVE, 0, &ActiveReq.Hdr); 942 942 if (RT_SUCCESS(rc)) 943 943 return 0; … … 979 979 WaitReq.hIf = m_hIf; 980 980 WaitReq.cMillies = 2000; /* 2 secs - the sleep is for some reason uninterruptible... */ /** @todo fix interruptability in SrvIntNet! */ 981 int rc = SUPCallVMMR0Ex(NIL_RTR0PTR, VMMR0_DO_INTNET_IF_WAIT, 0, &WaitReq.Hdr);981 int rc = SUPCallVMMR0Ex(NIL_RTR0PTR, 0 /* VPCU 0 */, VMMR0_DO_INTNET_IF_WAIT, 0, &WaitReq.Hdr); 982 982 if (RT_FAILURE(rc)) 983 983 { -
trunk/src/VBox/NetworkServices/NetLib/VBoxNetIntIf.cpp
r19255 r19257 49 49 SendReq.pSession = pSession; 50 50 SendReq.hIf = hIf; 51 return SUPCallVMMR0Ex(NIL_RTR0PTR, VMMR0_DO_INTNET_IF_SEND, 0, &SendReq.Hdr);51 return SUPCallVMMR0Ex(NIL_RTR0PTR, 0 /* VPCU 0 */, VMMR0_DO_INTNET_IF_SEND, 0, &SendReq.Hdr); 52 52 } 53 53 -
trunk/src/VBox/VMM/HWACCM.cpp
r19255 r19257 459 459 460 460 /* Enable VT-x or AMD-V on all host CPUs. */ 461 rc = SUPCallVMMR0Ex(pVM->pVMR0, VMMR0_DO_HWACC_ENABLE, 0, NULL);461 rc = SUPCallVMMR0Ex(pVM->pVMR0, 0 /* VCPU 0 */, VMMR0_DO_HWACC_ENABLE, 0, NULL); 462 462 if (RT_FAILURE(rc)) 463 463 { … … 828 828 } 829 829 830 rc = SUPCallVMMR0Ex(pVM->pVMR0, VMMR0_DO_HWACC_SETUP_VM, 0, NULL);830 rc = SUPCallVMMR0Ex(pVM->pVMR0, 0 /* VCPU 0 */, VMMR0_DO_HWACC_SETUP_VM, 0, NULL); 831 831 AssertRC(rc); 832 832 if (rc == VINF_SUCCESS) … … 936 936 pVM->hwaccm.s.fNestedPaging = pVM->hwaccm.s.fAllowNestedPaging; 937 937 938 rc = SUPCallVMMR0Ex(pVM->pVMR0, VMMR0_DO_HWACC_SETUP_VM, 0, NULL);938 rc = SUPCallVMMR0Ex(pVM->pVMR0, 0 /* VCPU 0 */, VMMR0_DO_HWACC_SETUP_VM, 0, NULL); 939 939 AssertRC(rc); 940 940 if (rc == VINF_SUCCESS) -
trunk/src/VBox/VMM/PDMDriver.cpp
r19255 r19257 949 949 if ( uOperation >= VMMR0_DO_SRV_START 950 950 && uOperation < VMMR0_DO_SRV_END) 951 rc = SUPCallVMMR0Ex(pDrvIns->Internal.s.pVM->pVMR0, uOperation, 0, (PSUPVMMR0REQHDR)pvArg);951 rc = SUPCallVMMR0Ex(pDrvIns->Internal.s.pVM->pVMR0, 0 /* idCpu not relevant */, uOperation, 0, (PSUPVMMR0REQHDR)pvArg); 952 952 else 953 953 { -
trunk/src/VBox/VMM/VM.cpp
r19255 r19257 511 511 CreateVMReq.pVMR3 = NULL; 512 512 CreateVMReq.cCPUs = cCPUs; 513 rc = SUPCallVMMR0Ex(NIL_RTR0PTR, VMMR0_DO_GVMM_CREATE_VM, 0, &CreateVMReq.Hdr);513 rc = SUPCallVMMR0Ex(NIL_RTR0PTR, 0 /* VCPU 0 */, VMMR0_DO_GVMM_CREATE_VM, 0, &CreateVMReq.Hdr); 514 514 if (RT_SUCCESS(rc)) 515 515 { … … 656 656 657 657 /* Tell GVMM that it can destroy the VM now. */ 658 int rc2 = SUPCallVMMR0Ex(CreateVMReq.pVMR0, VMMR0_DO_GVMM_DESTROY_VM, 0, NULL);658 int rc2 = SUPCallVMMR0Ex(CreateVMReq.pVMR0, 0 /* VCPU 0 */, VMMR0_DO_GVMM_DESTROY_VM, 0, NULL); 659 659 AssertRC(rc2); 660 660 pUVM->pVM = NULL; … … 1748 1748 * Tell GVMM to destroy the VM and free its resources. 1749 1749 */ 1750 int rc = SUPCallVMMR0Ex(pUVM->pVM->pVMR0, VMMR0_DO_GVMM_DESTROY_VM, 0, NULL);1750 int rc = SUPCallVMMR0Ex(pUVM->pVM->pVMR0, 0 /* VCPU 0 */, VMMR0_DO_GVMM_DESTROY_VM, 0, NULL); 1751 1751 AssertRC(rc); 1752 1752 pUVM->pVM = NULL; -
trunk/src/VBox/VMM/VMEmt.cpp
r19255 r19257 732 732 //RTLogRelPrintf("u64NanoTS=%RI64 cLoops=%3d sleep %02dms (%7RU64) ", u64NanoTS, cLoops, cMilliSecs, u64NanoTS); 733 733 STAM_REL_PROFILE_START(&pUVCpu->vm.s.StatHaltBlock, c); 734 rc = SUPCallVMMR0Ex(pVM->pVMR0, VMMR0_DO_GVMM_SCHED_HALT, u64GipTime, NULL);734 rc = SUPCallVMMR0Ex(pVM->pVMR0, pVCpu->idCpu, VMMR0_DO_GVMM_SCHED_HALT, u64GipTime, NULL); 735 735 STAM_REL_PROFILE_STOP(&pUVCpu->vm.s.StatHaltBlock, c); 736 736 if (rc == VERR_INTERRUPTED) … … 752 752 { 753 753 STAM_REL_PROFILE_START(&pUVCpu->vm.s.StatHaltYield, d); 754 rc = SUPCallVMMR0Ex(pVM->pVMR0, VMMR0_DO_GVMM_SCHED_POLL, false /* don't yield */, NULL);754 rc = SUPCallVMMR0Ex(pVM->pVMR0, pVCpu->idCpu, VMMR0_DO_GVMM_SCHED_POLL, false /* don't yield */, NULL); 755 755 STAM_REL_PROFILE_STOP(&pUVCpu->vm.s.StatHaltYield, d); 756 756 } … … 790 790 * anything needs our attention. 791 791 */ 792 rc = SUPCallVMMR0Ex(pVM->pVMR0, VMMR0_DO_GVMM_SCHED_HALT, RTTimeNanoTS() + 1000000000 /* +1s */, NULL);792 rc = SUPCallVMMR0Ex(pVM->pVMR0, pVCpu->idCpu, VMMR0_DO_GVMM_SCHED_HALT, RTTimeNanoTS() + 1000000000 /* +1s */, NULL); 793 793 if (rc == VERR_INTERRUPTED) 794 794 rc = VINF_SUCCESS; … … 819 819 if (pUVCpu->vm.s.fWait) 820 820 { 821 int rc = SUPCallVMMR0Ex(pUVCpu->pVM->pVMR0, VMMR0_DO_GVMM_SCHED_WAKE_UP, 0, NULL);821 int rc = SUPCallVMMR0Ex(pUVCpu->pVM->pVMR0, pUVCpu->idCpu, VMMR0_DO_GVMM_SCHED_WAKE_UP, 0, NULL); 822 822 AssertRC(rc); 823 823 } -
trunk/src/VBox/VMM/VMM.cpp
r19255 r19257 463 463 rc = VINF_SUCCESS; 464 464 #else 465 rc = SUPCallVMMR0Ex(pVM->pVMR0, VMMR0_DO_VMMR0_INIT, VMMGetSvnRev(), NULL);465 rc = SUPCallVMMR0Ex(pVM->pVMR0, 0 /* VCPU 0 */, VMMR0_DO_VMMR0_INIT, VMMGetSvnRev(), NULL); 466 466 #endif 467 467 if ( pVM->vmm.s.pR0LoggerR3 … … 532 532 rc = VINF_SUCCESS; 533 533 #else 534 rc = SUPCallVMMR0(pVM->pVMR0, VMMR0_DO_CALL_HYPERVISOR, NULL);534 rc = SUPCallVMMR0(pVM->pVMR0, 0 /* VCPU 0 */, VMMR0_DO_CALL_HYPERVISOR, NULL); 535 535 #endif 536 536 #ifdef LOG_ENABLED … … 582 582 rc = VINF_SUCCESS; 583 583 #else 584 rc = SUPCallVMMR0Ex(pVM->pVMR0, VMMR0_DO_VMMR0_TERM, 0, NULL);584 rc = SUPCallVMMR0Ex(pVM->pVMR0, 0 /* VCPU 0 */, VMMR0_DO_VMMR0_TERM, 0, NULL); 585 585 #endif 586 586 if ( pVM->vmm.s.pR0LoggerR3 … … 1291 1291 VMMR3DECL(int) VMMR3CallR0(PVM pVM, uint32_t uOperation, uint64_t u64Arg, PSUPVMMR0REQHDR pReqHdr) 1292 1292 { 1293 PVMCPU pVCpu = VMMGetCpu(pVM); 1294 AssertReturn(pVCpu, VERR_VM_THREAD_NOT_EMT); 1295 1293 1296 /* 1294 1297 * Call Ring-0 entry with init code. … … 1300 1303 rc = VERR_GENERAL_FAILURE; 1301 1304 #else 1302 rc = SUPCallVMMR0Ex(pVM->pVMR0, uOperation, u64Arg, pReqHdr);1305 rc = SUPCallVMMR0Ex(pVM->pVMR0, pVCpu->idCpu, uOperation, u64Arg, pReqHdr); 1303 1306 #endif 1304 1307 if ( pVM->vmm.s.pR0LoggerR3 -
trunk/src/VBox/VMM/VMMR0/VMMR0.cpp
r19255 r19257 691 691 * @returns VBox status code. 692 692 * @param pVM The VM to operate on. 693 * @param idCpu VMCPU id. 693 694 * @param enmOperation Which operation to execute. 694 695 * @param pReqHdr This points to a SUPVMMR0REQHDR packet. Optional. … … 698 699 * @remarks Assume called with interrupts _enabled_. 699 700 */ 700 static int vmmR0EntryExWorker(PVM pVM, VMMR0OPERATION enmOperation, PSUPVMMR0REQHDR pReqHdr, uint64_t u64Arg, PSUPDRVSESSION pSession)701 static int vmmR0EntryExWorker(PVM pVM, unsigned idCpu, VMMR0OPERATION enmOperation, PSUPVMMR0REQHDR pReqHdr, uint64_t u64Arg, PSUPDRVSESSION pSession) 701 702 { 702 703 /* … … 992 993 993 994 /** 994 * Argument for vmmR0EntryExWrapper containing the argument s ofr VMMR0EntryEx.995 * Argument for vmmR0EntryExWrapper containing the arguments for VMMR0EntryEx. 995 996 */ 996 997 typedef struct VMMR0ENTRYEXARGS 997 998 { 998 999 PVM pVM; 1000 unsigned idCpu; 999 1001 VMMR0OPERATION enmOperation; 1000 1002 PSUPVMMR0REQHDR pReq; … … 1014 1016 { 1015 1017 return vmmR0EntryExWorker(((PVMMR0ENTRYEXARGS)pvArgs)->pVM, 1018 ((PVMMR0ENTRYEXARGS)pvArgs)->idCpu, 1016 1019 ((PVMMR0ENTRYEXARGS)pvArgs)->enmOperation, 1017 1020 ((PVMMR0ENTRYEXARGS)pvArgs)->pReq, … … 1026 1029 * @returns VBox status code. 1027 1030 * @param pVM The VM to operate on. 1031 * @param idCpu VMCPU id. 1028 1032 * @param enmOperation Which operation to execute. 1029 1033 * @param pReq This points to a SUPVMMR0REQHDR packet. Optional. … … 1032 1036 * @remarks Assume called with interrupts _enabled_. 1033 1037 */ 1034 VMMR0DECL(int) VMMR0EntryEx(PVM pVM, VMMR0OPERATION enmOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION pSession)1038 VMMR0DECL(int) VMMR0EntryEx(PVM pVM, unsigned idCpu, VMMR0OPERATION enmOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION pSession) 1035 1039 { 1036 1040 /* … … 1060 1064 VMMR0ENTRYEXARGS Args; 1061 1065 Args.pVM = pVM; 1066 Args.idCpu = idCpu; 1062 1067 Args.enmOperation = enmOperation; 1063 1068 Args.pReq = pReq; … … 1071 1076 } 1072 1077 } 1073 return vmmR0EntryExWorker(pVM, enmOperation, pReq, u64Arg, pSession);1078 return vmmR0EntryExWorker(pVM, idCpu, enmOperation, pReq, u64Arg, pSession); 1074 1079 } 1075 1080 -
trunk/src/VBox/VMM/testcase/tstGlobalConfig.cpp
r19255 r19257 107 107 { 108 108 Req.pSession = pSession; 109 rc = SUPCallVMMR0Ex(NIL_RTR0PTR, enmOp, 0, &Req.Hdr);109 rc = SUPCallVMMR0Ex(NIL_RTR0PTR, 0 /* VCPU 0 */, enmOp, 0, &Req.Hdr); 110 110 if (RT_SUCCESS(rc)) 111 111 {
Note:
See TracChangeset
for help on using the changeset viewer.