VirtualBox

Changeset 22893 in vbox


Ignore:
Timestamp:
Sep 9, 2009 11:34:52 PM (15 years ago)
Author:
vboxsync
Message:

vm.h: page align VMCPU::pgm (it's 28KB).

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vm.h

    r22892 r22893  
    126126        struct CPUMCPU      s;
    127127#endif
    128         char                padding[3456];      /* multiple of 64 */
     128        uint8_t             padding[3456];      /* multiple of 64 */
    129129    } cpum;
     130
     131    /** HWACCM part. */
     132    union
     133    {
     134#ifdef ___HWACCMInternal_h
     135        struct HWACCMCPU    s;
     136#endif
     137        uint8_t             padding[5248];      /* multiple of 64 */
     138    } hwaccm;
     139
     140    /** EM part. */
     141    union
     142    {
     143#ifdef ___EMInternal_h
     144        struct EMCPU        s;
     145#endif
     146        uint8_t             padding[1408];      /* multiple of 64 */
     147    } em;
     148
     149    /** TRPM part. */
     150    union
     151    {
     152#ifdef ___TRPMInternal_h
     153        struct TRPMCPU      s;
     154#endif
     155        uint8_t             padding[128];       /* multiple of 64 */
     156    } trpm;
     157
     158    /** TM part. */
     159    union
     160    {
     161#ifdef ___TMInternal_h
     162        struct TMCPU        s;
     163#endif
     164        uint8_t             padding[64];        /* multiple of 64 */
     165    } tm;
     166
     167    /** VMM part. */
     168    union
     169    {
     170#ifdef ___VMMInternal_h
     171        struct VMMCPU       s;
     172#endif
     173        uint8_t             padding[384];       /* multiple of 64 */
     174    } vmm;
     175
     176    /** PDM part. */
     177    union
     178    {
     179#ifdef ___PDMInternal_h
     180        struct PDMCPU       s;
     181#endif
     182        uint8_t             padding[128];       /* multiple of 64 */
     183    } pdm;
     184
     185    /** IOM part. */
     186    union
     187    {
     188#ifdef ___IOMInternal_h
     189        struct IOMCPU       s;
     190#endif
     191        uint8_t             padding[512];       /* multiple of 64 */
     192    } iom;
     193
     194    /** DBGF part.
     195     * @todo Combine this with other tiny structures. */
     196    union
     197    {
     198#ifdef ___DBGFInternal_h
     199        struct DBGFCPU      s;
     200#endif
     201        uint8_t             padding[64];        /* multiple of 64 */
     202    } dbgf;
     203
     204    /** Align the following members on page boundrary. */
     205    uint8_t                 abAlignment2[832];
    130206
    131207    /** PGM part. */
     
    135211        struct PGMCPU       s;
    136212#endif
    137         char                padding[28*1024];   /* multiple of 64 */
     213        uint8_t             padding[28*1024];   /* multiple of 4096 */
    138214    } pgm;
    139215
    140     /** HWACCM part. */
    141     union
    142     {
    143 #ifdef ___HWACCMInternal_h
    144         struct HWACCMCPU    s;
    145 #endif
    146         char                padding[5248];      /* multiple of 64 */
    147     } hwaccm;
    148 
    149     /** EM part. */
    150     union
    151     {
    152 #ifdef ___EMInternal_h
    153         struct EMCPU        s;
    154 #endif
    155         char                padding[1408];      /* multiple of 64 */
    156     } em;
    157 
    158     /** TRPM part. */
    159     union
    160     {
    161 #ifdef ___TRPMInternal_h
    162         struct TRPMCPU      s;
    163 #endif
    164         char                padding[128];       /* multiple of 64 */
    165     } trpm;
    166 
    167     /** TM part. */
    168     union
    169     {
    170 #ifdef ___TMInternal_h
    171         struct TMCPU        s;
    172 #endif
    173         char                padding[64];        /* multiple of 64 */
    174     } tm;
    175 
    176     /** VMM part. */
    177     union
    178     {
    179 #ifdef ___VMMInternal_h
    180         struct VMMCPU       s;
    181 #endif
    182         char                padding[384];       /* multiple of 64 */
    183     } vmm;
    184 
    185     /** PDM part. */
    186     union
    187     {
    188 #ifdef ___PDMInternal_h
    189         struct PDMCPU       s;
    190 #endif
    191         char                padding[128];       /* multiple of 64 */
    192     } pdm;
    193 
    194     /** IOM part. */
    195     union
    196     {
    197 #ifdef ___IOMInternal_h
    198         struct IOMCPU       s;
    199 #endif
    200         char                padding[512];       /* multiple of 64 */
    201     } iom;
    202 
    203     /** DBGF part.
    204      * @todo Combine this with other tiny structures. */
    205     union
    206     {
    207 #ifdef ___DBGFInternal_h
    208         struct DBGFCPU      s;
    209 #endif
    210         uint8_t             padding[64];        /* multiple of 64 */
    211     } dbgf;
    212 
    213     /** Align the structure size at page boundrary. */
    214     uint8_t                 abAlignment2[832];
    215216} VMCPU;
    216217
  • trunk/src/VBox/VMM/testcase/tstVMStructSize.cpp

    r22888 r22893  
    174174    PRINT_OFFSET(VMCPU, cpum);
    175175    CHECK_PADDING_VMCPU(64, cpum);
    176     CHECK_PADDING_VMCPU(64, pgm);
    177176    CHECK_PADDING_VMCPU(64, hwaccm);
    178177    CHECK_PADDING_VMCPU(64, em);
     
    183182    CHECK_PADDING_VMCPU(64, iom);
    184183    CHECK_PADDING_VMCPU(64, dbgf);
     184    CHECK_PADDING_VMCPU(4096, pgm);
     185#ifdef VBOX_WITH_STATISTICS
     186    PRINT_OFFSET(VMCPU, pgm.s.pStatTrap0eAttributionRC);
     187#endif
    185188
    186189    CHECK_MEMBER_ALIGNMENT(VM, selm.s.Tss, 16);
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