Changeset 73856 in vbox
- Timestamp:
- Aug 23, 2018 10:43:20 AM (6 years ago)
- File:
-
- 1 edited
-
trunk/include/VBox/vmm/hm_vmx.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/hm_vmx.h
r73796 r73856 2693 2693 uint32_t fAccessType : 1; 2694 2694 /** The index. */ 2695 uint32_t u Index: 8;2695 uint32_t u8Index : 8; 2696 2696 /** The type; 0=control, 1=VM-exit info, 2=guest-state, 3=host-state. */ 2697 uint32_t u Type: 2;2697 uint32_t u2Type : 2; 2698 2698 /** Reserved (MBZ). */ 2699 2699 uint32_t u1Reserved0 : 1; 2700 2700 /** The width; 0=16-bit, 1=64-bit, 2=32-bit, 3=natural-width. */ 2701 uint32_t u Width: 2;2701 uint32_t u2Width : 2; 2702 2702 /** Reserved (MBZ). */ 2703 2703 uint32_t u18Reserved0 : 18; … … 2711 2711 /** Pointer to a const VMCS field encoding. */ 2712 2712 typedef const VMXVMCSFIELDENC *PCVMXVMCSFIELDENC; 2713 2714 /** VMCS field encoding type: Full. */ 2715 #define VMX_VMCS_ENC_ACCESS_TYPE_FULL 0 2716 /** VMCS field encoding type: High. */ 2717 #define VMX_VMCS_ENC_ACCESS_TYPE_HIGH 1 2718 2719 /** VMCS field encoding type: Control. */ 2720 #define VMX_VMCS_ENC_TYPE_CONTROL 0 2721 /** VMCS field encoding type: VM-exit information / read-only fields. */ 2722 #define VMX_VMCS_ENC_TYPE_VMEXIT_INFO 1 2723 /** VMCS field encoding type: Guest-state. */ 2724 #define VMX_VMCS_ENC_TYPE_GUEST_STATE 2 2725 /** VMCS field encoding type: Host-state. */ 2726 #define VMX_VMCS_ENC_TYPE_HOST_STATE 3 2727 2728 /** VMCS field encoding width: 16-bit. */ 2729 #define VMX_VMCS_ENC_WIDTH_16BIT 0 2730 /** VMCS field encoding width: 64-bit. */ 2731 #define VMX_VMCS_ENC_WIDTH_64BIT 1 2732 /** VMCS field encoding width: 32-bit. */ 2733 #define VMX_VMCS_ENC_WIDTH_32BIT 2 2734 /** VMCS field encoding width: Natural width. */ 2735 #define VMX_VMCS_ENC_WIDTH_NATURAL 3 2736 2713 2737 /** Bits fields for VMCS field encoding. */ 2714 2738 #define VMX_BF_VMCS_ENC_ACCESS_TYPE_SHIFT 0 … … 2855 2879 typedef struct 2856 2880 { 2857 /** VMX VMCS revision identifier. */ 2858 VMXVMCSREVID u32VmcsRevId; 2859 /** VMX-abort indicator. */ 2860 uint32_t u32VmxAbortId; 2861 /** @todo VMCS data. We can use RTUINT64U for the full/high 64-bit VMCS fields. */ 2862 uint8_t abPadding0[X86_PAGE_4K_SIZE - 8]; 2881 /** 0x0 - VMX VMCS revision identifier. */ 2882 VMXVMCSREVID u32VmcsRevId; 2883 /** 0x4 - VMX-abort indicator. */ 2884 uint32_t u32VmxAbortId; 2885 /** 0x8 - Reserved for future. */ 2886 uint32_t au32Reserved0[8]; 2887 2888 /** @name 16-bit control fields. 2889 * @{ */ 2890 /** 0x28 - Virtual processor ID. */ 2891 uint16_t u16Vpid; 2892 /** 0x2a - Posted interrupt notify vector. */ 2893 uint16_t u16PostIntNotifyVector; 2894 /** 0x2c - EPTP index. */ 2895 uint16_t u16EptpIndex; 2896 /** 0x2e - Reserved for future. */ 2897 uint16_t au16Reserved0[8]; 2898 /** @} */ 2899 2900 /** @name 16-bit Guest-state fields. 2901 * @{ */ 2902 /** 0x3e - Guest ES selector. */ 2903 RTSEL GuestEs; 2904 /** 0x40 - Guest ES selector. */ 2905 RTSEL GuestCs; 2906 /** 0x42 - Guest ES selector. */ 2907 RTSEL GuestSs; 2908 /** 0x44 - Guest ES selector. */ 2909 RTSEL GuestDs; 2910 /** 0x46 - Guest ES selector. */ 2911 RTSEL GuestFs; 2912 /** 0x48 - Guest ES selector. */ 2913 RTSEL GuestGs; 2914 /** 0x4a - Guest interrupt status (virtual-interrupt delivery). */ 2915 uint16_t u16GuestIntStatus; 2916 /** 0x4c - PML index. */ 2917 uint16_t u16PmlIndex; 2918 /** 0x4e - Reserved for future. */ 2919 uint16_t au16Reserved1[8]; 2920 /** @} */ 2921 2922 /** name 16-bit Host-state fields. 2923 * @{ */ 2924 /** 0x5e - Host ES selector. */ 2925 RTSEL HostEs; 2926 /** 0x60 - Host ES selector. */ 2927 RTSEL HostCs; 2928 /** 0x62 - Host ES selector. */ 2929 RTSEL HostSs; 2930 /** 0x64 - Host ES selector. */ 2931 RTSEL HostDs; 2932 /** 0x66 - Host ES selector. */ 2933 RTSEL HostFs; 2934 /** 0x68 - Host ES selector. */ 2935 RTSEL HostGs; 2936 /** 0x6a - Reserved for future. */ 2937 uint16_t au16Reserved2[11]; 2938 /** @} */ 2939 2940 /** @name 32-bit Control fields. 2941 * @{ */ 2942 /** 0x80 - Pin-based VM-execution controls. */ 2943 uint32_t u32PinCtls; 2944 /** 0x84 - Processor-based VM-execution controls. */ 2945 uint32_t u32ProcCtls; 2946 /** 0x88 - Exception bitmap. */ 2947 uint32_t u32XcptBitmap; 2948 /** 0x8c - Page-fault exception error mask. */ 2949 uint32_t u32XcptPFMask; 2950 /** 0x90 - Page-fault exception error match. */ 2951 uint32_t u32XcptPFMatch; 2952 /** 0x94 - CR3-target count. */ 2953 uint32_t u32Cr3TargetCount; 2954 /** 0x98 - VM-exit controls. */ 2955 uint32_t u32ExitCtls; 2956 /** 0x9c - VM-exit MSR store count. */ 2957 uint32_t u32ExitMsrStoreCount; 2958 /** 0xa0 - VM-exit MSR load count. */ 2959 uint32_t u32ExitMsrLoadCount; 2960 /** 0xa4 - VM-entry controls. */ 2961 uint32_t u32EntryCtls; 2962 /** 0xa8 - VM-entry MSR load count. */ 2963 uint32_t u32EntryMsrLoadCount; 2964 /** 0xac - VM-entry interruption information. */ 2965 uint32_t u32EntryIntInfo; 2966 /** 0xb0 - VM-entry exception error code. */ 2967 uint32_t u32EntryXcptErrCode; 2968 /** 0xb4 - VM-entry instruction length. */ 2969 uint32_t u32EntryInstrLen; 2970 /** 0xb8 - TPR-treshold. */ 2971 uint32_t u32TprTreshold; 2972 /** 0xbc - Secondary-processor based VM-execution controls. */ 2973 uint32_t u32ProcCtls2; 2974 /** 0xc0 - Pause-loop exiting Gap. */ 2975 uint32_t u32PleGap; 2976 /** 0xc4 - Pause-loop exiting Window. */ 2977 uint32_t u32PleWindow; 2978 /** 0xc8 - Reserved for future. */ 2979 uint32_t au32Reserved1[8]; 2980 /** @} */ 2981 2982 /** @name 32-bit Read-only Data fields. 2983 * @{ */ 2984 /** 0xe8 - VM-instruction error. */ 2985 uint32_t u32RoVmInstrError; 2986 /** 0xec - VM-exit reason. */ 2987 uint32_t u32RoVmExitReason; 2988 /** 0xf0 - VM-exit interruption information. */ 2989 uint32_t u32RoVmExitIntInfo; 2990 /** 0xf4 - VM-exit interruption error code. */ 2991 uint32_t u32RoVmExitErrCode; 2992 /** 0xf8 - IDT-vectoring information. */ 2993 uint32_t u32RoIdtVectoringInfo; 2994 /** 0xfc - IDT-vectoring error code. */ 2995 uint32_t u32RoIdtVectoringErrCode; 2996 /** 0x100 - VM-exit instruction length. */ 2997 uint32_t u32RoVmExitInstrLen; 2998 /** 0x104 - VM-exit instruction information. */ 2999 uint32_t u32RoVmExitInstrInfo; 3000 /** 0x108 - Reserved for future. */ 3001 uint32_t au32RoReserved2[8]; 3002 /** @} */ 3003 3004 /** @name 32-bit Guest-state fields. 3005 * @{ */ 3006 /** 0x128 - Guest ES limit. */ 3007 uint32_t u32GuestEsLimit; 3008 /** 0x12c - Guest ES limit. */ 3009 uint32_t u32GuestCsLimit; 3010 /** 0x130 - Guest ES limit. */ 3011 uint32_t u32GuestSsLimit; 3012 /** 0x134 - Guest ES limit. */ 3013 uint32_t u32GuestDsLimit; 3014 /** 0x138 - Guest ES limit. */ 3015 uint32_t u32GuestFsLimit; 3016 /** 0x13c - Guest ES limit. */ 3017 uint32_t u32GuestGsLimit; 3018 /** 0x140 - Guest LDTR limit. */ 3019 uint32_t u32GuestLdtrLimit; 3020 /** 0x144 - Guest TR limit. */ 3021 uint32_t u32GuestTrLimit; 3022 /** 0x148 - Guest GDTR limit. */ 3023 uint32_t u32GuestGdtrLimit; 3024 /** 0x14c - Guest IDTR limit. */ 3025 uint32_t u32GuestIdtrLimit; 3026 /** 0x150 - Guest ES attributes. */ 3027 uint32_t u32GuestESAttr; 3028 /** 0x154 - Guest CS attributes. */ 3029 uint32_t u32GuestCSAttr; 3030 /** 0x158 - Guest SS attributes. */ 3031 uint32_t u32GuestSSAttr; 3032 /** 0x15c - Guest DS attributes. */ 3033 uint32_t u32GuestDSAttr; 3034 /** 0x160 - Guest FS attributes. */ 3035 uint32_t u32GuestFSAttr; 3036 /** 0x164 - Guest GS attributes. */ 3037 uint32_t u32GuestGSAttr; 3038 /** 0x168 - Guest LDTR attributes. */ 3039 uint32_t u32GuestLdtrAttr; 3040 /** 0x16c - Guest TR attributes. */ 3041 uint32_t u32GuestTrAttr; 3042 /** 0x170 - Guest interruptibility state. */ 3043 uint32_t u32GuestIntrState; 3044 /** 0x174 - Guest activity state. */ 3045 uint32_t u32GuestActivityState; 3046 /** 0x178 - Guest SMBASE. */ 3047 uint32_t u32GuestSmBase; 3048 /** 0x17c - Guest SYSENTER CS. */ 3049 uint32_t u32GuestSysenterCS; 3050 /** 0x180 - Preemption timer value. */ 3051 uint32_t u32PreemptTimer; 3052 /** 0x184 - Reserved for future. */ 3053 uint32_t au32Reserved3[8]; 3054 /** @} */ 3055 3056 /** @name 32-bit Host-state fields. 3057 * @{ */ 3058 /** 0x1a4 - Host SYSENTER CS. */ 3059 uint32_t u32HostSysenterCs; 3060 /** 0x1a8 - Reserved for future. */ 3061 uint32_t au32Reserved4[12]; 3062 /** @} */ 3063 3064 /** @name 64-bit Control fields. 3065 * @{ */ 3066 /** 0x1d8 - I/O bitmap A address. */ 3067 RTUINT64U u64AddrIoBitmapA; 3068 /** 0x1e0 - I/O bitmap B address. */ 3069 RTUINT64U u64AddrIoBitmapB; 3070 /** 0x1e8 - MSR bitmap address. */ 3071 RTUINT64U u64AddrMsrBitmapA; 3072 /** 0x1f0 - VM-exit MSR-store area address. */ 3073 RTUINT64U u64AddrVmExitMsrStore; 3074 /** 0x1f8 - VM-exit MSR-load area address. */ 3075 RTUINT64U u64AddrVmExitMsrLoad; 3076 /** 0x200 - VM-entry MSR-load area address. */ 3077 RTUINT64U u64AddrVmEntryMsrLoad; 3078 /** 0x208 - Executive-VMCS pointer. */ 3079 RTUINT64U u64ExecVmcsPtr; 3080 /** 0x210 - PML address. */ 3081 RTUINT64U u64AddrPml; 3082 /** 0x218 - TSC offset. */ 3083 RTUINT64U u64TscOffset; 3084 /** 0x220 - Virtual-APIC address. */ 3085 RTUINT64U u64AddrVirtApic; 3086 /** 0x228 - APIC-access address. */ 3087 RTUINT64U u64AddrApicAccess; 3088 /** 0x230 - Posted-interrupt descriptor address. */ 3089 RTUINT64U u64AddrPostedIntDesc; 3090 /** 0x238 - VM-functions control. */ 3091 RTUINT64U u64VmFuncCtls; 3092 /** 0x240 - EPTP pointer. */ 3093 RTUINT64U u64EptpPtr; 3094 /** 0x248 - EOI-exit bitmap 0. */ 3095 RTUINT64U u64EoiExitBitmap0; 3096 /** 0x250 - EOI-exit bitmap 1. */ 3097 RTUINT64U u64EoiExitBitmap1; 3098 /** 0x258 - EOI-exit bitmap 2. */ 3099 RTUINT64U u64EoiExitBitmap2; 3100 /** 0x260 - EOI-exit bitmap 3. */ 3101 RTUINT64U u64EoiExitBitmap3; 3102 /** 0x268 - EPTP-list address. */ 3103 RTUINT64U u64AddrEptpList; 3104 /** 0x270 - VMREAD-bitmap address. */ 3105 RTUINT64U u64AddrVmreadBitmap; 3106 /** 0x278 - VMWRITE-bitmap address. */ 3107 RTUINT64U u64AddrVmwriteBitmap; 3108 /** 0x280 - Virtualization-exception information address. */ 3109 RTUINT64U u64AddrXcptVeInfo; 3110 /** 0x288 - XSS-exiting bitmap address. */ 3111 RTUINT64U u64AddrXssBitmap; 3112 /** 0x290 - ENCLS-exiting bitmap address. */ 3113 RTUINT64U u64AddrEnclsBitmap; 3114 /** 0x298 - TSC multiplier. */ 3115 RTUINT64U u64TscMultiplier; 3116 /** 0x2a0 - Reserved for future. */ 3117 RTUINT64U au64Reserved0[16]; 3118 /** @} */ 3119 3120 /** @name 64-bit Read-only Data fields. 3121 * @{ */ 3122 /** 0x320 - Guest-physical address. */ 3123 RTUINT64U u64GuestPhysAddr; 3124 /** 0x328 - Reserved for future. */ 3125 RTUINT64U au64Reserved1[8]; 3126 /** @} */ 3127 3128 /** @name 64-bit Guest-state fields. 3129 * @{ */ 3130 /** 0x368 - VMCS link pointer. */ 3131 RTUINT64U u64VmcsLinkPtr; 3132 /** 0x370 - Guest debug-control MSR. */ 3133 RTUINT64U u64GuestDebugCtlMsr; 3134 /** 0x378 - Guest PAT MSR. */ 3135 RTUINT64U u64GuestPatMsr; 3136 /** 0x380 - Guest EFER MSR. */ 3137 RTUINT64U u64GuestEferMsr; 3138 /** 0x388 - Guest global performance-control MSR. */ 3139 RTUINT64U u64GuestPerfGlobalCtlMsr; 3140 /** 0x390 - Guest PDPTE 0. */ 3141 RTUINT64U u64GuestPdpte0; 3142 /** 0x398 - Guest PDPTE 0. */ 3143 RTUINT64U u64GuestPdpte1; 3144 /** 0x3a0 - Guest PDPTE 1. */ 3145 RTUINT64U u64GuestPdpte2; 3146 /** 0x3a8 - Guest PDPTE 2. */ 3147 RTUINT64U u64GuestPdpte3; 3148 /** 0x3b0 - Guest Bounds-config MSR (Intel MPX - Memory Protection Extensions). */ 3149 RTUINT64U u64GuestBndcfgsMsr; 3150 /** 0x3b8 - Reserved for future. */ 3151 RTUINT64U au64Reserved2[16]; 3152 /** @} */ 3153 3154 /** @name 64-bit Host-state Fields. 3155 * @{ */ 3156 /** 0x438 - Host PAT MSR. */ 3157 RTUINT64U u64HostPatMsr; 3158 /** 0x440 - Host EFER MSR. */ 3159 RTUINT64U u64HostEferMsr; 3160 /** 0x448 - Host global performance-control MSR. */ 3161 RTUINT64U u64HostPerfGlobalCtlMsr; 3162 /** 0x450 - Reserved for future. */ 3163 RTUINT64U au64Reserved3[16]; 3164 /** @} */ 3165 3166 /** @name Natural-width Control fields. 3167 * @{ */ 3168 /** 0x4d0 - CR0 guest/host Mask. */ 3169 RTUINT64U u64Cr0Mask; 3170 /** 0x4d8 - CR4 guest/host Mask. */ 3171 RTUINT64U u64Cr4Mask; 3172 /** 0x4e0 - CR0 read shadow. */ 3173 RTUINT64U u64Cr0ReadShadow; 3174 /** 0x4e8 - CR4 read shadow. */ 3175 RTUINT64U u64Cr4ReadShadow; 3176 /** 0x4f0 - CR3-target value 0. */ 3177 RTUINT64U u64Cr3Target0; 3178 /** 0x4f8 - CR3-target value 1. */ 3179 RTUINT64U u64Cr3Target1; 3180 /** 0x500 - CR3-target value 2. */ 3181 RTUINT64U u64Cr3Target2; 3182 /** 0x508 - CR3-target value 3. */ 3183 RTUINT64U u64Cr3Target3; 3184 /** 0x510 - Reserved for future. */ 3185 RTUINT64U au64Reserved4[32]; 3186 /** @} */ 3187 3188 /** @name Natural-width Read-only Data fields. */ 3189 /** 0x610 - Exit qualification. */ 3190 RTUINT64U u64ExitQual; 3191 /** 0x618 - I/O RCX. */ 3192 RTUINT64U u64IoRcx; 3193 /** 0x620 - I/O RCX. */ 3194 RTUINT64U u64IoRsi; 3195 /** 0x628 - I/O RCX. */ 3196 RTUINT64U u64IoRdi; 3197 /** 0x630 - I/O RCX. */ 3198 RTUINT64U u64IoRip; 3199 /** 0x638 - I/O RCX. */ 3200 RTUINT64U u64AddrGuestLinear; 3201 /** 0x640 - Reserved for future. */ 3202 RTUINT64U au64Reserved5[16]; 3203 /** @} */ 3204 3205 /** @name Natural-width Guest-state Fields. 3206 * @{ */ 3207 /** 0x6c0 - Guest CR0. */ 3208 RTUINT64U u64GuestCr0; 3209 /** 0x6c8 - Guest CR3. */ 3210 RTUINT64U u64GuestCr3; 3211 /** 0x6d0 - Guest CR4. */ 3212 RTUINT64U u64GuestCr4; 3213 /** 0x6d8 - Guest ES base. */ 3214 RTUINT64U u64GuestESBase; 3215 /** 0x6e0 - Guest CS base. */ 3216 RTUINT64U u64GuestCSBase; 3217 /** 0x6e8 - Guest SS base. */ 3218 RTUINT64U u64GuestSSBase; 3219 /** 0x6f0 - Guest DS base. */ 3220 RTUINT64U u64GuestDSBase; 3221 /** 0x6f8 - Guest FS base. */ 3222 RTUINT64U u64GuestFSBase; 3223 /** 0x700 - Guest GS base. */ 3224 RTUINT64U u64GuestGSBase; 3225 /** 0x708 - Guest LDTR base. */ 3226 RTUINT64U u64GuestLdtrBase; 3227 /** 0x710 - Guest TR base. */ 3228 RTUINT64U u64GuestTrBase; 3229 /** 0x718 - Guest GDTR base. */ 3230 RTUINT64U u64GuestGdtrBase; 3231 /** 0x720 - Guest IDTR base. */ 3232 RTUINT64U u64GuestIdtrBase; 3233 /** 0x728 - Guest DR7. */ 3234 RTUINT64U u64GuestDr7; 3235 /** 0x730 - Guest RSP. */ 3236 RTUINT64U u64GuestRsp; 3237 /** 0x738 - Guest RIP. */ 3238 RTUINT64U u64GuestRip; 3239 /** 0x740 - Guest RFLAGS. */ 3240 RTUINT64U u64GuestRflags; 3241 /** 0x748 - Guest pending debug exception. */ 3242 RTUINT64U u64GuestPendingDbgXcpt; 3243 /** 0x750 - Guest SYSENTER ESP. */ 3244 RTUINT64U u64GuestSysenterEsp; 3245 /** 0x758 - Guest SYSENTER EIP. */ 3246 RTUINT64U u64GuestSysenterEip; 3247 /** 0x760 - Reserved for future. */ 3248 RTUINT64U au64Reserved6[32]; 3249 /** @} */ 3250 3251 /** @name Natural-width Host-state fields. 3252 * @{ */ 3253 /** 0x860 - Host CR0. */ 3254 RTUINT64U u64HostCr0; 3255 /** 0x868 - Host CR3. */ 3256 RTUINT64U u64HostCr3; 3257 /** 0x870 - Host CR4. */ 3258 RTUINT64U u64HostCr4; 3259 /** 0x878 - Host FS base. */ 3260 RTUINT64U u64HostFsBase; 3261 /** 0x880 - Host GS base. */ 3262 RTUINT64U u64HostGsBase; 3263 /** 0x888 - Host TR base. */ 3264 RTUINT64U u64HostTrBase; 3265 /** 0x890 - Host GDTR base. */ 3266 RTUINT64U u64HostGdtrBase; 3267 /** 0x898 - Host IDTR base. */ 3268 RTUINT64U u64HostIdtrBase; 3269 /** 0x8a0 - Host SYSENTER ESP base. */ 3270 RTUINT64U u64HostSysenterEsp; 3271 /** 0x8a8 - Host SYSENTER ESP base. */ 3272 RTUINT64U u64HostSysenterEip; 3273 /** 0x8b0 - Host RSP. */ 3274 RTUINT64U u64HostRsp; 3275 /** 0x8b8 - Host RIP. */ 3276 RTUINT64U u64HostRip; 3277 /** 0x8c0 - Reserved for future. */ 3278 RTUINT64U au64Reserved7[32]; 3279 /** @} */ 3280 3281 /** 0x9c0 - Padding. */ 3282 uint8_t abPadding[X86_PAGE_4K_SIZE - 0x9c0]; 2863 3283 } VMXVVMCS; 2864 3284 #pragma pack() 2865 AssertCompileSize(VMXVVMCS, X86_PAGE_4K_SIZE);2866 AssertCompileMemberOffset(VMXVVMCS, u32VmxAbortId, 4);2867 3285 /** Pointer to the VMXVVMCS struct. */ 2868 3286 typedef VMXVVMCS *PVMXVVMCS; 2869 3287 /** Pointer to a const VMXVVMCS struct. */ 2870 3288 typedef const VMXVVMCS *PCVMXVVMCS; 2871 3289 AssertCompileSize(VMXVVMCS, X86_PAGE_4K_SIZE); 3290 AssertCompileMemberOffset(VMXVVMCS, u32VmxAbortId, 0x004); 3291 AssertCompileMemberOffset(VMXVVMCS, u16Vpid, 0x028); 3292 AssertCompileMemberOffset(VMXVVMCS, GuestEs, 0x03e); 3293 AssertCompileMemberOffset(VMXVVMCS, HostEs, 0x05e); 3294 AssertCompileMemberOffset(VMXVVMCS, u32PinCtls, 0x080); 3295 AssertCompileMemberOffset(VMXVVMCS, u32RoVmInstrError, 0x0e8); 3296 AssertCompileMemberOffset(VMXVVMCS, u32GuestEsLimit, 0x128); 3297 AssertCompileMemberOffset(VMXVVMCS, u32HostSysenterCs, 0x1a4); 3298 AssertCompileMemberOffset(VMXVVMCS, u64AddrIoBitmapA, 0x1d8); 3299 AssertCompileMemberOffset(VMXVVMCS, u64GuestPhysAddr, 0x320); 3300 AssertCompileMemberOffset(VMXVVMCS, u64VmcsLinkPtr, 0x368); 3301 AssertCompileMemberOffset(VMXVVMCS, u64HostPatMsr, 0x438); 3302 AssertCompileMemberOffset(VMXVVMCS, u64Cr0Mask, 0x4d0); 3303 AssertCompileMemberOffset(VMXVVMCS, u64ExitQual, 0x610); 3304 AssertCompileMemberOffset(VMXVVMCS, u64GuestCr0, 0x6c0); 3305 AssertCompileMemberOffset(VMXVVMCS, u64HostCr0, 0x860); 3306 3307 /** Get the offset into VMCS data for a VMCS field given its encoding. */ 3308 #define VMX_V_VMCS_FIELD_OFFSET(a_Enc) ( ((a_VmcsFieldEnc).n.u8Index & 0x1f) \ 3309 | ((a_VmcsFieldEnc).n.u2Type << 5) \ 3310 | ((a_VmcsFieldEnc).n.u2Width << 7)) 3311 3312 /** Get the offset into VMCS data for a VMCS field given its encoding as an 3313 * unsigned 32-bit number. */ 3314 #define VMX_V_VMCS_FIELD_OFFSET_U32(a_uEnc) ( (RT_BF_GET((a_uEnc), VMX_BF_VMCS_ENC_INDEX) & 0x1f) \ 3315 | (RT_BF_GET((a_uEnc), VMX_BF_VMCS_ENC_TYPE) << 5) \ 3316 | (RT_BF_GET((a_uEnc), VMX_BF_VMCS_ENC_WIDTH) << 7)) 2872 3317 /** @} */ 2873 3318
Note:
See TracChangeset
for help on using the changeset viewer.

