Index: /trunk/src/VBox/Devices/Storage/DevATA.cpp
===================================================================
--- /trunk/src/VBox/Devices/Storage/DevATA.cpp	(revision 17074)
+++ /trunk/src/VBox/Devices/Storage/DevATA.cpp	(revision 17075)
@@ -6124,5 +6124,5 @@
      * Validate and read configuration.
      */
-    if (!CFGMR3AreValuesValid(pCfgHandle, "GCEnabled\0IRQDelay\0R0Enabled\0PIIX4\0ICH6\0"))
+    if (!CFGMR3AreValuesValid(pCfgHandle, "GCEnabled\0IRQDelay\0R0Enabled\0Type\0"))
         return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES,
                                 N_("PIIX3 configuration error: unknown option specified"));
@@ -6148,22 +6148,29 @@
 
     pThis->u8Type = CHIPSET_PIIX3;
-    bool fPIIX4;
-    rc = CFGMR3QueryBoolDef(pCfgHandle, "PIIX4", &fPIIX4, false);
+    uint32_t type;
+    rc = CFGMR3QueryU32Def(pCfgHandle, "Type", &type, 0);
     if (RT_FAILURE(rc))
         return PDMDEV_SET_ERROR(pDevIns, rc,
-                                N_("PIIX3 configuration error: failed to read PIIX4 as boolean"));
-    Log(("%s: fPIIX4=%d\n", __FUNCTION__, fPIIX4));
-    if (fPIIX4)
-        pThis->u8Type = CHIPSET_PIIX4;
-
-    /** @todo: Need to implement better IDE chipset configuration mechanism */
-    bool fICH6;
-    rc = CFGMR3QueryBoolDef(pCfgHandle, "ICH6", &fICH6, false);
-    if (RT_FAILURE(rc))
-        return PDMDEV_SET_ERROR(pDevIns, rc,
-                                N_("PIIX3 configuration error: failed to read ICH6 as boolean"));
-    Log(("%s: fICH6=%d\n", __FUNCTION__, fICH6));
-    if (fICH6)
-        pThis->u8Type = CHIPSET_ICH6;
+                                N_("PIIX3 configuration error: failed to read Type as integer"));
+    Log(("%s: type=%d\n", __FUNCTION__, type));
+    /** See IDEControllerType in VirtualBox.xidl */
+    switch (type)
+    {
+        case 0:
+            /** @todo: what is right here? */
+            AssertMsgFailed(("What do we do here: type Null\n"));
+            break;
+        case 1:
+            pThis->u8Type = CHIPSET_PIIX3;
+            break;
+        case 2:
+            pThis->u8Type = CHIPSET_PIIX4;
+            break; 
+        case 3:
+            pThis->u8Type = CHIPSET_ICH6;
+            break;
+        default:
+            AssertMsgFailed(("Unknown IDE type: %d\n", type));
+    }
 
     /*
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp	(revision 17074)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp	(revision 17075)
@@ -503,4 +503,7 @@
         case IDEControllerType_PIIX4:
             pszIdeController = "PIIX4";
+            break;
+        case IDEControllerType_ICH6:
+            pszIdeController = "ICH6";
             break;
         default:
Index: /trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp	(revision 17074)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp	(revision 17075)
@@ -3438,4 +3438,6 @@
     mIDEControllerTypes [KIDEControllerType_PIIX4] =
         tr ("PIIX4", "IDEControllerType");
+    mIDEControllerTypes [KIDEControllerType_ICH6] =
+        tr ("ICH6", "IDEControllerType");
 
     mUSBDeviceStates [KUSBDeviceState_NotSupported] =
Index: /trunk/src/VBox/Frontends/VirtualBox/src/VBoxImportApplianceWgt.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/VBoxImportApplianceWgt.cpp	(revision 17074)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/VBoxImportApplianceWgt.cpp	(revision 17075)
@@ -445,4 +445,5 @@
                     e->addItem (vboxGlobal().toString (KIDEControllerType_PIIX3), "PIIX3");
                     e->addItem (vboxGlobal().toString (KIDEControllerType_PIIX4), "PIIX4");
+                    e->addItem (vboxGlobal().toString (KIDEControllerType_ICH6),  "ICH6");
                     editor = e;
                     break;
Index: /trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsGeneral.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsGeneral.cpp	(revision 17074)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsGeneral.cpp	(revision 17075)
@@ -138,4 +138,5 @@
     mCbIDEController->addItem (""); /* KIDEControllerType_PIIX3 */
     mCbIDEController->addItem (""); /* KIDEControllerType_PIIX4 */
+    mCbIDEController->addItem (""); /* KIDEControllerType_ICH6  */
 
     qApp->installEventFilter (this);
