VirtualBox

Changeset 22887 in vbox for trunk/include


Ignore:
Timestamp:
Sep 9, 2009 10:23:58 PM (15 years ago)
Author:
vboxsync
Message:

vm.h: Make 32-bit and 64-bit stuff be more uniform...

File:
1 edited

Legend:

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

    r22886 r22887  
    110110    RTCPUID volatile        idHostCpu;
    111111
    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.
    113114     *
    114115     * @remarks The aligments of the members that are larger than 48 bytes should be
     
    211212
    212213    /** Align at page boundrary. */
    213     uint8_t                 abReserved[HC_ARCH_BITS == 32 ? 448 : 960];
     214    uint8_t                 abReserved[960];
    214215} VMCPU;
    215216
     
    810811    STAMPROFILEADV              StatSwitcherTSS;
    811812
    812 /** @todo Realign everything on 64 byte boundaries to better match the
    813  *        cache-line size. */
    814     /* padding - the unions must be aligned on 32 bytes boundraries. */
    815     uint32_t                padding[HC_ARCH_BITS == 32 ? 4+8 : 6];
     813    /** Padding - the unions must be aligned on a 64 bytes boundrary and the unions
     814     *  must start at the same offset on both 64-bit and 32-bit hosts. */
     815    uint32_t                    padding[HC_ARCH_BITS == 32 ? 4+8 : 6];
    816816
    817817    /** CPUM part. */
     
    969969    {
    970970#ifdef ___VMInternal_h
    971         struct VMINT    s;
     971        struct VMINT s;
    972972#endif
    973973        uint8_t     padding[24];        /* multiple of 8 */
    974974    } vm;
    975975
     976    /** CFGM part. */
     977    union
     978    {
     979#ifdef ___CFGMInternal_h
     980        struct CFGM s;
     981#endif
     982        uint8_t     padding[8];         /* multiple of 8 */
     983    } cfgm;
     984
    976985    /** PARAV part. */
    977986    union
     
    983992    } parav;
    984993
    985     /** CFGM part. */
    986     union
    987     {
    988 #ifdef ___CFGMInternal_h
    989         struct CFGM s;
    990 #endif
    991         uint8_t     padding[8];         /* multiple of 8 */
    992     } cfgm;
    993 
    994     /** Padding for aligning the cpu array on a 64 byte boundrary. */
    995     uint8_t         abReserved2[8 + (HC_ARCH_BITS == 32 ? 3712 : 2112)];
     994    /** Padding for aligning the cpu array on a page boundrary. */
     995    uint8_t         abReserved2[2120];
    996996
    997997    /* ---- end small stuff ---- */
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