Index: /trunk/include/VBox/vm.h
===================================================================
--- /trunk/include/VBox/vm.h	(revision 22886)
+++ /trunk/include/VBox/vm.h	(revision 22887)
@@ -110,5 +110,6 @@
     RTCPUID volatile        idHostCpu;
 
-    /** Align the next bit on a 64-byte boundary.
+    /** Align the next bit on a 64-byte boundary and make sure it starts at the same
+     *  offset in both 64-bit and 32-bit builds.
      *
      * @remarks The aligments of the members that are larger than 48 bytes should be
@@ -211,5 +212,5 @@
 
     /** Align at page boundrary. */
-    uint8_t                 abReserved[HC_ARCH_BITS == 32 ? 448 : 960];
+    uint8_t                 abReserved[960];
 } VMCPU;
 
@@ -810,8 +811,7 @@
     STAMPROFILEADV              StatSwitcherTSS;
 
-/** @todo Realign everything on 64 byte boundaries to better match the
- *        cache-line size. */
-    /* padding - the unions must be aligned on 32 bytes boundraries. */
-    uint32_t                padding[HC_ARCH_BITS == 32 ? 4+8 : 6];
+    /** Padding - the unions must be aligned on a 64 bytes boundrary and the unions
+     *  must start at the same offset on both 64-bit and 32-bit hosts. */
+    uint32_t                    padding[HC_ARCH_BITS == 32 ? 4+8 : 6];
 
     /** CPUM part. */
@@ -969,9 +969,18 @@
     {
 #ifdef ___VMInternal_h
-        struct VMINT    s;
+        struct VMINT s;
 #endif
         uint8_t     padding[24];        /* multiple of 8 */
     } vm;
 
+    /** CFGM part. */
+    union
+    {
+#ifdef ___CFGMInternal_h
+        struct CFGM s;
+#endif
+        uint8_t     padding[8];         /* multiple of 8 */
+    } cfgm;
+
     /** PARAV part. */
     union
@@ -983,15 +992,6 @@
     } parav;
 
-    /** CFGM part. */
-    union
-    {
-#ifdef ___CFGMInternal_h
-        struct CFGM s;
-#endif
-        uint8_t     padding[8];         /* multiple of 8 */
-    } cfgm;
-
-    /** Padding for aligning the cpu array on a 64 byte boundrary. */
-    uint8_t         abReserved2[8 + (HC_ARCH_BITS == 32 ? 3712 : 2112)];
+    /** Padding for aligning the cpu array on a page boundrary. */
+    uint8_t         abReserved2[2120];
 
     /* ---- end small stuff ---- */
Index: /trunk/src/VBox/VMM/testcase/tstVMStructSize.cpp
===================================================================
--- /trunk/src/VBox/VMM/testcase/tstVMStructSize.cpp	(revision 22886)
+++ /trunk/src/VBox/VMM/testcase/tstVMStructSize.cpp	(revision 22887)
@@ -167,8 +167,8 @@
     CHECK_PADDING_VM(64, rem);
     CHECK_PADDING_VM(8, vm);
+    CHECK_PADDING_VM(8, cfgm);
 #ifdef VBOX_WITH_VMI
     CHECK_PADDING_VM(8, parav);
 #endif
-    CHECK_PADDING_VM(8, cfgm);
 
     PRINT_OFFSET(VMCPU, cpum);
