Logo Search packages:      
Sourcecode: virtualbox-ose version File versions  Download package

VMMR3DECL ( int   ) 

Creates a async completion template for a driver instance.

The template is used when creating new completion tasks.

Returns:
VBox status code.
Parameters:
pVM Pointer to the shared VM structure.
pDrvIns The driver instance.
ppTemplate Where to store the template pointer on success.
pfnCompleted The completion callback routine.
pvTemplateUser Template user argument.
pszDesc Description.
Creates a async completion template for a USB device instance.

The template is used when creating new completion tasks.

Returns:
VBox status code.
Parameters:
pVM Pointer to the shared VM structure.
pUsbIns The USB device instance.
ppTemplate Where to store the template pointer on success.
pfnCompleted The completion callback routine.
pszDesc Description.
Creates a async completion template for internally by the VMM.

The template is used when creating new completion tasks.

Returns:
VBox status code.
Parameters:
pVM Pointer to the shared VM structure.
ppTemplate Where to store the template pointer on success.
pfnCompleted The completion callback routine.
pvUser2 The 2nd user argument for the callback.
pszDesc Description.
Destroys the specified async completion template.

Returns:
VBox status codes:
Return values:
VINF_SUCCESS on success.
VERR_PDM_ASYNC_TEMPLATE_BUSY if the template is still in use.
Parameters:
pTemplate The template in question.
Destroys all the specified async completion templates for the given device instance.

Returns:
VBox status codes:
Return values:
VINF_SUCCESS on success.
VERR_PDM_ASYNC_TEMPLATE_BUSY if one or more of the templates are still in use.
Parameters:
pVM Pointer to the shared VM structure.
pDevIns The device instance.
Destroys all the specified async completion templates for the given driver instance.

Returns:
VBox status codes:
Return values:
VINF_SUCCESS on success.
VERR_PDM_ASYNC_TEMPLATE_BUSY if one or more of the templates are still in use.
Parameters:
pVM Pointer to the shared VM structure.
pDrvIns The driver instance.
Destroys all the specified async completion templates for the given USB device instance.

Returns:
VBox status codes:
Return values:
VINF_SUCCESS on success.
VERR_PDM_ASYNC_TEMPLATE_BUSY if one or more of the templates are still in use.
Parameters:
pVM Pointer to the shared VM structure.
pUsbIns The USB device instance.
Opens a file as a async completion endpoint.

Returns:
VBox status code.
Parameters:
ppEndpoint Where to store the opaque endpoint handle on success.
pszFilename Path to the file which is to be opened. (UTF-8)
fFlags Open flags, see grp_pdmacep_file_flags.
pTemplate Handle to the completion callback template to use for this end point.
Creates a read task on the given endpoint.

Returns:
VBox status code.
Parameters:
pEndpoint The file endpoint to read from.
off Where to start reading from.
paSegments Scatter gather list to store the data in.
cSegments Number of segments in the list.
cbRead The overall number of bytes to read.
pvUser Opaque user data returned in the completion callback upon completion of the task.
ppTask Where to store the task handle on success.
Creates a write task on the given endpoint.

Returns:
VBox status code.
Parameters:
pEndpoint The file endpoint to write to.
off Where to start writing at.
paSegments Scatter gather list of the data to write.
cSegments Number of segments in the list.
cbWrite The overall number of bytes to write.
pvUser Opaque user data returned in the completion callback upon completion of the task.
ppTask Where to store the task handle on success.
Creates a flush task on the given endpoint.

Every read and write task initiated before the flush task is finished upon completion of this task.

Returns:
VBox status code.
Parameters:
pEndpoint The file endpoint to flush.
pvUser Opaque user data returned in the completion callback upon completion of the task.
ppTask Where to store the task handle on success.
Queries the size of an endpoint. Not that some endpoints may not support this and will return an error (sockets for example).

