VirtualBox

Changeset 73868 in vbox for trunk/include/VBox/vmm/hm_vmx.h


Ignore:
Timestamp:
Aug 24, 2018 9:02:40 AM (6 years ago)
Author:
vboxsync
Message:

hm_vmx.h: Nested VMX: Added some missed fields in the Virtual VMCS structure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/hm_vmx.h

    r73856 r73868  
    28752875 *
    28762876 * The first 8 bytes are as per Intel spec. 24.2 "Format of the VMCS Region".
     2877 *
     2878 * Although the guest is supposed to access the VMCS only through the execution of
     2879 * VMX instructions (VMREAD, VMWRITE etc.), since the VMCS may reside in guest
     2880 * memory (e.g, active but not current VMCS), for saved-states compatibility, and
     2881 * for teleportation (when implemented) any newly added fields should be added to
     2882 * the appropriate reserved portions or at the end of the structure.
    28772883 */
    28782884#pragma pack(1)
     
    29122918    /** 0x48 - Guest ES selector. */
    29132919    RTSEL           GuestGs;
    2914     /** 0x4a - Guest interrupt status (virtual-interrupt delivery). */
     2920    /** 0x4a - Guest LDTR selector. */
     2921    RTSEL           GuestLdtr;
     2922    /** 0x4c - Guest TR selector. */
     2923    RTSEL           GuestTr;
     2924    /** 0x4e - Guest interrupt status (virtual-interrupt delivery). */
    29152925    uint16_t        u16GuestIntStatus;
    2916     /** 0x4c - PML index. */
     2926    /** 0x50 - PML index. */
    29172927    uint16_t        u16PmlIndex;
    2918     /** 0x4e - Reserved for future. */
     2928    /** 0x52 - Reserved for future. */
    29192929    uint16_t        au16Reserved1[8];
    29202930    /** @} */
     
    29222932    /** name 16-bit Host-state fields.
    29232933     * @{ */
    2924     /** 0x5e - Host ES selector. */
     2934    /** 0x62 - Host ES selector. */
    29252935    RTSEL           HostEs;
    2926     /** 0x60 - Host ES selector. */
     2936    /** 0x64 - Host CS selector. */
    29272937    RTSEL           HostCs;
    2928     /** 0x62 - Host ES selector. */
     2938    /** 0x66 - Host SS selector. */
    29292939    RTSEL           HostSs;
    2930     /** 0x64 - Host ES selector. */
     2940    /** 0x68 - Host DS selector. */
    29312941    RTSEL           HostDs;
    2932     /** 0x66 - Host ES selector. */
     2942    /** 0x6a - Host FS selector. */
    29332943    RTSEL           HostFs;
    2934     /** 0x68 - Host ES selector. */
     2944    /** 0x6c - Host GS selector. */
    29352945    RTSEL           HostGs;
    2936     /** 0x6a - Reserved for future. */
    2937     uint16_t        au16Reserved2[11];
     2946    /** 0x6e - Host TR selector. */
     2947    RTSEL           HostTr;
     2948    /** 0x70 - Reserved for future. */
     2949    uint16_t        au16Reserved2[10];
    29382950    /** @} */
    29392951
    29402952    /** @name 32-bit Control fields.
    29412953     * @{ */
    2942     /** 0x80 - Pin-based VM-execution controls. */
     2954    /** 0x84 - Pin-based VM-execution controls. */
    29432955    uint32_t        u32PinCtls;
    2944     /** 0x84 - Processor-based VM-execution controls. */
     2956    /** 0x88 - Processor-based VM-execution controls. */
    29452957    uint32_t        u32ProcCtls;
    2946     /** 0x88 - Exception bitmap. */
     2958    /** 0x8c - Exception bitmap. */
    29472959    uint32_t        u32XcptBitmap;
    2948     /** 0x8c - Page-fault exception error mask. */
     2960    /** 0x90 - Page-fault exception error mask. */
    29492961    uint32_t        u32XcptPFMask;
    2950     /** 0x90 - Page-fault exception error match. */
     2962    /** 0x94 - Page-fault exception error match. */
    29512963    uint32_t        u32XcptPFMatch;
    2952     /** 0x94 - CR3-target count. */
     2964    /** 0x98 - CR3-target count. */
    29532965    uint32_t        u32Cr3TargetCount;
    2954     /** 0x98 - VM-exit controls. */
     2966    /** 0x9c - VM-exit controls. */
    29552967    uint32_t        u32ExitCtls;
    2956     /** 0x9c - VM-exit MSR store count. */
     2968    /** 0xa0 - VM-exit MSR store count. */
    29572969    uint32_t        u32ExitMsrStoreCount;
    2958     /** 0xa0 - VM-exit MSR load count. */
     2970    /** 0xa4 - VM-exit MSR load count. */
    29592971    uint32_t        u32ExitMsrLoadCount;
    2960     /** 0xa4 - VM-entry controls. */
     2972    /** 0xa8 - VM-entry controls. */
    29612973    uint32_t        u32EntryCtls;
    2962     /** 0xa8 - VM-entry MSR load count. */
     2974    /** 0xac - VM-entry MSR load count. */
    29632975    uint32_t        u32EntryMsrLoadCount;
    2964     /** 0xac - VM-entry interruption information. */
     2976    /** 0xb0 - VM-entry interruption information. */
    29652977    uint32_t        u32EntryIntInfo;
    2966     /** 0xb0 - VM-entry exception error code. */
     2978    /** 0xb4 - VM-entry exception error code. */
    29672979    uint32_t        u32EntryXcptErrCode;
    2968     /** 0xb4 - VM-entry instruction length. */
     2980    /** 0xb8 - VM-entry instruction length. */
    29692981    uint32_t        u32EntryInstrLen;
    2970     /** 0xb8 - TPR-treshold. */
     2982    /** 0xbc - TPR-treshold. */
    29712983    uint32_t        u32TprTreshold;
    2972     /** 0xbc - Secondary-processor based VM-execution controls. */
     2984    /** 0xc0 - Secondary-processor based VM-execution controls. */
    29732985    uint32_t        u32ProcCtls2;
    2974     /** 0xc0 - Pause-loop exiting Gap. */
     2986    /** 0xc4 - Pause-loop exiting Gap. */
    29752987    uint32_t        u32PleGap;
    2976     /** 0xc4 - Pause-loop exiting Window. */
     2988    /** 0xc8 - Pause-loop exiting Window. */
    29772989    uint32_t        u32PleWindow;
    2978     /** 0xc8 - Reserved for future. */
     2990    /** 0xcc - Reserved for future. */
    29792991    uint32_t        au32Reserved1[8];
    29802992    /** @} */
     
    29822994    /** @name 32-bit Read-only Data fields.
    29832995     * @{ */
    2984     /** 0xe8 - VM-instruction error.  */
     2996    /** 0xec - VM-instruction error.  */
    29852997    uint32_t        u32RoVmInstrError;
    2986     /** 0xec - VM-exit reason. */
     2998    /** 0xf0 - VM-exit reason. */
    29872999    uint32_t        u32RoVmExitReason;
    2988     /** 0xf0 - VM-exit interruption information. */
     3000    /** 0xf4 - VM-exit interruption information. */
    29893001    uint32_t        u32RoVmExitIntInfo;
    2990     /** 0xf4 - VM-exit interruption error code. */
     3002    /** 0xf8 - VM-exit interruption error code. */
    29913003    uint32_t        u32RoVmExitErrCode;
    2992     /** 0xf8 - IDT-vectoring information. */
     3004    /** 0xfc - IDT-vectoring information. */
    29933005    uint32_t        u32RoIdtVectoringInfo;
    2994     /** 0xfc - IDT-vectoring error code. */
     3006    /** 0x100 - IDT-vectoring error code. */
    29953007    uint32_t        u32RoIdtVectoringErrCode;
    2996     /** 0x100 - VM-exit instruction length. */
     3008    /** 0x104 - VM-exit instruction length. */
    29973009    uint32_t        u32RoVmExitInstrLen;
    2998     /** 0x104 - VM-exit instruction information. */
     3010    /** 0x108 - VM-exit instruction information. */
    29993011    uint32_t        u32RoVmExitInstrInfo;
    3000     /** 0x108 - Reserved for future. */
     3012    /** 0x10c - Reserved for future. */
    30013013    uint32_t        au32RoReserved2[8];
    30023014    /** @} */
     
    30043016    /** @name 32-bit Guest-state fields.
    30053017     * @{ */
    3006     /** 0x128 - Guest ES limit. */
     3018    /** 0x12c - Guest ES limit. */
    30073019    uint32_t        u32GuestEsLimit;
    3008     /** 0x12c - Guest ES limit. */
     3020    /** 0x130 - Guest CS limit. */
    30093021    uint32_t        u32GuestCsLimit;
    3010     /** 0x130 - Guest ES limit. */
     3022    /** 0x134 - Guest SS limit. */
    30113023    uint32_t        u32GuestSsLimit;
    3012     /** 0x134 - Guest ES limit. */
     3024    /** 0x138 - Guest DS limit. */
    30133025    uint32_t        u32GuestDsLimit;
    3014     /** 0x138 - Guest ES limit. */
     3026    /** 0x13c - Guest FS limit. */
    30153027    uint32_t        u32GuestFsLimit;
    3016     /** 0x13c - Guest ES limit. */
     3028    /** 0x140 - Guest GS limit. */
    30173029    uint32_t        u32GuestGsLimit;
    3018     /** 0x140 - Guest LDTR limit. */
     3030    /** 0x144 - Guest LDTR limit. */
    30193031    uint32_t        u32GuestLdtrLimit;
    3020     /** 0x144 - Guest TR limit. */
     3032    /** 0x148 - Guest TR limit. */
    30213033    uint32_t        u32GuestTrLimit;
    3022     /** 0x148 - Guest GDTR limit. */
     3034    /** 0x14c - Guest GDTR limit. */
    30233035    uint32_t        u32GuestGdtrLimit;
    3024     /** 0x14c - Guest IDTR limit. */
     3036    /** 0x150 - Guest IDTR limit. */
    30253037    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. */
     3038    /** 0x154 - Guest ES attributes. */
     3039    uint32_t        u32GuestEsAttr;
     3040    /** 0x158 - Guest CS attributes. */
     3041    uint32_t        u32GuestCsAttr;
     3042    /** 0x15c - Guest SS attributes. */
     3043    uint32_t        u32GuestSsAttr;
     3044    /** 0x160 - Guest DS attributes. */
     3045    uint32_t        u32GuestDsAttr;
     3046    /** 0x164 - Guest FS attributes. */
     3047    uint32_t        u32GuestFsAttr;
     3048    /** 0x168 - Guest GS attributes. */
     3049    uint32_t        u32GuestGsAttr;
     3050    /** 0x16c - Guest LDTR attributes. */
    30393051    uint32_t        u32GuestLdtrAttr;
    3040     /** 0x16c - Guest TR attributes. */
     3052    /** 0x170 - Guest TR attributes. */
    30413053    uint32_t        u32GuestTrAttr;
    3042     /** 0x170 - Guest interruptibility state. */
     3054    /** 0x174 - Guest interruptibility state. */
    30433055    uint32_t        u32GuestIntrState;
    3044     /** 0x174 - Guest activity state. */
     3056    /** 0x178 - Guest activity state. */
    30453057    uint32_t        u32GuestActivityState;
    3046     /** 0x178 - Guest SMBASE. */
     3058    /** 0x17c - Guest SMBASE. */
    30473059    uint32_t        u32GuestSmBase;
    3048     /** 0x17c - Guest SYSENTER CS. */
     3060    /** 0x180 - Guest SYSENTER CS. */
    30493061    uint32_t        u32GuestSysenterCS;
    3050     /** 0x180 - Preemption timer value. */
     3062    /** 0x184 - Preemption timer value. */
    30513063    uint32_t        u32PreemptTimer;
    3052     /** 0x184 - Reserved for future. */
     3064    /** 0x188 - Reserved for future. */
    30533065    uint32_t        au32Reserved3[8];
    30543066    /** @} */
     
    30563068    /** @name 32-bit Host-state fields.
    30573069     * @{ */
    3058     /** 0x1a4 - Host SYSENTER CS. */
     3070    /** 0x1a8 - Host SYSENTER CS. */
    30593071    uint32_t        u32HostSysenterCs;
    3060     /** 0x1a8 - Reserved for future. */
    3061     uint32_t        au32Reserved4[12];
     3072    /** 0x1ac - Reserved for future. */
     3073    uint32_t        au32Reserved4[11];
    30623074    /** @} */
    30633075
     
    30693081    RTUINT64U       u64AddrIoBitmapB;
    30703082    /** 0x1e8 - MSR bitmap address. */
    3071     RTUINT64U       u64AddrMsrBitmapA;
     3083    RTUINT64U       u64AddrMsrBitmap;
    30723084    /** 0x1f0 - VM-exit MSR-store area address. */
    30733085    RTUINT64U       u64AddrVmExitMsrStore;
     
    31913203    /** 0x618 - I/O RCX. */
    31923204    RTUINT64U       u64IoRcx;
    3193     /** 0x620 - I/O RCX. */
     3205    /** 0x620 - I/O RSI. */
    31943206    RTUINT64U       u64IoRsi;
    3195     /** 0x628 - I/O RCX. */
     3207    /** 0x628 - I/O RDI. */
    31963208    RTUINT64U       u64IoRdi;
    3197     /** 0x630 - I/O RCX. */
     3209    /** 0x630 - I/O RIP. */
    31983210    RTUINT64U       u64IoRip;
    3199     /** 0x638 - I/O RCX. */
    3200     RTUINT64U       u64AddrGuestLinear;
     3211    /** 0x638 - Guest-linear address. */
     3212    RTUINT64U       u64GuestLinearAddr;
    32013213    /** 0x640 - Reserved for future. */
    32023214    RTUINT64U       au64Reserved5[16];
     
    32123224    RTUINT64U       u64GuestCr4;
    32133225    /** 0x6d8 - Guest ES base. */
    3214     RTUINT64U       u64GuestESBase;
     3226    RTUINT64U       u64GuestEsBase;
    32153227    /** 0x6e0 - Guest CS base. */
    3216     RTUINT64U       u64GuestCSBase;
     3228    RTUINT64U       u64GuestCsBase;
    32173229    /** 0x6e8 - Guest SS base. */
    3218     RTUINT64U       u64GuestSSBase;
     3230    RTUINT64U       u64GuestSsBase;
    32193231    /** 0x6f0 - Guest DS base. */
    3220     RTUINT64U       u64GuestDSBase;
     3232    RTUINT64U       u64GuestDsBase;
    32213233    /** 0x6f8 - Guest FS base. */
    3222     RTUINT64U       u64GuestFSBase;
     3234    RTUINT64U       u64GuestFsBase;
    32233235    /** 0x700 - Guest GS base. */
    3224     RTUINT64U       u64GuestGSBase;
     3236    RTUINT64U       u64GuestGsBase;
    32253237    /** 0x708 - Guest LDTR base. */
    32263238    RTUINT64U       u64GuestLdtrBase;
     
    32383250    RTUINT64U       u64GuestRip;
    32393251    /** 0x740 - Guest RFLAGS.  */
    3240     RTUINT64U       u64GuestRflags;
     3252    RTUINT64U       u64GuestRFlags;
    32413253    /** 0x748 - Guest pending debug exception.  */
    32423254    RTUINT64U       u64GuestPendingDbgXcpt;
     
    32913303AssertCompileMemberOffset(VMXVVMCS, u16Vpid,            0x028);
    32923304AssertCompileMemberOffset(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);
     3305AssertCompileMemberOffset(VMXVVMCS, HostEs,             0x062);
     3306AssertCompileMemberOffset(VMXVVMCS, u32PinCtls,         0x084);
     3307AssertCompileMemberOffset(VMXVVMCS, u32RoVmInstrError,  0x0ec);
     3308AssertCompileMemberOffset(VMXVVMCS, u32GuestEsLimit,    0x12c);
     3309AssertCompileMemberOffset(VMXVVMCS, u32HostSysenterCs,  0x1a8);
    32983310AssertCompileMemberOffset(VMXVVMCS, u64AddrIoBitmapA,   0x1d8);
    32993311AssertCompileMemberOffset(VMXVVMCS, u64GuestPhysAddr,   0x320);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette