Index: /trunk/src/VBox/Devices/Storage/DevATA.cpp
===================================================================
--- /trunk/src/VBox/Devices/Storage/DevATA.cpp	(revision 42323)
+++ /trunk/src/VBox/Devices/Storage/DevATA.cpp	(revision 42324)
@@ -5955,13 +5955,21 @@
     if (rc != VINF_SUCCESS)
         return rc;
-    if (cb == 1)
-        rc = ataIOPortWriteU8(pCtl, Port, u32);
-    else if (Port == pCtl->IOPortBase1)
-    {
+    if (Port == pCtl->IOPortBase1)
+    {
+        /* Writes to the data port may be 16-bit or 32-bit. */
         Assert(cb == 2 || cb == 4);
         rc = ataDataWrite(pCtl, Port, cb, (const uint8_t *)&u32);
     }
     else
-        AssertMsgFailed(("ataIOPortWrite1: unsupported write to port %x val=%x size=%d\n", Port, u32, cb));
+    {
+        /* Writes to the other command block ports should be 8-bit only. If they
+         * are not, the high bits are simply discarded. Undocumented, but observed
+         * on a real PIIX4 system.
+         */
+        if (cb > 1)
+            Log(("ataIOPortWrite1: suspect write to port %x val=%x size=%d\n", Port, u32, cb));
+
+        rc = ataIOPortWriteU8(pCtl, Port, u32);
+    }
     PDMCritSectLeave(&pCtl->lock);
     return rc;
@@ -5985,10 +5993,7 @@
     if (rc != VINF_SUCCESS)
         return rc;
-    if (cb == 1)
-    {
-        rc = ataIOPortReadU8(pCtl, Port, pu32);
-    }
-    else if (Port == pCtl->IOPortBase1)
-    {
+    if (Port == pCtl->IOPortBase1)
+    {
+        /* Reads from the data register may be 16-bit or 32-bit. */
         Assert(cb == 2 || cb == 4);
         rc = ataDataRead(pCtl, Port, cb, (uint8_t *)pu32);
@@ -5998,6 +6003,20 @@
     else
     {
-        AssertMsgFailed(("ataIOPortRead1: unsupported read from port %x size=%d\n", Port, cb));
-        rc = VERR_IOM_IOPORT_UNUSED;
+        /* Reads from the other command block registers should be 8-bit only.
+         * If they are not, the low byte is propagated to the high bits. 
+         * Undocumented, but observed on a real PIIX4 system.
+         */
+        rc = ataIOPortReadU8(pCtl, Port, pu32);
+        if (cb > 1)
+        {
+            uint32_t    pad;
+
+            /* Replicate the 8-bit result into the upper three bytes. */
+            pad = *pu32 & 0xff;
+            pad = pad | (pad << 8);
+            pad = pad | (pad << 16);
+            *pu32 = pad;
+            Log(("ataIOPortRead1: suspect read from port %x size=%d\n", Port, cb));
+        }
     }
     PDMCritSectLeave(&pCtl->lock);