Returns:
VBox status code.
Return values:
VERR_NOT_SUPPORTED if the endpoint does not support this operation.
Parameters:
pEndpoint The file endpoint.
pcbSize Where to store the size of the endpoint.
Cancels a async completion task.

If you want to use this method, you have to take great create to make sure you will never attempt cancel a task which has been completed. Since there is no reference counting or anything on the task it self, you have to serialize the cancelation and completion paths such that the aren't racing one another.

Returns:
VBox status code
Parameters:
pTask The Task to cancel.
Initializes the per-VCPU CPUM.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Terminates the CPUM.

Termination means cleaning up and freeing all resources, the VM it self is at this point powered off or suspended.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Terminates the per-VCPU CPUM.

Termination means cleaning up and freeing all resources, the VM it self is at this point powered off or suspended.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Initializes the per-VCPU EM.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Terminates the EM.

Termination means cleaning up and freeing all resources, the VM it self is at this point powered off or suspended.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Terminates the per-VCPU EM.

Termination means cleaning up and freeing all resources, the VM it self is at this point powered off or suspended.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Initializes the per-VCPU HWACCM.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Initialize VT-x or AMD-V.

Returns:
VBox status code.
Parameters:
pVM The VM handle.
Initializes the MM.

MM is managing the virtual address space (among other things) and setup the hypvervisor memory area mapping in the VM structure and the hypvervisor alloc-only-heap. Assuming the current init order and components the hypvervisor memory area looks like this:

  1. VM Structure.
  2. Hypervisor alloc only heap (also call Hypervisor memory region).
  3. Core code.

MM determins the virtual address of the hypvervisor memory area by checking for location at previous run. If that property isn't available it will choose a default starting location, currently 0xa0000000.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Initializes the MM parts which depends on PGM being initialized.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Remarks:
No cleanup necessary since MMR3Term() will be called on failure.
Terminates the MM.

Termination means cleaning up and freeing all resources, the VM it self is at this point powered off or suspended.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Finalizes HMA page attributes.

Returns:
VBox status code.
Parameters:
pVM The VM handle.
Terminates the PATM.

Termination means cleaning up and freeing all resources, the VM it self is at this point powered off or suspended.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
PATM reset callback.

Returns:
VBox status code.
Parameters:
pVM The VM which is reset.
Replace an instruction with a breakpoint (0xCC), that is handled dynamically in the guest context.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
pInstrGC Guest context point to privileged instruction
pInstrHC Host context point to privileged instruction
pCpu Disassembly CPU structure ptr
pPatch Patch record
Note:
returns failure if patching is not allowed or possible
Mark patch as dirty

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
pPatch Patch record
Note:
returns failure if patching is not allowed or possible
Initializes the PDM.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Queries module information from an PC (eip/rip).

This is typically used to locate a crash address.

Returns:
VBox status code.
Parameters:
pVM VM handle
uPC The program counter (eip/rip) to locate the module for.
pszModName Where to store the module name.
cchModName Size of the module name buffer.
pMod Base address of the module.
pszNearSym1 Name of the closes symbol from below.
cchNearSym1 Size of the buffer pointed to by pszNearSym1.
pNearSym1 The address of pszNearSym1.
pszNearSym2 Name of the closes symbol from below.
cchNearSym2 Size of the buffer pointed to by pszNearSym2.
pNearSym2 The address of pszNearSym2.
Initializes the per-VCPU PGM.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Init the PGM bits that rely on VMMR0 and MM to be fully initialized.

The dynamic mapping area will also be allocated and initialized at this time. We could allocate it during PGMR3Init of course, but the mapping wouldn't be allocated at that time preventing us from setting up the page table entries with the dummy page.

Returns:
VBox status code.
Parameters:
pVM VM handle.
Ring-3 init finalizing.

Returns:
VBox status code.
Parameters:
pVM The VM handle.
Terminates the SELM.

Termination means cleaning up and freeing all resources, the VM it self is at this point powered off or suspended.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Registers a sample with the statistics mamanger.

