VirtualBox

Changeset 44340 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Jan 23, 2013 4:20:07 PM (12 years ago)
Author:
vboxsync
Message:

VMM,Main,Debugger,REM: VM API cleanup, prefering PUVM over PVM so we can use real reference counting and not have the memory backing the VM structure disappear on us.

Location:
trunk/include/VBox
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/dbggui.h

    r28800 r44340  
    9898 *
    9999 * @returns VBox status code.
    100  * @param   pVM         The VM handle.
     100 * @param   pUVM        The VM handle.
    101101 * @param   ppGui       Where to store the pointer to the debugger instance.
    102102 * @param   ppGuiVT     Where to store the virtual method table pointer.
    103103 *                      Optional.
    104104 */
    105 DBGDECL(int) DBGGuiCreateForVM(PVM pVM, PDBGGUI *ppGui, PCDBGGUIVT *ppGuiVT);
     105DBGDECL(int) DBGGuiCreateForVM(PUVM pUVM, PDBGGUI *ppGui, PCDBGGUIVT *ppGuiVT);
    106106/** @copydoc DBGGuiCreateForVM. */
    107 typedef DECLCALLBACK(int) FNDBGGUICREATEFORVM(PVM pVM, PDBGGUI *ppGui, PCDBGGUIVT *ppGuiVT);
     107typedef DECLCALLBACK(int) FNDBGGUICREATEFORVM(PUVM pUVM, PDBGGUI *ppGui, PCDBGGUIVT *ppGuiVT);
    108108/** Pointer to DBGGuiCreateForVM. */
    109109typedef FNDBGGUICREATEFORVM *PFNDBGGUICREATEFORVM;
  • trunk/include/VBox/vmm/cfgm.h

    r39853 r44340  
    186186 */
    187187VMMR3DECL(PCFGMNODE)    CFGMR3GetRoot(PVM pVM);
     188VMMR3DECL(PCFGMNODE)    CFGMR3GetRootU(PUVM pUVM);
    188189VMMR3DECL(PCFGMNODE)    CFGMR3GetParent(PCFGMNODE pNode);
    189190VMMR3DECL(PCFGMNODE)    CFGMR3GetParentEx(PVM pVM, PCFGMNODE pNode);
  • trunk/include/VBox/vmm/em.h

    r43394 r44340  
    225225 * @{
    226226 */
    227 VMMR3DECL(int)      EMR3Init(PVM pVM);
    228 VMMR3DECL(void)     EMR3Relocate(PVM pVM);
    229 VMMR3DECL(void)     EMR3ResetCpu(PVMCPU pVCpu);
    230 VMMR3DECL(void)     EMR3Reset(PVM pVM);
    231 VMMR3DECL(int)      EMR3Term(PVM pVM);
     227VMMR3DECL(int)          EMR3Init(PVM pVM);
     228VMMR3DECL(void)         EMR3Relocate(PVM pVM);
     229VMMR3DECL(void)         EMR3ResetCpu(PVMCPU pVCpu);
     230VMMR3DECL(void)         EMR3Reset(PVM pVM);
     231VMMR3DECL(int)          EMR3Term(PVM pVM);
    232232VMMR3DECL(DECLNORETURN(void)) EMR3FatalError(PVMCPU pVCpu, int rc);
    233 VMMR3DECL(int)      EMR3ExecuteVM(PVM pVM, PVMCPU pVCpu);
    234 VMMR3DECL(int)      EMR3CheckRawForcedActions(PVM pVM, PVMCPU pVCpu);
    235 VMMR3DECL(int)      EMR3Interpret(PVM pVM);
     233VMMR3DECL(int)          EMR3ExecuteVM(PVM pVM, PVMCPU pVCpu);
     234VMMR3DECL(int)          EMR3CheckRawForcedActions(PVM pVM, PVMCPU pVCpu);
     235VMMR3DECL(int)          EMR3Interpret(PVM pVM);
     236VMMR3_INT_DECL(int)     EMR3NotifyResume(PVM pVM);
     237VMMR3_INT_DECL(int)     EMR3NotifySuspend(PVM pVM);
     238VMMR3_INT_DECL(bool)    EMR3IsExecutionAllowed(PVM pVM, PVMCPU pVCpu);
    236239
    237240/**
  • trunk/include/VBox/vmm/vmapi.h

    r43387 r44340  
    316316} VMINITCOMPLETED;
    317317
    318 
    319 VMMR3DECL(int)  VMR3Create(uint32_t cCpus, PCVMM2USERMETHODS pVm2UserCbs,
    320                            PFNVMATERROR pfnVMAtError, void *pvUserVM,
    321                            PFNCFGMCONSTRUCTOR pfnCFGMConstructor, void *pvUserCFGM,
    322                            PVM *ppVM);
    323 VMMR3DECL(int)  VMR3PowerOn(PVM pVM);
    324 VMMR3DECL(int)  VMR3Suspend(PVM pVM);
    325 VMMR3DECL(int)  VMR3Resume(PVM pVM);
    326 VMMR3DECL(int)  VMR3Reset(PVM pVM);
    327 
    328318/**
    329319 * Progress callback.
     
    340330typedef FNVMPROGRESS *PFNVMPROGRESS;
    341331
    342 VMMR3DECL(int)  VMR3Save(PVM pVM, const char *pszFilename, bool fContinueAfterwards, PFNVMPROGRESS pfnProgress, void *pvUser, bool *pfSuspended);
    343 VMMR3DECL(int)  VMR3Teleport(PVM pVM, uint32_t cMsDowntime, PCSSMSTRMOPS pStreamOps, void *pvStreamOpsUser, PFNVMPROGRESS pfnProgress, void *pvProgressUser, bool *pfSuspended);
    344 VMMR3DECL(int)  VMR3LoadFromFile(PVM pVM, const char *pszFilename, PFNVMPROGRESS pfnProgress, void *pvUser);
    345 VMMR3DECL(int)  VMR3LoadFromStream(PVM pVM, PCSSMSTRMOPS pStreamOps, void *pvStreamOpsUser,
    346                                    PFNVMPROGRESS pfnProgress, void *pvProgressUser);
    347 VMMR3DECL(int)  VMR3PowerOff(PVM pVM);
    348 VMMR3DECL(int)  VMR3Destroy(PVM pVM);
    349 VMMR3DECL(void) VMR3Relocate(PVM pVM, RTGCINTPTR offDelta);
    350 VMMR3DECL(PVM)  VMR3EnumVMs(PVM pVMPrev);
     332/**
     333 * VM destruction callback.
     334 * @param   pVM     The VM which is about to be destroyed.
     335 * @param   pvUser  The user parameter specified at registration.
     336 */
     337typedef DECLCALLBACK(void) FNVMATDTOR(PVM pVM, void *pvUser);
     338/** Pointer to a VM destruction callback. */
     339typedef FNVMATDTOR *PFNVMATDTOR;
     340
     341
     342VMMR3DECL(int)          VMR3Create(uint32_t cCpus, PCVMM2USERMETHODS pVm2UserCbs,
     343                                   PFNVMATERROR pfnVMAtError, void *pvUserVM,
     344                                   PFNCFGMCONSTRUCTOR pfnCFGMConstructor, void *pvUserCFGM,
     345                                   PVM *ppVM, PUVM *ppUVM);
     346VMMR3DECL(int)          VMR3PowerOn(PUVM pUVM);
     347VMMR3DECL(int)          VMR3Suspend(PUVM pUVM);
     348VMMR3DECL(int)          VMR3Resume(PUVM pUVM);
     349VMMR3DECL(int)          VMR3Reset(PUVM pUVM);
     350VMMR3DECL(int)          VMR3Save(PUVM pUVM, const char *pszFilename, bool fContinueAfterwards, PFNVMPROGRESS pfnProgress, void *pvUser, bool *pfSuspended);
     351VMMR3_INT_DECL(int)     VMR3SaveFT(PUVM pUVM, PCSSMSTRMOPS pStreamOps, void *pvStreamOpsUser, bool *pfSuspended, bool fSkipStateChanges);
     352VMMR3DECL(int)          VMR3Teleport(PUVM pUVM, uint32_t cMsDowntime, PCSSMSTRMOPS pStreamOps, void *pvStreamOpsUser, PFNVMPROGRESS pfnProgress, void *pvProgressUser, bool *pfSuspended);
     353VMMR3DECL(int)          VMR3LoadFromFile(PUVM pUVM, const char *pszFilename, PFNVMPROGRESS pfnProgress, void *pvUser);
     354VMMR3DECL(int)          VMR3LoadFromStream(PUVM pUVM, PCSSMSTRMOPS pStreamOps, void *pvStreamOpsUser,
     355                                           PFNVMPROGRESS pfnProgress, void *pvProgressUser);
     356VMMR3_INT_DECL(int)     VMR3LoadFromStreamFT(PUVM pUVM, PCSSMSTRMOPS pStreamOps, void *pvStreamOpsUser);
     357
     358VMMR3DECL(int)          VMR3PowerOff(PUVM pUVM);
     359VMMR3DECL(int)          VMR3Destroy(PUVM pUVM);
     360VMMR3_INT_DECL(void)    VMR3Relocate(PVM pVM, RTGCINTPTR offDelta);
    351361
    352362VMMR3DECL(PVM)          VMR3GetVM(PUVM pUVM);
     
    359369VMMR3DECL(VMSTATE)      VMR3GetStateU(PUVM pUVM);
    360370VMMR3DECL(const char *) VMR3GetStateName(VMSTATE enmState);
    361 
    362 /**
    363  * VM destruction callback.
    364  * @param   pVM     The VM which is about to be destroyed.
    365  * @param   pvUser  The user parameter specified at registration.
    366  */
    367 typedef DECLCALLBACK(void) FNVMATDTOR(PVM pVM, void *pvUser);
    368 /** Pointer to a VM destruction callback. */
    369 typedef FNVMATDTOR *PFNVMATDTOR;
    370 
    371 VMMR3DECL(int)      VMR3AtDtorRegister(PFNVMATDTOR pfnAtDtor, void *pvUser);
    372 VMMR3DECL(int)      VMR3AtDtorDeregister(PFNVMATDTOR pfnAtDtor);
    373 VMMR3DECL(int)      VMR3AtStateRegister(PVM pVM, PFNVMATSTATE pfnAtState, void *pvUser);
    374 VMMR3DECL(int)      VMR3AtStateDeregister(PVM pVM, PFNVMATSTATE pfnAtState, void *pvUser);
    375 VMMR3DECL(bool)     VMR3TeleportedAndNotFullyResumedYet(PVM pVM);
    376 VMMR3DECL(int)      VMR3AtErrorRegister(PVM pVM, PFNVMATERROR pfnAtError, void *pvUser);
    377 VMMR3DECL(int)      VMR3AtErrorRegisterU(PUVM pVM, PFNVMATERROR pfnAtError, void *pvUser);
    378 VMMR3DECL(int)      VMR3AtErrorDeregister(PVM pVM, PFNVMATERROR pfnAtError, void *pvUser);
    379 VMMR3DECL(void)     VMR3SetErrorWorker(PVM pVM);
    380 VMMR3DECL(uint32_t) VMR3GetErrorCount(PVM pVM);
    381 VMMR3DECL(uint32_t) VMR3GetErrorCountU(PUVM pUVM);
    382 VMMR3DECL(int)      VMR3AtRuntimeErrorRegister(PVM pVM, PFNVMATRUNTIMEERROR pfnAtRuntimeError, void *pvUser);
    383 VMMR3DECL(int)      VMR3AtRuntimeErrorDeregister(PVM pVM, PFNVMATRUNTIMEERROR pfnAtRuntimeError, void *pvUser);
    384 VMMR3DECL(int)      VMR3SetRuntimeErrorWorker(PVM pVM);
    385 VMMR3DECL(uint32_t) VMR3GetRuntimeErrorCount(PVM pVM);
    386 VMMR3DECL(int)      VMR3ReqCall(PVM pVM, VMCPUID idDstCpu, PVMREQ *ppReq, RTMSINTERVAL cMillies, uint32_t fFlags, PFNRT pfnFunction, unsigned cArgs, ...);
    387 VMMR3DECL(int)      VMR3ReqCallU(PUVM pUVM, VMCPUID idDstCpu, PVMREQ *ppReq, RTMSINTERVAL cMillies, uint32_t fFlags, PFNRT pfnFunction, unsigned cArgs, ...);
    388 VMMR3DECL(int)      VMR3ReqCallVU(PUVM pUVM, VMCPUID idDstCpu, PVMREQ *ppReq, RTMSINTERVAL cMillies, uint32_t fFlags, PFNRT pfnFunction, unsigned cArgs, va_list Args);
    389 VMMR3DECL(int)      VMR3ReqCallWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
    390 VMMR3DECL(int)      VMR3ReqCallNoWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
    391 VMMR3DECL(int)      VMR3ReqCallVoidWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
    392 VMMR3DECL(int)      VMR3ReqCallVoidNoWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
    393 VMMR3DECL(int)      VMR3ReqPriorityCallWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
    394 VMMR3DECL(int)      VMR3ReqPriorityCallVoidWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
    395 VMMR3DECL(int)      VMR3ReqAlloc(PVM pVM, PVMREQ *ppReq, VMREQTYPE enmType, VMCPUID idDstCpu);
    396 VMMR3DECL(int)      VMR3ReqAllocU(PUVM pUVM, PVMREQ *ppReq, VMREQTYPE enmType, VMCPUID idDstCpu);
    397 VMMR3DECL(int)      VMR3ReqFree(PVMREQ pReq);
    398 VMMR3DECL(int)      VMR3ReqQueue(PVMREQ pReq, RTMSINTERVAL cMillies);
    399 VMMR3DECL(int)      VMR3ReqWait(PVMREQ pReq, RTMSINTERVAL cMillies);
    400 VMMR3DECL(int)      VMR3ReqProcessU(PUVM pUVM, VMCPUID idDstCpu, bool fPriorityOnly);
    401 VMMR3DECL(void)     VMR3NotifyGlobalFFU(PUVM pUVM, uint32_t fFlags);
    402 VMMR3DECL(void)     VMR3NotifyCpuFFU(PUVMCPU pUVMCpu, uint32_t fFlags);
     371VMMR3DECL(int)          VMR3AtStateRegister(PUVM pUVM, PFNVMATSTATE pfnAtState, void *pvUser);
     372VMMR3DECL(int)          VMR3AtStateDeregister(PUVM pUVM, PFNVMATSTATE pfnAtState, void *pvUser);
     373VMMR3_INT_DECL(bool)    VMR3TeleportedAndNotFullyResumedYet(PVM pVM);
     374VMMR3DECL(int)          VMR3AtErrorRegister(PUVM pUVM, PFNVMATERROR pfnAtError, void *pvUser);
     375VMMR3DECL(int)          VMR3AtErrorDeregister(PUVM pUVM, PFNVMATERROR pfnAtError, void *pvUser);
     376VMMR3_INT_DECL(void)    VMR3SetErrorWorker(PVM pVM);
     377VMMR3_INT_DECL(uint32_t) VMR3GetErrorCount(PUVM pUVM);
     378VMMR3DECL(int)          VMR3AtRuntimeErrorRegister(PUVM pUVM, PFNVMATRUNTIMEERROR pfnAtRuntimeError, void *pvUser);
     379VMMR3DECL(int)          VMR3AtRuntimeErrorDeregister(PUVM pUVM, PFNVMATRUNTIMEERROR pfnAtRuntimeError, void *pvUser);
     380VMMR3_INT_DECL(int)     VMR3SetRuntimeErrorWorker(PVM pVM);
     381VMMR3_INT_DECL(uint32_t) VMR3GetRuntimeErrorCount(PUVM pUVM);
     382
     383VMMR3DECL(int)          VMR3ReqCallU(PUVM pUVM, VMCPUID idDstCpu, PVMREQ *ppReq, RTMSINTERVAL cMillies, uint32_t fFlags, PFNRT pfnFunction, unsigned cArgs, ...);
     384VMMR3DECL(int)          VMR3ReqCallVU(PUVM pUVM, VMCPUID idDstCpu, PVMREQ *ppReq, RTMSINTERVAL cMillies, uint32_t fFlags, PFNRT pfnFunction, unsigned cArgs, va_list Args);
     385VMMR3_INT_DECL(int)     VMR3ReqCallWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
     386VMMR3DECL(int)          VMR3ReqCallWaitU(PUVM pUVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
     387VMMR3DECL(int)          VMR3ReqCallNoWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
     388VMMR3DECL(int)          VMR3ReqCallNoWaitU(PUVM pUVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
     389VMMR3_INT_DECL(int)     VMR3ReqCallVoidWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
     390VMMR3DECL(int)          VMR3ReqCallVoidWaitU(PUVM pUVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
     391VMMR3DECL(int)          VMR3ReqCallVoidNoWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
     392VMMR3DECL(int)          VMR3ReqPriorityCallWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
     393VMMR3DECL(int)          VMR3ReqPriorityCallWaitU(PUVM pUVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
     394VMMR3DECL(int)          VMR3ReqPriorityCallVoidWaitU(PUVM pUVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
     395VMMR3DECL(int)          VMR3ReqAlloc(PUVM pUVM, PVMREQ *ppReq, VMREQTYPE enmType, VMCPUID idDstCpu);
     396VMMR3DECL(int)          VMR3ReqFree(PVMREQ pReq);
     397VMMR3DECL(int)          VMR3ReqQueue(PVMREQ pReq, RTMSINTERVAL cMillies);
     398VMMR3DECL(int)          VMR3ReqWait(PVMREQ pReq, RTMSINTERVAL cMillies);
     399VMMR3_INT_DECL(int)     VMR3ReqProcessU(PUVM pUVM, VMCPUID idDstCpu, bool fPriorityOnly);
     400
    403401/** @name Flags for VMR3NotifyCpuFFU and VMR3NotifyGlobalFFU.
    404402 * @{ */
     
    408406#define VMNOTIFYFF_FLAGS_POKE       RT_BIT_32(1)
    409407/** @} */
    410 
    411 VMMR3DECL(int)              VMR3WaitHalted(PVM pVM, PVMCPU pVCpu, bool fIgnoreInterrupts);
    412 VMMR3DECL(int)              VMR3WaitU(PUVMCPU pUVMCpu);
     408VMMR3_INT_DECL(void)        VMR3NotifyGlobalFFU(PUVM pUVM, uint32_t fFlags);
     409VMMR3_INT_DECL(void)        VMR3NotifyCpuFFU(PUVMCPU pUVMCpu, uint32_t fFlags);
     410VMMR3_INT_DECL(int)         VMR3WaitHalted(PVM pVM, PVMCPU pVCpu, bool fIgnoreInterrupts);
     411VMMR3_INT_DECL(int)         VMR3WaitU(PUVMCPU pUVMCpu);
    413412VMMR3_INT_DECL(int)         VMR3AsyncPdmNotificationWaitU(PUVMCPU pUVCpu);
    414413VMMR3_INT_DECL(void)        VMR3AsyncPdmNotificationWakeupU(PUVM pUVM);
    415 VMMR3DECL(RTCPUID)          VMR3GetVMCPUId(PVM pVM);
    416 VMMR3DECL(RTTHREAD)         VMR3GetVMCPUThread(PVM pVM);
    417 VMMR3DECL(RTTHREAD)         VMR3GetVMCPUThreadU(PUVM pUVM);
     414VMMR3_INT_DECL(RTCPUID)     VMR3GetVMCPUId(PVM pVM);
     415VMMR3DECL(RTTHREAD)         VMR3GetVMCPUThread(PUVM pUVM);
    418416VMMR3DECL(RTNATIVETHREAD)   VMR3GetVMCPUNativeThread(PVM pVM);
    419417VMMR3DECL(RTNATIVETHREAD)   VMR3GetVMCPUNativeThreadU(PUVM pUVM);
    420 VMMR3DECL(int)              VMR3GetCpuCoreAndPackageIdFromCpuId(PVM pVM, VMCPUID idCpu, uint32_t *pidCpuCore, uint32_t *pidCpuPackage);
    421 VMMR3DECL(int)              VMR3HotUnplugCpu(PVM pVM, VMCPUID idCpu);
    422 VMMR3DECL(int)              VMR3HotPlugCpu(PVM pVM, VMCPUID idCpu);
    423 VMMR3DECL(int)              VMR3SetCpuExecutionCap(PVM pVM, uint32_t uCpuExecutionCap);
     418VMMR3DECL(int)              VMR3GetCpuCoreAndPackageIdFromCpuId(PUVM pUVM, VMCPUID idCpu, uint32_t *pidCpuCore, uint32_t *pidCpuPackage);
     419VMMR3DECL(int)              VMR3HotUnplugCpu(PUVM pUVM, VMCPUID idCpu);
     420VMMR3DECL(int)              VMR3HotPlugCpu(PUVM pUVM, VMCPUID idCpu);
     421VMMR3DECL(int)              VMR3SetCpuExecutionCap(PUVM pUVM, uint32_t uCpuExecutionCap);
    424422/** @} */
    425423#endif /* IN_RING3 */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette