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

vm.h File Reference


Detailed Description

VM - The Virtual Machine, data. (VMM)

Definition in file vm.h.

#include <VBox/cdefs.h>
#include <VBox/types.h>
#include <VBox/cpum.h>
#include <VBox/stam.h>
#include <VBox/vmapi.h>
#include <VBox/sup.h>
#include <VBox/vmm.h>

Go to the source code of this file.

Classes

struct  VM
struct  VMCPU

Defines

#define VM_ASSERT_EMT(pVM)
#define VM_ASSERT_EMT_RETURN(pVM, rc)
#define VM_ASSERT_OTHER_THREAD(pVM)   AssertMsg(!VM_IS_EMT(pVM), ("Not other thread!!\n"))
#define VM_ASSERT_STATE(pVM, _enmState)
#define VM_ASSERT_STATE_RETURN(pVM, _enmState, rc)
#define VM_ASSERT_VALID_EXT_RETURN(pVM, rc)
#define VM_FF_CLEAR(pVM, fFlag)   ASMAtomicAndU32(&(pVM)->fGlobalForcedActions, ~(fFlag))
#define VM_FF_IS_PENDING_EXCEPT(pVM, fFlags, fExcpt)   ( ((pVM)->fGlobalForcedActions & (fFlags)) && !((pVM)->fGlobalForcedActions & (fExcpt)) )
#define VM_FF_ISPENDING(pVM, fFlags)   ((pVM)->fGlobalForcedActions & (fFlags))
#define VM_FF_ISSET(pVM, fFlag)   (((pVM)->fGlobalForcedActions & (fFlag)) == (fFlag))
#define VM_FF_SET(pVM, fFlag)   ASMAtomicOrU32(&(pVM)->fGlobalForcedActions, (fFlag))
#define VM_FF_TESTANDCLEAR(pVM, iBit)   (ASMAtomicBitTestAndClear(&(pVM)->fGlobalForcedActions, iBit##_BIT))
#define VM_IS_EMT(pVM)   (VMMGetCpu(pVM) != NULL)
#define VM_REM_SIZE   0x11100
#define VMCPU_ASSERT_EMT(pVCpu)
#define VMCPU_ASSERT_EMT_RETURN(pVCpu, rc)
#define VMCPU_ASSERT_VALID_EXT_RETURN(pVCpu, rc)
#define VMCPU_FF_CLEAR(pVCpu, fFlag)   ASMAtomicAndU32(&(pVCpu)->fLocalForcedActions, ~(fFlag))
#define VMCPU_FF_IS_PENDING_EXCEPT(pVCpu, fFlags, fExcpt)   ( ((pVCpu)->fLocalForcedActions & (fFlags)) && !((pVCpu)->fLocalForcedActions & (fExcpt)) )
#define VMCPU_FF_ISPENDING(pVCpu, fFlags)   ((pVCpu)->fLocalForcedActions & (fFlags))
#define VMCPU_FF_ISSET(pVCpu, fFlag)   (((pVCpu)->fLocalForcedActions & (fFlag)) == (fFlag))
#define VMCPU_FF_SET(pVCpu, fFlag)   ASMAtomicOrU32(&(pVCpu)->fLocalForcedActions, (fFlag))
#define VMCPU_FF_TESTANDCLEAR(pVCpu, iBit)   (ASMAtomicBitTestAndClear(&(pVCpu)->fLocalForcedActions, iBit##_BIT))
#define VMCPU_IS_EMT(pVCpu)   ((pVCpu) && ((pVCpu) == VMMGetCpu((pVCpu)->CTX_SUFF(pVM))))
#define VMMGC_MAIN_MODULE_NAME   "VMMGC.gc"
#define VMMR0_MAIN_MODULE_NAME   "VMMR0.r0"
#define VM_FF_ALL_BUT_RAW_MASK   (~(VM_FF_HIGH_PRIORITY_PRE_RAW_MASK) | VM_FF_PGM_NO_MEMORY)
#define VM_FF_ALL_MASK   (~0U)
#define VM_FF_DBGF   RT_BIT_32(VM_FF_DBGF_BIT)
#define VM_FF_DBGF_BIT   8
#define VM_FF_DEBUG_SUSPEND   RT_BIT_32(31)
#define VM_FF_EMT_RENDEZVOUS   RT_BIT_32(VM_FF_EMT_RENDEZVOUS_BIT)
#define VM_FF_EMT_RENDEZVOUS_BIT   12
#define VM_FF_EXTERNAL_HALTED_MASK   (VM_FF_TERMINATE | VM_FF_DBGF | VM_FF_REQUEST | VM_FF_PDM_QUEUES | VM_FF_PDM_DMA | VM_FF_EMT_RENDEZVOUS)
#define VM_FF_EXTERNAL_SUSPENDED_MASK   (VM_FF_TERMINATE | VM_FF_DBGF | VM_FF_REQUEST | VM_FF_EMT_RENDEZVOUS)
#define VM_FF_HIGH_PRIORITY_POST_MASK   (VM_FF_PGM_NO_MEMORY)
#define VM_FF_HIGH_PRIORITY_PRE_MASK
#define VM_FF_HIGH_PRIORITY_PRE_RAW_MASK   (VM_FF_PGM_NEED_HANDY_PAGES | VM_FF_PGM_NO_MEMORY)
#define VM_FF_HWACCM_TO_R3_MASK   (VM_FF_TM_VIRTUAL_SYNC | VM_FF_PGM_NEED_HANDY_PAGES | VM_FF_PGM_NO_MEMORY | VM_FF_PDM_QUEUES)
#define VM_FF_NORMAL_PRIORITY_MASK   (VM_FF_REQUEST | VM_FF_PDM_QUEUES | VM_FF_PDM_DMA | VM_FF_REM_HANDLER_NOTIFY | VM_FF_EMT_RENDEZVOUS)
#define VM_FF_NORMAL_PRIORITY_POST_MASK   (VM_FF_TERMINATE | VM_FF_DBGF | VM_FF_RESET | VM_FF_PGM_NO_MEMORY | VM_FF_EMT_RENDEZVOUS)
#define VM_FF_PDM_DMA   RT_BIT_32(VM_FF_PDM_DMA_BIT)
#define VM_FF_PDM_DMA_BIT   4
#define VM_FF_PDM_QUEUES   RT_BIT_32(VM_FF_PDM_QUEUES_BIT)
#define VM_FF_PDM_QUEUES_BIT   3
#define VM_FF_PGM_NEED_HANDY_PAGES   RT_BIT_32(18)
#define VM_FF_PGM_NO_MEMORY   RT_BIT_32(19)
#define VM_FF_REM_HANDLER_NOTIFY   RT_BIT_32(VM_FF_REM_HANDLER_NOTIFY_BIT)
#define VM_FF_REM_HANDLER_NOTIFY_BIT   29
#define VM_FF_REQUEST   RT_BIT_32(9)
#define VM_FF_RESET   RT_BIT_32(VM_FF_RESET_BIT)
#define VM_FF_RESET_BIT   11
#define VM_FF_TERMINATE   RT_BIT_32(10)
#define VM_FF_TM_VIRTUAL_SYNC   RT_BIT_32(2)
#define VMCPU_FF_ALL_BUT_RAW_MASK   (~(VMCPU_FF_HIGH_PRIORITY_PRE_RAW_MASK | VMCPU_FF_CSAM_PENDING_ACTION | VMCPU_FF_PDM_CRITSECT))
#define VMCPU_FF_ALL_MASK   (~0U)
#define VMCPU_FF_CSAM_PENDING_ACTION   RT_BIT_32(27)
#define VMCPU_FF_CSAM_SCAN_PAGE   RT_BIT_32(26)
#define VMCPU_FF_EXTERNAL_HALTED_MASK   (VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_INTERRUPT_PIC | VMCPU_FF_REQUEST | VMCPU_FF_TIMER)
#define VMCPU_FF_EXTERNAL_SUSPENDED_MASK   (VMCPU_FF_REQUEST)
#define VMCPU_FF_HIGH_PRIORITY_POST_MASK   (VMCPU_FF_PDM_CRITSECT|VMCPU_FF_CSAM_PENDING_ACTION)
#define VMCPU_FF_HIGH_PRIORITY_PRE_MASK
#define VMCPU_FF_HIGH_PRIORITY_PRE_RAW_MASK
#define VMCPU_FF_HWACCM_TO_R3_MASK   (VMCPU_FF_TO_R3 | VMCPU_FF_TIMER)
#define VMCPU_FF_INHIBIT_INTERRUPTS   RT_BIT_32(24)
#define VMCPU_FF_INTERRUPT_APIC   RT_BIT_32(0)
#define VMCPU_FF_INTERRUPT_NMI   RT_BIT_32(VMCPU_FF_INTERRUPT_NMI_BIT)
#define VMCPU_FF_INTERRUPT_NMI_BIT   3
#define VMCPU_FF_INTERRUPT_PIC   RT_BIT_32(1)
#define VMCPU_FF_INTERRUPT_SMI   RT_BIT_32(VMCPU_FF_INTERRUPT_SMI_BIT)
#define VMCPU_FF_INTERRUPT_SMI_BIT   4
#define VMCPU_FF_NORMAL_PRIORITY_MASK   (VMCPU_FF_REQUEST)
#define VMCPU_FF_NORMAL_PRIORITY_POST_MASK   (VMCPU_FF_CSAM_SCAN_PAGE)
#define VMCPU_FF_PDM_CRITSECT   RT_BIT_32(5)
#define VMCPU_FF_PGM_SYNC_CR3   RT_BIT_32(16)
#define VMCPU_FF_PGM_SYNC_CR3_NON_GLOBAL   RT_BIT_32(17)
#define VMCPU_FF_REQUEST   RT_BIT_32(9)
#define VMCPU_FF_RESUME_GUEST_MASK   (VMCPU_FF_TO_R3)
#define VMCPU_FF_SELM_SYNC_GDT   RT_BIT_32(22)
#define VMCPU_FF_SELM_SYNC_LDT   RT_BIT_32(23)
#define VMCPU_FF_SELM_SYNC_TSS   RT_BIT_32(21)
#define VMCPU_FF_TIMER   RT_BIT_32(2)
#define VMCPU_FF_TLB_FLUSH   RT_BIT_32(VMCPU_FF_TLB_FLUSH_BIT)
#define VMCPU_FF_TLB_FLUSH_BIT   19
#define VMCPU_FF_TLB_SHOOTDOWN   RT_BIT_32(18)
#define VMCPU_FF_TO_R3   RT_BIT_32(28)
#define VMCPU_FF_TRPM_SYNC_IDT   RT_BIT_32(20)
Operations on VMCPU::enmState
#define VMCPU_ASSERT_STATE(pVCpu, enmExpectedState)
#define VMCPU_CMPXCHG_STATE(pVCpu, enmNewState, enmOldState)   ASMAtomicCmpXchgU32((uint32_t volatile *)&(pVCpu)->enmState, (enmNewState), (enmOldState))
#define VMCPU_GET_STATE(pVCpu)   ( (pVCpu)->enmState )
#define VMCPU_SET_STATE(pVCpu, enmNewState)   ASMAtomicWriteU32((uint32_t volatile *)&(pVCpu)->enmState, (enmNewState))
#define VMCPUSTATE_IS_STARTED(enmState)   ( (enmState) > VMCPUSTATE_STOPPED )
#define VMCPUSTATE_IS_STOPPED(enmState)   ( (enmState) == VMCPUSTATE_STOPPED )

Enumerations

enum  VMCPUSTATE {
  VMCPUSTATE_INVALID = 0, VMCPUSTATE_STOPPED, VMCPUSTATE_STARTED, VMCPUSTATE_STARTED_EXEC,
  VMCPUSTATE_STARTED_EXEC_REM, VMCPUSTATE_STARTED_HALTED, VMCPUSTATE_END, VMCPUSTATE_32BIT_HACK = 0x7fffffff
}


Generated by  Doxygen 1.6.0   Back to index