Statistics are maintained on a per VM basis and is normally registered during the VM init stage, but there is nothing preventing you from register them at runtime.

Use STAMR3Deregister() to deregister statistics at runtime, however do not bother calling at termination time.

It is not possible to register the same sample twice.

Returns:
VBox status.
Parameters:
pUVM Pointer to the user mode VM structure.
pvSample Pointer to the sample.
enmType Sample type. This indicates what pvSample is pointing at.
enmVisibility Visibility type specifying whether unused statistics should be visible or not.
pszName Sample name. The name is on this form "/<component>/<sample>". Further nesting is possible.
enmUnit Sample unit.
pszDesc Sample description.
Initializes the per-VCPU TM.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Finalizes the TM initialization.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Creates a virtual machine by calling the supplied configuration constructor.

On successful returned the VM is powered, i.e. VMR3PowerOn() should be called to start the execution.

Returns:
0 on success.

VBox error code on failure.

Parameters:
cCPUs Number of virtual CPUs for the new VM.
pfnVMAtError Pointer to callback function for setting VM errors. This was added as an implicit call to VMR3AtErrorRegister() since there is no way the caller can get to the VM handle early enough to do this on its own. This is called in the context of an EMT.
pvUserVM The user argument passed to pfnVMAtError.
pfnCFGMConstructor Pointer to callback function for constructing the VM configuration tree. This is called in the context of an EMT0.
pvUserCFGM The user argument passed to pfnCFGMConstructor.
ppVM Where to store the 'handle' of the created VM.
Initializes the per-VCPU VMM.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Initializes the R0 VMM.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Initializes the RC VMM.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Terminate the VMM bits.

Returns:
VINF_SUCCESS.
Parameters:
pVM The VM handle.
Terminates the per-VCPU VMM.

Termination means cleaning up and freeing all resources, the VM it self is at this point powered off or suspended.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Creates a async completion template for a device instance.

The template is used when creating new completion tasks.

Returns:
VBox status code.
Parameters:
pVM Pointer to the shared VM structure.
pDevIns The device instance.
ppTemplate Where to store the template pointer on success.
pfnCompleted The completion callback routine.
pszDesc Description.
Creates a async completion template for a driver instance.

The template is used when creating new completion tasks.

Returns:
VBox status code.
Parameters:
pVM Pointer to the shared VM structure.
pDrvIns The driver instance.
ppTemplate Where to store the template pointer on success.
pfnCompleted The completion callback routine.
pvTemplateUser Template user argument.
pszDesc Description.
Creates a async completion template for a USB device instance.

The template is used when creating new completion tasks.

Returns:
VBox status code.
Parameters:
pVM Pointer to the shared VM structure.
pUsbIns The USB device instance.
ppTemplate Where to store the template pointer on success.
pfnCompleted The completion callback routine.
pszDesc Description.
Creates a async completion template for internally by the VMM.

The template is used when creating new completion tasks.

Returns:
VBox status code.
Parameters:
pVM Pointer to the shared VM structure.
ppTemplate Where to store the template pointer on success.
pfnCompleted The completion callback routine.
pvUser2 The 2nd user argument for the callback.
pszDesc Description.
Destroys the specified async completion template.

Returns:
VBox status codes:
Return values:
VINF_SUCCESS on success.
VERR_PDM_ASYNC_TEMPLATE_BUSY if the template is still in use.
Parameters:
pTemplate The template in question.
Destroys all the specified async completion templates for the given device instance.

Returns:
VBox status codes:
Return values:
VINF_SUCCESS on success.
VERR_PDM_ASYNC_TEMPLATE_BUSY if one or more of the templates are still in use.
Parameters:
pVM Pointer to the shared VM structure.
pDevIns The device instance.
Destroys all the specified async completion templates for the given driver instance.

