109
109
* Only valid when in RC or HWACCMR0 with scheduling disabled. */
110
110
RTCPUID volatile idHostCpu;
112
/** Align the next bit on a 64-byte boundary.
112
/** Align the next bit on a 64-byte boundary and make sure it starts at the same
113
* offset in both 64-bit and 32-bit builds.
114
115
* @remarks The aligments of the members that are larger than 48 bytes should be
115
116
* 64-byte for cache line reasons. structs containing small amounts of
116
117
* data could be lumped together at the end with a < 64 byte padding
117
118
* following it (to grow into and align the struct size).
119
uint32_t au32Alignment[HC_ARCH_BITS == 32 ? 7 : 3];
120
uint8_t abAlignment1[HC_ARCH_BITS == 32 ? 28 : 12];
121
122
/** CPUM part. */
731
746
* @param eax The return code, register.
732
747
* @remark Assume interrupts disabled.
734
RTRCPTR pfnVMMGCGuestToHostAsm/*(int32_t eax)*/;
749
RTRCPTR pfnVMMGCGuestToHostAsm/*(int32_t eax)*/;
738
753
/** @name Various VM data owned by VM.
741
756
/** The native handle of ThreadEMT. Getting the native handle
742
757
* is generally faster than getting the IPRT one (except on OS/2 :-). */
743
RTNATIVETHREAD uPadding2;
758
RTNATIVETHREAD uPadding2;
747
762
/** @name Various items that are frequently accessed.
749
764
/** Raw ring-3 indicator. */
751
766
/** Raw ring-0 indicator. */
753
768
/** PATM enabled flag.
754
769
* This is placed here for performance reasons. */
756
771
/** CSAM enabled flag.
757
772
* This is placed here for performance reasons. */
759
774
/** Hardware VM support is available and enabled.
760
775
* This is placed here for performance reasons. */
762
777
/** Hardware VM support is required and non-optional.
763
778
* This is initialized together with the rest of the VM structure. */
764
bool fHwVirtExtForced;
779
bool fHwVirtExtForced;
765
780
/** PARAV enabled flag. */
770
785
/* padding to make gnuc put the StatQemuToGC where msc does. */
771
786
#if HC_ARCH_BITS == 32
775
790
/** Profiling the total time from Qemu to GC. */
776
STAMPROFILEADV StatTotalQemuToGC;
791
STAMPROFILEADV StatTotalQemuToGC;
777
792
/** Profiling the total time from GC to Qemu. */
778
STAMPROFILEADV StatTotalGCToQemu;
793
STAMPROFILEADV StatTotalGCToQemu;
779
794
/** Profiling the total time spent in GC. */
780
STAMPROFILEADV StatTotalInGC;
795
STAMPROFILEADV StatTotalInGC;
781
796
/** Profiling the total time spent not in Qemu. */
782
STAMPROFILEADV StatTotalInQemu;
797
STAMPROFILEADV StatTotalInQemu;
783
798
/** Profiling the VMMSwitcher code for going to GC. */
784
STAMPROFILEADV StatSwitcherToGC;
799
STAMPROFILEADV StatSwitcherToGC;
785
800
/** Profiling the VMMSwitcher code for going to HC. */
786
STAMPROFILEADV StatSwitcherToHC;
787
STAMPROFILEADV StatSwitcherSaveRegs;
788
STAMPROFILEADV StatSwitcherSysEnter;
789
STAMPROFILEADV StatSwitcherDebug;
790
STAMPROFILEADV StatSwitcherCR0;
791
STAMPROFILEADV StatSwitcherCR4;
792
STAMPROFILEADV StatSwitcherJmpCR3;
793
STAMPROFILEADV StatSwitcherRstrRegs;
794
STAMPROFILEADV StatSwitcherLgdt;
795
STAMPROFILEADV StatSwitcherLidt;
796
STAMPROFILEADV StatSwitcherLldt;
797
STAMPROFILEADV StatSwitcherTSS;
801
STAMPROFILEADV StatSwitcherToHC;
802
STAMPROFILEADV StatSwitcherSaveRegs;
803
STAMPROFILEADV StatSwitcherSysEnter;
804
STAMPROFILEADV StatSwitcherDebug;
805
STAMPROFILEADV StatSwitcherCR0;
806
STAMPROFILEADV StatSwitcherCR4;
807
STAMPROFILEADV StatSwitcherJmpCR3;
808
STAMPROFILEADV StatSwitcherRstrRegs;
809
STAMPROFILEADV StatSwitcherLgdt;
810
STAMPROFILEADV StatSwitcherLidt;
811
STAMPROFILEADV StatSwitcherLldt;
812
STAMPROFILEADV StatSwitcherTSS;
799
/** @todo Realign everything on 64 byte boundaries to better match the
800
* cache-line size. */
801
/* padding - the unions must be aligned on 32 bytes boundraries. */
802
uint32_t padding[HC_ARCH_BITS == 32 ? 4+8 : 6];
814
/** Padding - the unions must be aligned on a 64 bytes boundrary and the unions
815
* must start at the same offset on both 64-bit and 32-bit hosts. */
816
uint8_t abAlignment1[HC_ARCH_BITS == 32 ? 48 : 24];
804
818
/** CPUM part. */
973
960
/** @def VM_REM_SIZE
974
961
* Must be multiple of 32 and coherent with REM_ENV_SIZE from REMInternal.h. */
975
962
# define VM_REM_SIZE 0x11100
976
char padding[VM_REM_SIZE]; /* multiple of 32 */
963
uint8_t padding[VM_REM_SIZE]; /* multiple of 32 */
979
/** Padding for aligning the cpu array on a 64 byte boundrary. */
980
uint32_t u32Reserved2[8];
966
/* ---- begin small stuff ---- */
971
#ifdef ___VMInternal_h
974
uint8_t padding[24]; /* multiple of 8 */
980
#ifdef ___CFGMInternal_h
983
uint8_t padding[8]; /* multiple of 8 */
989
#ifdef ___PARAVInternal_h
992
uint8_t padding[24]; /* multiple of 8 */
995
/** Padding for aligning the cpu array on a page boundrary. */
996
uint8_t abAlignment2[2056];
998
/* ---- end small stuff ---- */
982
1000
/** VMCPU array for the configured number of virtual CPUs.
983
* Must be aligned on a 64-byte boundrary. */
1001
* Must be aligned on a page boundrary for TLB hit reasons as well as
1002
* alignment of VMCPU members. */