Index: /trunk/src/VBox/Devices/Storage/DevAHCI.cpp
===================================================================
--- /trunk/src/VBox/Devices/Storage/DevAHCI.cpp	(revision 43599)
+++ /trunk/src/VBox/Devices/Storage/DevAHCI.cpp	(revision 43600)
@@ -439,8 +439,4 @@
     volatile bool                   fRedo;
 
-#if HC_ARCH_BITS == 64
-    bool                            fAlignment2;
-#endif
-
     /** Number of total sectors. */
     uint64_t                        cTotalSectors;
@@ -453,4 +449,6 @@
     /** HACK: Countdown till we report a newly unmounted drive as mounted. */
     uint8_t                         cNotifiedMediaChange;
+    /** Exponent of logical sectors in a physical sector, number of logical sectors is 2^exp. */
+    uint8_t                         cLogSectorsPerPhysicalExp;
     /** The same for GET_EVENT_STATUS for mechanism */
     volatile uint32_t               MediaEventStatus;
@@ -529,10 +527,6 @@
     /** Statistics: Time to complete one request. */
     STAMPROFILE                     StatProfileProcessTime;
-    /** Statistics: Time to map requests into R3. */
-    STAMPROFILE                     StatProfileMapIntoR3;
     /** Statistics: Amount of time to read/write data. */
     STAMPROFILE                     StatProfileReadWrite;
-    /** Statistics: Amount of time to destroy a list. */
-    STAMPROFILE                     StatProfileDestroyScatterGatherList;
 #endif /* VBOX_WITH_STATISTICS */
 
@@ -3012,4 +3006,8 @@
     p[102] = RT_H2LE_U16(pAhciPort->cTotalSectors >> 32);
     p[103] = RT_H2LE_U16(pAhciPort->cTotalSectors >> 48);
+
+    /* valid information, more than one logical sector per physical sector, 2^cLogSectorsPerPhysicalExp logical sectors per physical sector */
+    if (pAhciPort->cLogSectorsPerPhysicalExp)
+        p[106] = RT_H2LE_U16(RT_BIT(14) | RT_BIT(13) | pAhciPort->cLogSectorsPerPhysicalExp);
 
     if (pAhciPort->fNonRotational)
@@ -7529,4 +7527,12 @@
                     N_("AHCI configuration error: failed to read \"NonRotationalMedium\" as boolean"));
 
+    rc = CFGMR3QueryU8Def(pCfgNode, "LogicalSectorsPerPhysical", &pAhciPort->cLogSectorsPerPhysicalExp, 0);
+    if (RT_FAILURE(rc))
+        return PDMDEV_SET_ERROR(pDevIns, rc,
+                    N_("AHCI configuration error: failed to read \"LogicalSectorsPerPhysical\" as integer"));
+    if (pAhciPort->cLogSectorsPerPhysicalExp >= 16)
+        return PDMDEV_SET_ERROR(pDevIns, rc,
+                    N_("AHCI configuration error: \"LogicalSectorsPerPhysical\" must be between 0 and 15"));
+
     /* There are three other identification strings for CD drives used for INQUIRY */
     if (pAhciPort->fATAPI)
@@ -8054,10 +8060,6 @@
         PDMDevHlpSTAMRegisterF(pDevIns, &pAhciPort->StatProfileProcessTime, STAMTYPE_PROFILE, STAMVISIBILITY_USED, STAMUNIT_NS_PER_CALL,
                                "Amount of time to process one request.", "/Devices/SATA%d/Port%d/ProfileProcessTime", iInstance, i);
-        PDMDevHlpSTAMRegisterF(pDevIns, &pAhciPort->StatProfileMapIntoR3, STAMTYPE_PROFILE, STAMVISIBILITY_USED, STAMUNIT_NS_PER_CALL,
-                               "Amount of time to map the guest buffers into R3.", "/Devices/SATA%d/Port%d/ProfileMapIntoR3", iInstance, i);
         PDMDevHlpSTAMRegisterF(pDevIns, &pAhciPort->StatProfileReadWrite, STAMTYPE_PROFILE, STAMVISIBILITY_USED, STAMUNIT_NS_PER_CALL,
                                "Amount of time for the read/write operation to complete.", "/Devices/SATA%d/Port%d/ProfileReadWrite", iInstance, i);
-        PDMDevHlpSTAMRegisterF(pDevIns, &pAhciPort->StatProfileDestroyScatterGatherList, STAMTYPE_PROFILE, STAMVISIBILITY_USED, STAMUNIT_NS_PER_CALL,
-                               "Amount of time to destroy the scatter gather list and free associated resources.", "/Devices/SATA%d/Port%d/ProfileDestroyScatterGatherList", iInstance, i);
 #endif
 