Returns:
VBox status codes:
Return values:
VINF_SUCCESS on success.
VERR_PDM_ASYNC_TEMPLATE_BUSY if one or more of the templates are still in use.
Parameters:
pVM Pointer to the shared VM structure.
pDrvIns The driver instance.
Destroys all the specified async completion templates for the given USB device instance.

Returns:
VBox status codes:
Return values:
VINF_SUCCESS on success.
VERR_PDM_ASYNC_TEMPLATE_BUSY if one or more of the templates are still in use.
Parameters:
pVM Pointer to the shared VM structure.
pUsbIns The USB device instance.
Opens a file as a async completion endpoint.

Returns:
VBox status code.
Parameters:
ppEndpoint Where to store the opaque endpoint handle on success.
pszFilename Path to the file which is to be opened. (UTF-8)
fFlags Open flags, see grp_pdmacep_file_flags.
pTemplate Handle to the completion callback template to use for this end point.
Creates a read task on the given endpoint.

Returns:
VBox status code.
Parameters:
pEndpoint The file endpoint to read from.
off Where to start reading from.
paSegments Scatter gather list to store the data in.
cSegments Number of segments in the list.
cbRead The overall number of bytes to read.
pvUser Opaque user data returned in the completion callback upon completion of the task.
ppTask Where to store the task handle on success.
Creates a write task on the given endpoint.

Returns:
VBox status code.
Parameters:
pEndpoint The file endpoint to write to.
off Where to start writing at.
paSegments Scatter gather list of the data to write.
cSegments Number of segments in the list.
cbWrite The overall number of bytes to write.
pvUser Opaque user data returned in the completion callback upon completion of the task.
ppTask Where to store the task handle on success.
Creates a flush task on the given endpoint.

Every read and write task initiated before the flush task is finished upon completion of this task.

Returns:
VBox status code.
Parameters:
pEndpoint The file endpoint to flush.
pvUser Opaque user data returned in the completion callback upon completion of the task.
ppTask Where to store the task handle on success.
Queries the size of an endpoint. Not that some endpoints may not support this and will return an error (sockets for example).

Returns:
VBox status code.
Return values:
VERR_NOT_SUPPORTED if the endpoint does not support this operation.
Parameters:
pEndpoint The file endpoint.
pcbSize Where to store the size of the endpoint.
Cancels a async completion task.

If you want to use this method, you have to take great create to make sure you will never attempt cancel a task which has been completed. Since there is no reference counting or anything on the task it self, you have to serialize the cancelation and completion paths such that the aren't racing one another.

Returns:
VBox status code
Parameters:
pTask The Task to cancel.
Constructs the configuration for the VM.

Returns:
VBox status code.
Parameters:
pVM Pointer to VM which configuration has not yet been loaded.
pfnCFGMConstructor Pointer to callback function for constructing the VM configuration tree. This is called in the EM.
pvUser The user argument passed to pfnCFGMConstructor. EMT.
Initializes the CPUM.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Initializes the per-VCPU CPUM.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Terminates the CPUM.

Termination means cleaning up and freeing all resources, the VM it self is at this point powered off or suspended.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Terminates the per-VCPU CPUM.

Termination means cleaning up and freeing all resources, the VM it self is at this point powered off or suspended.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Sets a breakpoint (int 3 based).

Returns:
VBox status code.
Parameters:
pVM The VM handle.
pAddress The address of the breakpoint.
iHitTrigger The hit count at which the breakpoint start triggering. Use 0 (or 1) if it's gonna trigger at once.
iHitDisable The hit count which disables the breakpoint. Use ~(uint64_t) if it's never gonna be disabled.
piBp Where to store the breakpoint id. (optional) Any thread.
Changes the logger group settings.

Returns:
VBox status code.
Parameters:
pVM The VM handle.
pszGroupSettings The group settings string. (VBOX_LOG)
Load debug info, optionally related to a specific module.

