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

cpum.h File Reference


Detailed Description

CPUM - CPU Monitor(/ Manager). (VMM)

Definition in file cpum.h.

#include <VBox/cdefs.h>
#include <VBox/types.h>
#include <VBox/x86.h>

Go to the source code of this file.

Classes

struct  CPUMCPUID
struct  CPUMCTX
struct  CPUMCTX_VER1_6
struct  CPUMCTXCORE
union  CPUMCTXMSR
struct  CPUMSELREGHID
struct  CPUMSELREGHID_VER1_6
struct  CPUMSYSENTER

Guest Register Setters.

uint32_t addr
uint64_t cr0
uint64_t cr2
uint64_t cr3
uint64_t cr4
uint16_t cs
uint16_t ds
uint32_t eax
uint32_t ebp
uint32_t ebx
uint32_t ecx
uint32_t edi
uint32_t edx
uint32_t eflags
uint32_t eip
CPUMCPUIDFEATURE enmFeature
uint16_t es
uint32_t esi
uint32_t esp
uint16_t fs
uint16_t gs
uint16_t ldtr
uint32_t uint16_t limit
const PCPUMCTX pCtx
uint16_t ss
uint16_t tr
uint64_t uDr0
uint64_t uDr1
uint64_t uDr2
uint64_t uDr3
uint64_t uDr6
uint64_t uDr7
uint64_t val
uint32_t uint64_t Value
 VMMDECL (bool) CPUMGetGuestCpuIdFeature(PVM pVM

Guest Register Getters.

unsigned idMsr
uint32_t iLeaf
unsigned iReg
uint16_t * pcbLimit
uint32_t uint32_t * pEax
uint32_t uint32_t uint32_t * pEbx
uint32_t uint32_t uint32_t
uint32_t * 
pEcx
uint32_t uint32_t uint32_t
uint32_t uint32_t * 
pEdx
PVBOXGDTR pGDTR
PCPUMSELREGHID pHidden
unsigned uint64_t * pValue
unsigned uint64_t valMsr
 VMMDECL (uint32_t) CPUMGetGuestEFlags(PVMCPU pVCpu)
 VMMDECL (int) CPUMGetGuestCRx(PVMCPU pVCpu
 VMMDECL (uint64_t) CPUMGetGuestCR0(PVMCPU pVCpu)
 VMMDECL (RTSEL) CPUMGetGuestTR(PVMCPU pVCpu
 VMMDECL (RTGCPTR) CPUMGetGuestIDTR(PVMCPU pVCpu
 VMMDECL (void) CPUMGetGuestGDTR(PVMCPU pVCpu

Defines

#define CPUMCTX2CORE(pCtx)   ((PCPUMCTXCORE)(void *)&(pCtx)->edi)
Changed flags
These flags are used to keep track of which important register that have been changed since last they were reset. The only one allowed to clear them is REM!

#define CPUM_CHANGED_ALL   (CPUM_CHANGED_FPU_REM|CPUM_CHANGED_CR0|CPUM_CHANGED_CR3|CPUM_CHANGED_CR4|CPUM_CHANGED_GDTR|CPUM_CHANGED_IDTR|CPUM_CHANGED_LDTR|CPUM_CHANGED_TR|CPUM_CHANGED_SYSENTER_MSR|CPUM_CHANGED_HIDDEN_SEL_REGS|CPUM_CHANGED_CPUID)
#define CPUM_CHANGED_CPUID   RT_BIT(11)
#define CPUM_CHANGED_CR0   RT_BIT(1)
#define CPUM_CHANGED_CR3   RT_BIT(4)
#define CPUM_CHANGED_CR4   RT_BIT(2)
#define CPUM_CHANGED_FPU_REM   RT_BIT(0)
#define CPUM_CHANGED_GDTR   RT_BIT(5)
#define CPUM_CHANGED_GLOBAL_TLB_FLUSH   RT_BIT(3)
#define CPUM_CHANGED_HIDDEN_SEL_REGS   RT_BIT(10)
#define CPUM_CHANGED_IDTR   RT_BIT(6)
#define CPUM_CHANGED_LDTR   RT_BIT(7)
#define CPUM_CHANGED_SYSENTER_MSR   RT_BIT(9)
#define CPUM_CHANGED_TR   RT_BIT(8)

Typedefs

typedef const CPUMCPUIDPCCPUMCPUID
typedef const CPUMCTXMSR * PCCPUMCTXMSR
typedef CPUMCPUIDPCPUMCPUID
typedef CPUMCTXMSR * PCPUMCTXMSR

Enumerations

enum  CPUMCPUIDFEATURE {
  CPUMCPUIDFEATURE_INVALID = 0, CPUMCPUIDFEATURE_APIC, CPUMCPUIDFEATURE_SEP, CPUMCPUIDFEATURE_SYSCALL,
  CPUMCPUIDFEATURE_PAE, CPUMCPUIDFEATURE_NXE, CPUMCPUIDFEATURE_LAHF, CPUMCPUIDFEATURE_LONG_MODE,
  CPUMCPUIDFEATURE_PAT, CPUMCPUIDFEATURE_X2APIC, CPUMCPUIDFEATURE_RDTSCP, CPUMCPUIDFEATURE_32BIT_HACK = 0x7fffffff
}
enum  CPUMCPUVENDOR {
  CPUMCPUVENDOR_INVALID = 0, CPUMCPUVENDOR_INTEL, CPUMCPUVENDOR_AMD, CPUMCPUVENDOR_VIA,
  CPUMCPUVENDOR_UNKNOWN, CPUMCPUVENDOR_32BIT_HACK = 0x7fffffff
}
enum  CPUMMODE { CPUMMODE_INVALID = 0, CPUMMODE_REAL, CPUMMODE_PROTECTED, CPUMMODE_LONG }

Functions

 VMMDECL (CPUMMODE) CPUMGetGuestMode(PVMCPU pVCpu)
 VMMDECL (unsigned) CPUMGetAndClearChangedFlagsREM(PVMCPU pVCpu)
 VMMDECL (PCPUMCTX) CPUMQueryGuestCtxPtr(PVMCPU pVCpu)
 VMMDECL (PCCPUMCTXCORE) CPUMGetHyperCtxCore(PVMCPU pVCpu)
Misc Guest Predicate Functions.
 DECLINLINE (bool) CPUMIsGuestInRealMode(PVMCPU pVCpu)
 VMMDECL (RTGCUINTREG) CPUMGetHyperDR0(PVMCPU pVCpu)
 VMMDECL (CPUMCPUVENDOR) CPUMGetCPUVendor(PVM pVM)

Variables

uint32_t fChangedFlags
PCPUMCTXCORE pCtxCore
PCPUMCTXppCtx
uint32_t u32
Hypervisor Register Setters.
uint32_t Efl
RTSEL SelCS
RTSEL SelDS
RTSEL SelLDTR
RTSEL SelSS
RTSEL SelTR
uint32_t u32EIP
uint32_t u32ESP
GC Device Helpers
PCPUMCTXCORE int rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvMouseQueue)


Generated by  Doxygen 1.6.0   Back to index