types.h revision 5835c306f653aa74c80f79f84a32451fe0ba37c0
/** @file
* VirtualBox - Types.
*/
/*
* Copyright (C) 2006-2007 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*
* The contents of this file may alternatively be used under the terms
* of the Common Development and Distribution License Version 1.0
* (CDDL) only, as it comes in the "COPYING.CDDL" file of the
* VirtualBox OSE distribution, in which case the provisions of the
* CDDL are applicable instead of those of the GPL.
*
* You may elect to license modified versions of this file under the
* terms and conditions of either the GPL or the CDDL or both.
*/
#ifndef ___VBox_types_h
#define ___VBox_types_h
/** @defgroup grp_types Basic VBox Types
* @{
*/
/** @defgroup grp_types_both Common Guest and Host Context Basic Types
* @ingroup grp_types
* @{
*/
/** @defgroup grp_types_hc Host Context Basic Types
* @ingroup grp_types_both
* @{
*/
/** @} */
/** @defgroup grp_types_gc Guest Context Basic Types
* @ingroup grp_types_both
* @{
*/
/** @} */
/** Pointer to per support driver session data.
* (The data is a R0 entity and private to the the R0 SUP part. All
* other should consider this a sort of handle.) */
/** Pointer to a VM. */
/** Pointer to a VM - Ring-0 Ptr. */
/** Pointer to a VM - Ring-3 Ptr. */
/** Pointer to a VM - RC Ptr. */
/** Pointer to a virtual CPU structure. */
/** Pointer to a virtual CPU structure - Ring-3 Ptr. */
/** Pointer to a virtual CPU structure - Ring-0 Ptr. */
/** Pointer to a virtual CPU structure - RC Ptr. */
/** Pointer to a ring-0 (global) VM structure. */
/** Pointer to a ring-3 (user mode) VM structure. */
/** Pointer to a ring-3 (user mode) VMCPU structure. */
/** Virtual CPU ID. */
/** Pointer to a virtual CPU ID. */
/** @name Special CPU ID values.
* Most of these are for request scheduling.
*
* @{ */
/** All virtual CPUs. */
/** All virtual CPUs, descending order. */
/** Any virtual CPU.
* Intended for scheduling a VM request or some other task. */
/** Any virtual CPU; always queue for future execution.
* Intended for scheduling a VM request or some other task. */
/** The NIL value. */
/** @} */
/**
* Virtual CPU set.
*/
typedef struct VMCPUSET
{
/** The bitmap data. */
} VMCPUSET;
/** Pointer to a Virtual CPU set. */
/** Pointer to a const Virtual CPU set. */
typedef VMCPUSET const *PCVMCPUSET;
/**
* VM State
*/
typedef enum VMSTATE
{
/** The VM is being created. */
VMSTATE_CREATING = 0,
/** The VM is created. */
/** The VM state is being loaded from file. */
/** The VM is being powered on */
/** The VM is being resumed. */
/** The VM is runnning. */
/** Live save: The VM is running and the state is being saved. */
/** Fault Tolerance: The VM is running and the state is being synced. */
/** The VM is being reset. */
/** Live save: The VM is being reset and immediately suspended. */
/** The VM is being suspended. */
/** Live save: The VM is being suspended during a live save operation, either as
* part of the normal flow or VMR3Reset. */
/** Live save: The VM is being suspended by VMR3Suspend during live save. */
/** The VM is suspended. */
/** Live save: The VM has been suspended and is waiting for the live save
* operation to move on. */
/** Live save: The VM has been suspended by VMR3Suspend during a live save. */
/** The VM is suspended and its state is being saved by EMT(0). (See SSM) */
/** The VM is being debugged. (See DBGF.) */
/** Live save: The VM is being debugged while the live phase is going on. */
/** The VM is being powered off. */
/** Live save: The VM is being powered off and the save cancelled. */
/** The VM is switched off, awaiting destruction. */
/** Live save: Waiting for cancellation and transition to VMSTATE_OFF. */
/** The VM is powered off because of a fatal error. */
/** Live save: Waiting for cancellation and transition to FatalError. */
/** The VM is in guru meditation over a fatal failure. */
/** Live save: Waiting for cancellation and transition to GuruMeditation. */
/** The VM is screwed because of a failed state loading. */
/** The VM is being destroyed. */
/** Terminated. */
/** hack forcing the size of the enum to 32-bits. */
VMSTATE_MAKE_32BIT_HACK = 0x7fffffff
} VMSTATE;
/** @def VBOXSTRICTRC_STRICT_ENABLED
* Indicates that VBOXSTRICTRC is in strict mode.
*/
#if defined(__cplusplus) \
&& !defined(_MSC_VER) /* trouble similar to 32-bit gcc. */ \
&& ( defined(RT_STRICT) \
|| defined(VBOX_STRICT) \
|| defined(DEBUG) \
|| defined(DOXYGEN_RUNNING) )
# define VBOXSTRICTRC_STRICT_ENABLED 1
# ifdef _MSC_VER
# endif
#endif
/** We need RTERR_STRICT_RC. */
#if defined(VBOXSTRICTRC_STRICT_ENABLED) && !defined(RTERR_STRICT_RC)
# define RTERR_STRICT_RC 1
#endif
/**
* Strict VirtualBox status code.
*
* This is normally an 32-bit integer and the only purpose of the type is to
* highlight the special handling that is required. But in strict build it is a
* class that causes compilation and runtime errors for some of the incorrect
* handling.
*/
#ifdef VBOXSTRICTRC_STRICT_ENABLED
struct VBOXSTRICTRC
{
/** The status code. */
/** Default constructor setting the status to VERR_IPE_UNINITIALIZED_STATUS. */
#else
#endif
{
}
/** Constructor for normal integer status codes. */
{
}
/** Getter that VBOXSTRICTRC_VAL can use. */
/** @name Comparison operators
* @{ */
/** @} */
/** Special automatic cast for RT_SUCCESS_NP. */
/** @name Constructors that will prevent some of the bad types.
* @{ */
/** @} */
};
#else
typedef int32_t VBOXSTRICTRC;
#endif
/** @def VBOXSTRICTRC_VAL
* Explicit getter.
* @param rcStrict The strict VirtualBox status code.
*/
#ifdef VBOXSTRICTRC_STRICT_ENABLED
#else
#endif
/** @def VBOXSTRICTRC_TODO
* Returns that needs dealing with.
* @param rcStrict The strict VirtualBox status code.
*/
/** Pointer to a PDM Base Interface. */
/** Pointer to a pointer to a PDM Base Interface. */
typedef PPDMIBASE *PPPDMIBASE;
/** Pointer to a PDM Device Instance. */
typedef struct PDMDEVINS *PPDMDEVINS;
/** Pointer to a pointer to a PDM Device Instance. */
typedef PPDMDEVINS *PPPDMDEVINS;
/** R3 pointer to a PDM Device Instance. */
/** R0 pointer to a PDM Device Instance. */
/** RC pointer to a PDM Device Instance. */
/** Pointer to a PDM USB Device Instance. */
typedef struct PDMUSBINS *PPDMUSBINS;
/** Pointer to a pointer to a PDM USB Device Instance. */
typedef PPDMUSBINS *PPPDMUSBINS;
/** Pointer to a PDM Driver Instance. */
typedef struct PDMDRVINS *PPDMDRVINS;
/** Pointer to a pointer to a PDM Driver Instance. */
typedef PPDMDRVINS *PPPDMDRVINS;
/** R3 pointer to a PDM Driver Instance. */
/** R0 pointer to a PDM Driver Instance. */
/** RC pointer to a PDM Driver Instance. */
/** Pointer to a PDM Service Instance. */
typedef struct PDMSRVINS *PPDMSRVINS;
/** Pointer to a pointer to a PDM Service Instance. */
typedef PPDMSRVINS *PPPDMSRVINS;
/** Pointer to a PDM critical section. */
typedef union PDMCRITSECT *PPDMCRITSECT;
/** Pointer to a const PDM critical section. */
typedef const union PDMCRITSECT *PCPDMCRITSECT;
/** R3 pointer to a timer. */
/** Pointer to a R3 pointer to a timer. */
typedef PTMTIMERR3 *PPTMTIMERR3;
/** R0 pointer to a timer. */
/** Pointer to a R3 pointer to a timer. */
typedef PTMTIMERR0 *PPTMTIMERR0;
/** RC pointer to a timer. */
/** Pointer to a RC pointer to a timer. */
typedef PTMTIMERRC *PPTMTIMERRC;
/** Pointer to a timer. */
/** Pointer to a pointer to a timer. */
/** SSM Operation handle. */
typedef struct SSMHANDLE *PSSMHANDLE;
/** Pointer to a const SSM stream method table. */
typedef struct SSMSTRMOPS const *PCSSMSTRMOPS;
/** Pointer to a CPUMCTX. */
/** Pointer to a const CPUMCTX. */
/** Pointer to a CPU context core. */
typedef struct CPUMCTXCORE *PCPUMCTXCORE;
/** Pointer to a const CPU context core. */
typedef const struct CPUMCTXCORE *PCCPUMCTXCORE;
/** Pointer to selector hidden registers. */
typedef struct CPUMSELREGHID *PCPUMSELREGHID;
/** Pointer to const selector hidden registers. */
typedef const struct CPUMSELREGHID *PCCPUMSELREGHID;
/** @} */
/** @defgroup grp_types_idt Interrupt Descriptor Table Entry.
* @ingroup grp_types
* @todo This all belongs in x86.h!
* @{ */
/** @todo VBOXIDT -> VBOXDESCIDT, skip the complex variations. We'll never use them. */
/** IDT Entry, Task Gate view. */
typedef struct VBOXIDTE_TASKGATE
{
/** Reserved. */
unsigned u16Reserved1 : 16;
/** Task Segment Selector. */
unsigned u16TSS : 16;
/** More reserved. */
unsigned u8Reserved2 : 8;
/** Fixed value bit 0 - Set to 1. */
unsigned u1Fixed0 : 1;
/** Busy bit. */
unsigned u1Busy : 1;
/** Fixed value bit 2 - Set to 1. */
unsigned u1Fixed1 : 1;
/** Fixed value bit 3 - Set to 0. */
unsigned u1Fixed2 : 1;
/** Fixed value bit 4 - Set to 0. */
unsigned u1Fixed3 : 1;
/** Descriptor Privilege level. */
unsigned u2DPL : 2;
/** Present flag. */
unsigned u1Present : 1;
/** Reserved. */
unsigned u16Reserved3 : 16;
#pragma pack()
/** Pointer to IDT Entry, Task gate view. */
typedef VBOXIDTE_TASKGATE *PVBOXIDTE_TASKGATE;
/** IDT Entry, Intertupt gate view. */
typedef struct VBOXIDTE_INTERRUPTGATE
{
/** Low offset word. */
unsigned u16OffsetLow : 16;
/** Segment Selector. */
unsigned u16SegSel : 16;
/** Reserved. */
unsigned u5Reserved2 : 5;
/** Fixed value bit 0 - Set to 0. */
unsigned u1Fixed0 : 1;
/** Fixed value bit 1 - Set to 0. */
unsigned u1Fixed1 : 1;
/** Fixed value bit 2 - Set to 0. */
unsigned u1Fixed2 : 1;
/** Fixed value bit 3 - Set to 0. */
unsigned u1Fixed3 : 1;
/** Fixed value bit 4 - Set to 1. */
unsigned u1Fixed4 : 1;
/** Fixed value bit 5 - Set to 1. */
unsigned u1Fixed5 : 1;
/** Gate size, 1 = 32 bits, 0 = 16 bits. */
unsigned u132BitGate : 1;
/** Fixed value bit 5 - Set to 0. */
unsigned u1Fixed6 : 1;
/** Descriptor Privilege level. */
unsigned u2DPL : 2;
/** Present flag. */
unsigned u1Present : 1;
/** High offset word. */
unsigned u16OffsetHigh : 16;
#pragma pack()
/** Pointer to IDT Entry, Interrupt gate view. */
/** IDT Entry, Trap Gate view. */
typedef struct VBOXIDTE_TRAPGATE
{
/** Low offset word. */
unsigned u16OffsetLow : 16;
/** Segment Selector. */
unsigned u16SegSel : 16;
/** Reserved. */
unsigned u5Reserved2 : 5;
/** Fixed value bit 0 - Set to 0. */
unsigned u1Fixed0 : 1;
/** Fixed value bit 1 - Set to 0. */
unsigned u1Fixed1 : 1;
/** Fixed value bit 2 - Set to 0. */
unsigned u1Fixed2 : 1;
/** Fixed value bit 3 - Set to 1. */
unsigned u1Fixed3 : 1;
/** Fixed value bit 4 - Set to 1. */
unsigned u1Fixed4 : 1;
/** Fixed value bit 5 - Set to 1. */
unsigned u1Fixed5 : 1;
/** Gate size, 1 = 32 bits, 0 = 16 bits. */
unsigned u132BitGate : 1;
/** Fixed value bit 5 - Set to 0. */
unsigned u1Fixed6 : 1;
/** Descriptor Privilege level. */
unsigned u2DPL : 2;
/** Present flag. */
unsigned u1Present : 1;
/** High offset word. */
unsigned u16OffsetHigh : 16;
#pragma pack()
/** Pointer to IDT Entry, Trap Gate view. */
typedef VBOXIDTE_TRAPGATE *PVBOXIDTE_TRAPGATE;
/** IDT Entry Generic view. */
typedef struct VBOXIDTE_GENERIC
{
/** Low offset word. */
unsigned u16OffsetLow : 16;
/** Segment Selector. */
unsigned u16SegSel : 16;
/** Reserved. */
unsigned u5Reserved : 5;
/** IDT Type part one (not used for task gate). */
unsigned u3Type1 : 3;
/** IDT Type part two. */
unsigned u5Type2 : 5;
/** Descriptor Privilege level. */
unsigned u2DPL : 2;
/** Present flag. */
unsigned u1Present : 1;
/** High offset word. */
unsigned u16OffsetHigh : 16;
#pragma pack()
/** Pointer to IDT Entry Generic view. */
typedef VBOXIDTE_GENERIC *PVBOXIDTE_GENERIC;
/** IDT Type1 value. (Reserved for task gate!) */
#define VBOX_IDTE_TYPE1 0
/** IDT Type2 value - Task gate. */
#define VBOX_IDTE_TYPE2_TASK 0x5
/** IDT Type2 value - 16 bit interrupt gate. */
#define VBOX_IDTE_TYPE2_INT_16 0x6
/** IDT Type2 value - 32 bit interrupt gate. */
#define VBOX_IDTE_TYPE2_INT_32 0xe
/** IDT Type2 value - 16 bit trap gate. */
#define VBOX_IDTE_TYPE2_TRAP_16 0x7
/** IDT Type2 value - 32 bit trap gate. */
#define VBOX_IDTE_TYPE2_TRAP_32 0xf
/** IDT Entry. */
typedef union VBOXIDTE
{
/** Task gate view. */
/** Trap gate view. */
/** Interrupt gate view. */
/** Generic IDT view. */
/** 8 bit unsigned integer view. */
/** 16 bit unsigned integer view. */
/** 32 bit unsigned integer view. */
/** 64 bit unsigned integer view. */
} VBOXIDTE;
#pragma pack()
/** Pointer to IDT Entry. */
/** Pointer to IDT Entry. */
typedef VBOXIDTE const *PCVBOXIDTE;
/** IDT Entry, 64-bit mode, Intertupt gate view. */
typedef struct VBOXIDTE64_INTERRUPTGATE
{
/** Low offset word. */
unsigned u16OffsetLow : 16;
/** Segment Selector. */
unsigned u16SegSel : 16;
/** Interrupt Stack Table Index. */
unsigned u3Ist : 3;
/** Fixed value bit 0 - Set to 0. */
unsigned u1Fixed0 : 1;
/** Fixed value bit 1 - Set to 0. */
unsigned u1Fixed1 : 1;
/** Fixed value bit 2 - Set to 0. */
unsigned u1Fixed2 : 1;
/** Fixed value bit 3 - Set to 0. */
unsigned u1Fixed3 : 1;
/** Fixed value bit 4 - Set to 0. */
unsigned u1Fixed4 : 1;
/** Fixed value bit 5 - Set to 0. */
unsigned u1Fixed5 : 1;
/** Fixed value bit 6 - Set to 1. */
unsigned u1Fixed6 : 1;
/** Fixed value bit 7 - Set to 1. */
unsigned u1Fixed7 : 1;
/** Gate size, 1 = 32 bits, 0 = 16 bits. */
unsigned u132BitGate : 1;
/** Fixed value bit 5 - Set to 0. */
unsigned u1Fixed8 : 1;
/** Descriptor Privilege level. */
unsigned u2DPL : 2;
/** Present flag. */
unsigned u1Present : 1;
/** High offset word. */
unsigned u16OffsetHigh : 16;
/** Offset bits 32..63. */
unsigned u32OffsetHigh64;
/** Reserved. */
unsigned u32Reserved;
#pragma pack()
/** Pointer to IDT Entry, 64-bit mode, Interrupt gate view. */
/** IDT Entry, 64-bit mode, Trap gate view. */
typedef struct VBOXIDTE64_TRAPGATE
{
/** Low offset word. */
unsigned u16OffsetLow : 16;
/** Segment Selector. */
unsigned u16SegSel : 16;
/** Interrupt Stack Table Index. */
unsigned u3Ist : 3;
/** Fixed value bit 0 - Set to 0. */
unsigned u1Fixed0 : 1;
/** Fixed value bit 1 - Set to 0. */
unsigned u1Fixed1 : 1;
/** Fixed value bit 2 - Set to 0. */
unsigned u1Fixed2 : 1;
/** Fixed value bit 3 - Set to 0. */
unsigned u1Fixed3 : 1;
/** Fixed value bit 4 - Set to 0. */
unsigned u1Fixed4 : 1;
/** Fixed value bit 5 - Set to 1. */
unsigned u1Fixed5 : 1;
/** Fixed value bit 6 - Set to 1. */
unsigned u1Fixed6 : 1;
/** Fixed value bit 7 - Set to 1. */
unsigned u1Fixed7 : 1;
/** Gate size, 1 = 32 bits, 0 = 16 bits. */
unsigned u132BitGate : 1;
/** Fixed value bit 5 - Set to 0. */
unsigned u1Fixed8 : 1;
/** Descriptor Privilege level. */
unsigned u2DPL : 2;
/** Present flag. */
unsigned u1Present : 1;
/** High offset word. */
unsigned u16OffsetHigh : 16;
/** Offset bits 32..63. */
unsigned u32OffsetHigh64;
/** Reserved. */
unsigned u32Reserved;
#pragma pack()
/** Pointer to IDT Entry, 64-bit mode, Trap gate view. */
typedef VBOXIDTE64_TRAPGATE *PVBOXIDTE64_TRAPGATE;
/** IDT Entry, 64-bit mode, Generic view. */
typedef struct VBOXIDTE64_GENERIC
{
/** Low offset word. */
unsigned u16OffsetLow : 16;
/** Segment Selector. */
unsigned u16SegSel : 16;
/** Reserved. */
unsigned u3Ist : 3;
/** Fixed value bit 0 - Set to 0. */
unsigned u1Fixed0 : 1;
/** Fixed value bit 1 - Set to 0. */
unsigned u1Fixed1 : 1;
/** IDT Type part one (not used for task gate). */
unsigned u3Type1 : 3;
/** IDT Type part two. */
unsigned u5Type2 : 5;
/** Descriptor Privilege level. */
unsigned u2DPL : 2;
/** Present flag. */
unsigned u1Present : 1;
/** High offset word. */
unsigned u16OffsetHigh : 16;
/** Offset bits 32..63. */
unsigned u32OffsetHigh64;
/** Reserved. */
unsigned u32Reserved;
#pragma pack()
/** Pointer to IDT Entry, 64-bit mode, Generic view. */
typedef VBOXIDTE64_GENERIC *PVBOXIDTE64_GENERIC;
/** IDT Entry, 64-bit mode. */
typedef union VBOXIDTE64
{
/** Trap gate view. */
/** Interrupt gate view. */
/** Generic IDT view. */
/** 8 bit unsigned integer view. */
/** 16 bit unsigned integer view. */
/** 32 bit unsigned integer view. */
/** 64 bit unsigned integer view. */
} VBOXIDTE64;
#pragma pack()
/** Pointer to IDT Entry. */
typedef VBOXIDTE64 *PVBOXIDTE64;
/** Pointer to IDT Entry. */
typedef VBOXIDTE64 const *PCVBOXIDTE64;
#pragma pack(1)
/** IDTR */
typedef struct VBOXIDTR
{
/** Size of the IDT. */
/** Address of the IDT. */
#pragma pack()
#pragma pack(1)
/** IDTR from version 1.6 */
typedef struct VBOXIDTR_VER1_6
{
/** Size of the IDT. */
/** Address of the IDT. */
#pragma pack()
/** @} */
/** @def VBOXIDTE_OFFSET
* Return the offset of an IDT entry.
*/
#define VBOXIDTE_OFFSET(desc) \
/** @def VBOXIDTE64_OFFSET
* Return the offset of an IDT entry.
*/
#define VBOXIDTE64_OFFSET(desc) \
#pragma pack(1)
/** GDTR */
typedef struct VBOXGDTR
{
/** Size of the GDT. */
/** Address of the GDT. */
} VBOXGDTR;
#pragma pack()
/** Pointer to GDTR. */
#pragma pack(1)
/** GDTR from version 1.6 */
typedef struct VBOXGDTR_VER1_6
{
/** Size of the GDT. */
/** Address of the GDT. */
#pragma pack()
/** @} */
/**
* 32-bit Task Segment used in raw mode.
* @todo Move this to SELM! Use X86TSS32 instead.
*/
#pragma pack(1)
typedef struct VBOXTSS
{
/** 0x00 - Back link to previous task. (static) */
/** 0x04 - Ring-0 stack pointer. (static) */
/** 0x08 - Ring-0 stack segment. (static) */
/** 0x0c - Ring-1 stack pointer. (static) */
/** 0x10 - Ring-1 stack segment. (static) */
/** 0x14 - Ring-2 stack pointer. (static) */
/** 0x18 - Ring-2 stack segment. (static) */
/** 0x1c - Page directory for the task. (static) */
/** 0x20 - EIP before task switch. */
/** 0x24 - EFLAGS before task switch. */
/** 0x28 - EAX before task switch. */
/** 0x2c - ECX before task switch. */
/** 0x30 - EDX before task switch. */
/** 0x34 - EBX before task switch. */
/** 0x38 - ESP before task switch. */
/** 0x3c - EBP before task switch. */
/** 0x40 - ESI before task switch. */
/** 0x44 - EDI before task switch. */
/** 0x48 - ES before task switch. */
/** 0x4c - CS before task switch. */
/** 0x50 - SS before task switch. */
/** 0x54 - DS before task switch. */
/** 0x58 - FS before task switch. */
/** 0x5c - GS before task switch. */
/** 0x60 - LDTR before task switch. */
/** 0x64 - Debug trap flag */
/** 0x66 - Offset relative to the TSS of the start of the I/O Bitmap
* and the end of the interrupt redirection bitmap. */
/** 0x68 - 32 bytes for the virtual interrupt redirection bitmap. (VME) */
} VBOXTSS;
#pragma pack()
/** Pointer to task segment. */
/** Pointer to const task segment. */
/** Pointer to a callback method table provided by the VM API user. */
typedef struct VMM2USERMETHODS const *PCVMM2USERMETHODS;
/**
*/
typedef struct PDMDATASEG
{
/** Length of buffer in entry. */
/** Pointer to the start of the buffer. */
void *pvSeg;
} PDMDATASEG;
/** Pointer to a data transport segment. */
typedef PDMDATASEG *PPDMDATASEG;
/** Pointer to a const data transport segment. */
typedef PDMDATASEG const *PCPDMDATASEG;
/**
* Forms of generic segment offloading.
*/
typedef enum PDMNETWORKGSOTYPE
{
/** Invalid zero value. */
* The header offsets and sizes relates to IPv4 and TCP, the IPv6 header is
* figured out as needed.
* @todo Needs checking against facts, this is just an outline of the idea. */
* The header offsets and sizes relates to IPv4 and UDP, the IPv6 header is
* figured out as needed.
* @todo Needs checking against facts, this is just an outline of the idea. */
/** The end of valid GSO types. */
/**
* Generic segment offloading context.
*
* We generally follow the E1000 specs wrt to which header fields we change.
* However the GSO type implies where the checksum fields are and that they are
* always updated from scratch (no half done pseudo checksums).
*
* @remarks This is part of the internal network GSO packets. Take great care
* when making changes. The size is expected to be exactly 8 bytes.
*/
typedef struct PDMNETWORKGSO
{
/** The type of segmentation offloading we're performing (PDMNETWORKGSOTYPE). */
/** The total header size. */
/** The max segment size (MSS) to apply. */
/** Offset of the first header (IPv4 / IPv6). 0 if not not needed. */
/** Offset of the second header (TCP / UDP). 0 if not not needed. */
/** The header size used for segmentation (equal to offHdr2 in UFO). */
/** Unused. */
/** Pointer to a GSO context. */
typedef PDMNETWORKGSO *PPDMNETWORKGSO;
/** Pointer to a const GSO context. */
typedef PDMNETWORKGSO const *PCPDMNETWORKGSO;
/**
* The current ROM page protection.
*
* @remarks This is part of the saved state.
*/
typedef enum PGMROMPROT
{
/** The customary invalid value. */
PGMROMPROT_INVALID = 0,
/** Read from the virgin ROM page, ignore writes.
* Map the virgin page, use write access handler to ignore writes. */
/** Read from the virgin ROM page, write to the shadow RAM.
* Map the virgin page, use write access handler change the RAM. */
/** Read from the shadow ROM page, ignore writes.
* Map the shadow page read-only, use write access handler to ignore writes. */
/** Read from the shadow ROM page, ignore writes.
* Map the shadow page read-write, disabled write access handler. */
/** The end of valid values. */
/** The usual 32-bit type size hack. */
PGMROMPROT_32BIT_HACK = 0x7fffffff
} PGMROMPROT;
/**
* Page mapping lock.
*/
typedef struct PGMPAGEMAPLOCK
{
#if defined(IN_RC) || defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0)
/** The locked page. */
void *pvPage;
/** Pointer to the CPU that made the mapping.
* In ring-0 and raw-mode context we don't intend to ever allow long term
* locking and this is a way of making sure we're still on the same CPU. */
#else
/** Pointer to the PGMPAGE and lock type.
* bit-0 abuse: set=write, clear=read. */
/** Read lock type value. */
# define PGMPAGEMAPLOCK_TYPE_READ ((uintptr_t)0)
/** Write lock type value. */
/** Lock type mask. */
/** Pointer to the PGMCHUNKR3MAP. */
void *pvMap;
#endif
/** Pointer to a page mapping lock. */
typedef PGMPAGEMAPLOCK *PPGMPAGEMAPLOCK;
/** Pointer to a info helper callback structure. */
typedef struct DBGFINFOHLP *PDBGFINFOHLP;
/** Pointer to a const info helper callback structure. */
typedef const struct DBGFINFOHLP *PCDBGFINFOHLP;
/** Pointer to a const register descriptor. */
typedef struct DBGFREGDESC const *PCDBGFREGDESC;
/** Configuration manager tree node - A key. */
/** Configuration manager tree leaf - A value. */
/**
* CPU modes.
*/
typedef enum CPUMMODE
{
/** The usual invalid zero entry. */
CPUMMODE_INVALID = 0,
/** Real mode. */
/** Protected mode (32-bit). */
/** Long mode (64-bit). */
} CPUMMODE;
/** Pointer to the disassembler CPU state. */
typedef struct DISCPUSTATE *PDISCPUSTATE;
/** Pointer to a const disassembler CPU state. */
typedef struct DISCPUSTATE const *PCDISCPUSTATE;
/** @} */
#endif