Returns:
VBox status.
Parameters:
pVM VM Handle.
pszFilename Path to the file containing the symbol information. This can be the executable image, a flat symbol file of some kind or stripped debug info.
AddressDelta The value to add to the loaded symbols.
pszName Short hand name for the module. If not related to a module specify NULL.
ModuleAddress Address which the image is loaded at. This will be used to reference the module other places in the api. Ignored when pszName is NULL.
cbImage Size of the image. Ignored when pszName is NULL.
Initializes the EM.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Initializes the per-VCPU EM.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Terminates the EM.

Termination means cleaning up and freeing all resources, the VM it self is at this point powered off or suspended.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Terminates the per-VCPU EM.

Termination means cleaning up and freeing all resources, the VM it self is at this point powered off or suspended.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Enables or disables a set of raw-mode execution modes.

Returns:
VINF_SUCCESS on success.

VINF_RESCHEDULE if a rescheduling might be required.

VERR_INVALID_PARAMETER on an invalid enmMode value.

Parameters:
pVM The VM to operate on.
enmMode The execution mode change. The emulation thread.
Initializes the HWACCM.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Initializes the per-VCPU HWACCM.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Initialize VT-x or AMD-V.

Returns:
VBox status code.
Parameters:
pVM The VM handle.
Initializes the IOM.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Initializes the MM members of the UVM.

This is currently only the ring-3 heap.

Returns:
VBox status code.
Parameters:
pUVM Pointer to the user mode VM structure.
Initializes the MM.

MM is managing the virtual address space (among other things) and setup the hypvervisor memory area mapping in the VM structure and the hypvervisor alloc-only-heap. Assuming the current init order and components the hypvervisor memory area looks like this:

  1. VM Structure.
  2. Hypervisor alloc only heap (also call Hypervisor memory region).
  3. Core code.

MM determins the virtual address of the hypvervisor memory area by checking for location at previous run. If that property isn't available it will choose a default starting location, currently 0xa0000000.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Initializes the MM parts which depends on PGM being initialized.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Remarks:
No cleanup necessary since MMR3Term() will be called on failure.
Terminates the MM.

Termination means cleaning up and freeing all resources, the VM it self is at this point powered off or suspended.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Finalizes the HMA mapping.

This is called later during init, most (all) HMA allocations should be done by the time this function is called.

Returns:
VBox status.
Initializes the CSAM.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Initializes the PATM.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Finalizes HMA page attributes.

Returns:
VBox status code.
Parameters:
pVM The VM handle.
Terminates the PATM.

Termination means cleaning up and freeing all resources, the VM it self is at this point powered off or suspended.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
PATM reset callback.

Returns:
VBox status code.
Parameters:
pVM The VM which is reset.
Patch cli/sti pushf/popf instruction block at specified location

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
pInstrGC Guest context point to privileged instruction
pInstrHC Host context point to privileged instruction
uOpcode Instruction opcodee
uOpSize Size of starting instruction
pPatchRec Patch record
Note:
returns failure if patching is not allowed or possible
Replace an instruction with a breakpoint (0xCC), that is handled dynamically in the guest context.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
pInstrGC Guest context point to privileged instruction
pInstrHC Host context point to privileged instruction
pCpu Disassembly CPU structure ptr
pPatch Patch record
Note:
returns failure if patching is not allowed or possible
Mark patch as dirty

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
pPatch Patch record
Note:
returns failure if patching is not allowed or possible
Initializes the PDM part of the UVM.

This doesn't really do much right now but has to be here for the sake of completeness.

Returns:
VBox status code.
Parameters:
pUVM Pointer to the user mode VM structure.
Initializes the PDM.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Creates a async completion template for a device instance.

The template is used when creating new completion tasks.

Returns:
VBox status code.
Parameters:
pVM Pointer to the shared VM structure.
pDevIns The device instance.
ppTemplate Where to store the template pointer on success.
pfnCompleted The completion callback routine.
pszDesc Description.
Initializes a PDM critical section for internal use.

