cpum.h revision 6cac05f856d982151579a9d445a109960c2c07d2
1472N/A * CPUM - CPU Monitor(/ Manager). 342N/A * Copyright (C) 2006-2012 Oracle Corporation 342N/A * This file is part of VirtualBox Open Source Edition (OSE), as 342N/A * you can redistribute it and/or modify it under the terms of the GNU 342N/A * General Public License (GPL) as published by the Free Software 342N/A * Foundation, in version 2 as it comes in the "COPYING" file of the 342N/A * VirtualBox OSE distribution. VirtualBox OSE is distributed in the 342N/A * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 342N/A * The contents of this file may alternatively be used under the terms 342N/A * of the Common Development and Distribution License Version 1.0 342N/A * (CDDL) only, as it comes in the "COPYING.CDDL" file of the 1472N/A * VirtualBox OSE distribution, in which case the provisions of the 1472N/A * CDDL are applicable instead of those of the GPL. 342N/A * You may elect to license modified versions of this file under the 342N/A * terms and conditions of either the GPL or the CDDL or both. 342N/A/** @defgroup grp_cpum The CPU Monitor / Manager API 752N/A * CPUID feature to set or clear. 342N/A /** The APIC feature bit. (Std+Ext) */ 342N/A /** The PAE feature bit. (Std+Ext) */ 342N/A /** The NX feature bit. (Ext) */ 342N/A /** The LONG MODE feature bit. (Ext) */ 342N/A /** The PAT feature bit. (Std+Ext) */ 1638N/A /** The x2APIC feature bit. (Std) */ 342N/A /** The RDTSCP feature bit. (Ext) */ 342N/A /** The Hypervisor Present bit. (Std) */ 342N/A /** 32bit hackishness. */ 342N/A /** 32bit hackishness. */ 342N/A/** @name Guest Register Getters. /** @name Guest Register Setters. /** @name Misc Guest Predicate Functions. * Tests if the guest is running in real mode or not. * @returns true if in real mode, otherwise false. * @param pCtx Current CPU context * Tests if the guest is running in real or virtual 8086 mode. * @returns @c true if it is, @c false if not. * @param pCtx Current CPU context ||
pCtx->
eflags.
Bits.
u1VM;
/* Cannot be set in long mode. Intel spec 2.3.1 "System Flags and Fields in IA-32e Mode". */ * Tests if the guest is running in virtual 8086 mode. * @returns @c true if it is, @c false if not. * @param pCtx Current CPU context * Tests if the guest is running in paged protected or not. * @returns true if in paged protected mode, otherwise false. * @param pVM The VM handle. * Tests if the guest is running in long mode or not. * @returns true if in long mode, otherwise false. * @param pCtx Current CPU context * Tests if the guest is running in 64 bits mode or not. * @returns true if in 64 bits protected mode, otherwise false. * @param pVCpu The current virtual CPU. * @param pCtx Current CPU context * Tests if the guest has paging enabled or not. * @returns true if paging is enabled, otherwise false. * @param pCtx Current CPU context * Tests if the guest is running in PAE mode or not. * @returns true if in PAE mode, otherwise false. * @param pCtx Current CPU context #
endif /* VBOX_WITHOUT_UNNAMED_UNIONS *//** @name Hypervisor Register Getters. #
if 0
/* these are not correct. *//** This register is only saved on fatal traps. */ /** This register is only saved on fatal traps. */ /** This register is only saved on fatal traps. */ /** @name Hypervisor Register Setters. * These flags are used to keep track of which important register that * have been changed since last they were reset. The only one allowed /** @defgroup grp_cpum_r3 The CPU Monitor(/Manager) API /** @defgroup grp_cpum_gc The CPU Monitor(/Manager) API * Assumes a trap stack frame has already been setup on the guest's stack! * This function does not return! * @param selCS Code selector of handler * @param pHandler GC virtual address of handler * @param eflags Callee's EFLAGS * @param selSS Stack selector for handler * @param pEsp Stack address for handler * Call guest V86 code directly. * This function does not return! /** @defgroup grp_cpum_r0 The CPU Monitor(/Manager) API