@@ -460,4 +461,5 @@
     mCbIDEController->setItemText (0, vboxGlobal().toString (KIDEControllerType_PIIX3));
     mCbIDEController->setItemText (1, vboxGlobal().toString (KIDEControllerType_PIIX4));
+    mCbIDEController->setItemText (2, vboxGlobal().toString (KIDEControllerType_ICH6));
 
     /* Path selector */
Index: /trunk/src/VBox/Main/ApplianceImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/ApplianceImpl.cpp	(revision 17074)
+++ /trunk/src/VBox/Main/ApplianceImpl.cpp	(revision 17075)
@@ -1883,4 +1883,6 @@
                 else if (!strcmp(pcszIDEType, "PIIX4"))
                     rc = biosSettings->COMSETTER(IDEControllerType)(IDEControllerType_PIIX4);
+                else if (!strcmp(pcszIDEType, "ICH6"))
+                    rc = biosSettings->COMSETTER(IDEControllerType)(IDEControllerType_ICH6);
                 else
                     throw setError(VBOX_E_FILE_ERROR,
Index: /trunk/src/VBox/Main/BIOSSettingsImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/BIOSSettingsImpl.cpp	(revision 17074)
+++ /trunk/src/VBox/Main/BIOSSettingsImpl.cpp	(revision 17075)
@@ -442,4 +442,5 @@
         case IDEControllerType_PIIX3:
         case IDEControllerType_PIIX4:
+        case IDEControllerType_ICH6:
             break;
         default:
@@ -601,4 +602,6 @@
             else if (strcmp (typeStr, "PIIX4") == 0)
                 mData->mIDEControllerType = IDEControllerType_PIIX4;
+            else if (strcmp (typeStr, "ICH6") == 0)
+                mData->mIDEControllerType = IDEControllerType_ICH6;
             else
                 ComAssertMsgFailedRet (("Invalid boot menu mode '%s'", typeStr),
@@ -698,4 +701,7 @@
                 ideControllerTypeStr = "PIIX4";
                 break;
+            case IDEControllerType_ICH6:
+                ideControllerTypeStr = "ICH6";
+                break;
             default:
                 ComAssertMsgFailedRet (("Invalid IDE Controller type: %d",
Index: /trunk/src/VBox/Main/ConsoleImpl2.cpp
===================================================================
--- /trunk/src/VBox/Main/ConsoleImpl2.cpp	(revision 17074)
+++ /trunk/src/VBox/Main/ConsoleImpl2.cpp	(revision 17075)
@@ -276,26 +276,5 @@
      */
     IDEControllerType_T controllerType;
-    BOOL fPIIX4, fICH6;
     hrc = biosSettings->COMGETTER(IDEControllerType)(&controllerType);               H();
-    switch (controllerType)
-    {
-        case IDEControllerType_PIIX3:
-            fPIIX4 = FALSE;
-            break;
-        case IDEControllerType_PIIX4:
-            fPIIX4 = TRUE;
-            break;
-        default:
-            AssertMsgFailed(("Invalid IDE controller type '%d'", controllerType));
-            return VMSetError(pVM, VERR_INVALID_PARAMETER, RT_SRC_POS,
-                              N_("Invalid IDE controller type '%d'"), controllerType);
-    }
-#ifdef VBOX_WITH_SMC
-    /** @todo: gross hack, rewrite appropriately */
-    fPIIX4 = FALSE;
-    fICH6 = TRUE;
-#else
-    fICH6 = FALSE;
-#endif
 
     /*
@@ -801,6 +780,5 @@
     rc = CFGMR3InsertInteger(pIdeInst, "PCIFunctionNo",        1);                  RC_CHECK();
     rc = CFGMR3InsertNode(pIdeInst,    "Config", &pCfg);                            RC_CHECK();
-    rc = CFGMR3InsertInteger(pCfg,  "PIIX4", fPIIX4);               /* boolean */   RC_CHECK();
-    rc = CFGMR3InsertInteger(pCfg,  "ICH6",  fICH6);                /* boolean */   RC_CHECK();
+    rc = CFGMR3InsertInteger(pCfg,  "Type", (uint32_t)controllerType);              RC_CHECK();
 
     /* Attach the status driver */
Index: /trunk/src/VBox/Main/idl/VirtualBox.xidl
===================================================================
--- /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 17074)
+++ /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 17075)
@@ -881,4 +881,5 @@
     <const name="PIIX3"           value="1"/>
     <const name="PIIX4"           value="2"/>
+    <const name="ICH6"            value="3"/>
   </enum>
 
Index: /trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd
===================================================================
--- /trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd	(revision 17074)
+++ /trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd	(revision 17075)
@@ -237,4 +237,5 @@
     <xsd:enumeration value="PIIX3"/>
     <xsd:enumeration value="PIIX4"/>
+    <xsd:enumeration value="ICH6"/>
   </xsd:restriction>
 </xsd:simpleType>