The PDM critical sections are derived from the IPRT critical sections, but works in GC as well.

Returns:
VBox status code.
Parameters:
pVM The VM handle.
pDevIns Device instance.
pCritSect Pointer to the critical section.
pszName The name of the critical section (for statistics). EMT(0)
Register external drivers

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
pfnCallback Driver registration callback
Loads the VMMR0.r0 module early in the init process.

Returns:
VBox status code.
Parameters:
pUVM Pointer to the user mode VM structure.
Queries module information from an PC (eip/rip).

This is typically used to locate a crash address.

Returns:
VBox status code.
Parameters:
pVM VM handle
uPC The program counter (eip/rip) to locate the module for.
pszModName Where to store the module name.
cchModName Size of the module name buffer.
pMod Base address of the module.
pszNearSym1 Name of the closes symbol from below.
cchNearSym1 Size of the buffer pointed to by pszNearSym1.
pNearSym1 The address of pszNearSym1.
pszNearSym2 Name of the closes symbol from below.
cchNearSym2 Size of the buffer pointed to by pszNearSym2.
pNearSym2 The address of pszNearSym2.
Create a queue with a device owner.

Returns:
VBox status code.
Parameters:
pVM VM handle.
pDevIns Device instance.
cbItem Size a queue item.
cItems Number of items in the queue.
cMilliesInterval Number of milliseconds between polling the queue. If 0 then the emulation thread will be notified whenever an item arrives.
pfnCallback The consumer function.
fRZEnabled Set if the queue must be usable from RC/R0.
ppQueue Where to store the queue handle on success. Emulation thread only.
Initiates the paging of VM.

Returns:
VBox status code.
Parameters:
pVM Pointer to VM structure.
Initializes the per-VCPU PGM.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Init the PGM bits that rely on VMMR0 and MM to be fully initialized.

The dynamic mapping area will also be allocated and initialized at this time. We could allocate it during PGMR3Init of course, but the mapping wouldn't be allocated at that time preventing us from setting up the page table entries with the dummy page.

Returns:
VBox status code.
Parameters:
pVM VM handle.
Ring-3 init finalizing.

Returns:
VBox status code.
Parameters:
pVM The VM handle.
Converts a R3 pointer to a GC physical address.

Only for the debugger.

Returns:
VBox status code.
Return values:
VINF_SUCCESS on success, *pGCPhys is set.
VERR_INVALID_POINTER if the pointer is not within the GC physical memory.
Parameters:
pVM The VM handle.
R3Ptr The R3 pointer to convert.
pGCPhys Where to store the GC physical address on success.
Register a access handler for a physical range.

Returns:
VBox status code.
Parameters:
pVM VM handle.
enmType Handler type. Any of the PGMPHYSHANDLERTYPE_PHYSICAL* enums.
GCPhys Start physical address.
GCPhysLast Last physical address. (inclusive)
pfnHandlerR3 The R3 handler.
pvUserR3 User argument to the R3 handler.
pszModR0 The R0 handler module. NULL means the default R0 module.
pszHandlerR0 The R0 handler symbol name.
pvUserR0 User argument to the R0 handler.
pszModRC The RC handler module. NULL means the default RC module.
pszHandlerRC The RC handler symbol name.
pvUserRC User argument to the RC handler. Values less than 0x10000 will not be relocated.
pszDesc Pointer to description string. This must not be freed.
Creates a page table based mapping in GC.

Returns:
VBox status code.
Parameters:
pVM VM Handle.
GCPtr Virtual Address. (Page table aligned!)
cb Size of the range. Must be a 4MB aligned!
fFlags PGMR3MAPPT_FLAGS_UNMAPPABLE or 0.
pfnRelocate Relocation callback function.
pvUser User argument to the callback.
pszDesc Pointer to description string. This must not be freed.
Grows the shadow page pool.

I.e. adds more pages to it, assuming that hasn't reached cMaxPages yet.

