Index: /trunk/src/VBox/Devices/Storage/DevATA.cpp
===================================================================
--- /trunk/src/VBox/Devices/Storage/DevATA.cpp	(revision 491)
+++ /trunk/src/VBox/Devices/Storage/DevATA.cpp	(revision 492)
@@ -93,8 +93,8 @@
     /** LCHS disk geometry. */
     uint32_t cCHSCylinders, cCHSHeads, cCHSSectors;
+    /** Total number of sectors on this disk. */
+    uint64_t cTotalSectors;
     /** Number of sectors to transfer per IRQ. */
     uint32_t cSectorsPerIRQ;
-    /** Total number of sectors on this disk. */
-    uint64_t cTotalSectors;
 
     /** ATA/ATAPI register 1: feature (write-only). */
@@ -178,4 +178,7 @@
     /** Pointer to the I/O buffer. */
     GCPTRTYPE(uint8_t *) pbIOBufferGC;
+#if HC_ARCH_BITS == 64 && GC_ARCH_BITS != 64
+    RTGCPTR Aligmnent0; /**< Align the statistics at an 8-byte boundrary. */
+#endif
 
     /*
@@ -219,12 +222,15 @@
     /** The LUN #. */
     RTUINT                          iLUN;
+#if HC_ARCH_BITS == 64
+    RTUINT                          Alignment2; /**< Align pDevInsHC correctly. */
+#endif
     /** Pointer to device instance. */
     HCPTRTYPE(PPDMDEVINS)           pDevInsHC;
+    /** Pointer to controller instance. */
+    HCPTRTYPE(struct ATACONTROLLER *) pControllerHC;
     /** Pointer to device instance. */
     GCPTRTYPE(PPDMDEVINS)           pDevInsGC;
     /** Pointer to controller instance. */
-    HCPTRTYPE(struct ATACONTROLLER *)pControllerHC;
-    /** Pointer to controller instance. */
-    GCPTRTYPE(struct ATACONTROLLER *)pControllerGC;
+    GCPTRTYPE(struct ATACONTROLLER *) pControllerGC;
 } ATADevState;
 
@@ -333,10 +339,14 @@
     /** The position at which to get a new request for the AIO thread. */
     uint8_t             AsyncIOReqTail;
+    uint8_t             Alignment3[2]; /** Explicit padding of the 2 byte gap. */
+    /** Magic delay before triggering interrupts in DMA mode. */
+    uint32_t            DelayIRQMillies;
     /** The mutex protecting the request queue. */
     RTSEMMUTEX          AsyncIORequestMutex;
     /** The event semaphore the thread is waiting on during suspended I/O. */
     RTSEMEVENT          SuspendIOSem;
-    /** Magic delay before triggering interrupts in DMA mode. */
-    uint32_t            DelayIRQMillies;
+#if HC_ARCH_BITS == 32
+    uint32_t            Alignment0;
+#endif
 
     /* Statistics */
@@ -354,5 +364,5 @@
     ATACONTROLLER       aCts[2];
     /** Pointer to device instance. */
-    PPDMDEVINS          pDevIns;
+    PPDMDEVINSR3        pDevIns;
     /** Status Port - Base interface. */
     PDMIBASE            IBase;
@@ -360,9 +370,10 @@
     PDMILEDPORTS        ILeds;
     /** Partner of ILeds. */
-    PPDMILEDCONNECTORS  pLedsConnector;
+    R3PTRTYPE(PPDMILEDCONNECTORS)   pLedsConnector;
     /** Flag whether GC is enabled. */
     bool                fGCEnabled;
     /** Flag whether R0 is enabled. */
     bool                fR0Enabled;
+    bool                Alignment0[HC_ARCH_BITS == 64 ? 6 : 2]; /**< Align the struct size. */
 } PCIATAState;
 
@@ -381,4 +392,5 @@
 
 
+#ifndef VBOX_DEVICE_STRUCT_TESTCASE
 /*******************************************************************************
  *  Internal Functions                                                         *
@@ -5912,2 +5924,4 @@
 };
 #endif /* IN_RING3 */
+#endif /* !VBOX_DEVICE_STRUCT_TESTCASE */
+