Returns:
VBox status code.
Parameters:
pVM The VM handle.
Initializes the SELM.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Finalizes HMA page attributes.

Returns:
VBox status code.
Parameters:
pVM The VM handle.
Terminates the SELM.

Termination means cleaning up and freeing all resources, the VM it self is at this point powered off or suspended.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Initializes the STAM.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Registers a sample with the statistics mamanger.

Statistics are maintained on a per VM basis and is normally registered during the VM init stage, but there is nothing preventing you from register them at runtime.

Use STAMR3Deregister() to deregister statistics at runtime, however do not bother calling at termination time.

It is not possible to register the same sample twice.

Returns:
VBox status.
Parameters:
pUVM Pointer to the user mode VM structure.
pvSample Pointer to the sample.
enmType Sample type. This indicates what pvSample is pointing at.
enmVisibility Visibility type specifying whether unused statistics should be visible or not.
pszName Sample name. The name is on this form "/<component>/<sample>". Further nesting is possible.
enmUnit Sample unit.
pszDesc Sample description.
Initializes the TM.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Initializes the per-VCPU TM.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Finalizes the TM initialization.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Initializes the Trap Manager

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Do global VMM init.

Returns:
VBox status code.
Creates a virtual machine by calling the supplied configuration constructor.

On successful returned the VM is powered, i.e. VMR3PowerOn() should be called to start the execution.

Returns:
0 on success.

VBox error code on failure.

Parameters:
cCPUs Number of virtual CPUs for the new VM.
pfnVMAtError Pointer to callback function for setting VM errors. This was added as an implicit call to VMR3AtErrorRegister() since there is no way the caller can get to the VM handle early enough to do this on its own. This is called in the context of an EMT.
pvUserVM The user argument passed to pfnVMAtError.
pfnCFGMConstructor Pointer to callback function for constructing the VM configuration tree. This is called in the context of an EMT0.
pvUserCFGM The user argument passed to pfnCFGMConstructor.
ppVM Where to store the 'handle' of the created VM.
Initializes the VMM.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Initializes the per-VCPU VMM.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Ring-3 init finalizing.

Returns:
VBox status code.
Parameters:
pVM The VM handle.
Initializes the R0 VMM.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Initializes the RC VMM.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Terminate the VMM bits.

Returns:
VINF_SUCCESS.
Parameters:
pVM The VM handle.
Terminates the per-VCPU VMM.

Termination means cleaning up and freeing all resources, the VM it self is at this point powered off or suspended.

Returns:
VBox status code.
Parameters:
pVM The VM to operate on.
Allocate and queue a call request.

If it's desired to poll on the completion of the request set cMillies to 0 and use VMR3ReqWait() to check for completation. In the other case use RT_INDEFINITE_WAIT. The returned request packet must be freed using VMR3ReqFree().

Returns:
VBox status code. Will not return VERR_INTERRUPTED.

VERR_TIMEOUT if cMillies was reached without the packet being completed.

Parameters:
pVM The VM handle.
idDstCpu The destination CPU(s). Either a specific CPU ID or one of the following special values: VMCPUID_ANY, VMCPUID_ANY_QUEUE, VMCPUID_ALL or VMCPUID_ALL_REVERSE.
ppReq Where to store the pointer to the request. This will be NULL or a valid request pointer not matter what happends.
cMillies Number of milliseconds to wait for the request to be completed. Use RT_INDEFINITE_WAIT to only wait till it's completed.
pfnFunction Pointer to the function to call.
cArgs Number of arguments following in the ellipsis. Not possible to pass 64-bit arguments!
... Function arguments.

Todo:
How to test for the 40 bits support? Long mode seems to be the test criterium.

Definition at line 249 of file CPUM.cpp.

{
    LogFlow(("CPUMR3InitCPU\n"));
    return VINF_SUCCESS;
}


Generated by  Doxygen 1.6.0   Back to index