Index: /trunk/src/VBox/Devices/Storage/DevAHCI.cpp
===================================================================
--- /trunk/src/VBox/Devices/Storage/DevAHCI.cpp	(revision 32938)
+++ /trunk/src/VBox/Devices/Storage/DevAHCI.cpp	(revision 32939)
@@ -70,4 +70,7 @@
  * This was before the config was added and ahciIOTasks was dropped. */
 #define AHCI_SAVED_STATE_VERSION_VBOX_30        2
+
+/* If AHCI shall emulate MSI support */
+#define AHCI_WITH_MSI
 
 /**
@@ -7668,6 +7671,10 @@
     PCIDevSetDeviceId    (&pThis->dev, 0x2829); /* ICH-8M */
     PCIDevSetCommand     (&pThis->dev, 0x0000);
-    // @todo: must be set, to use caps list
-    //PCIDevSetStatus      (&pThis->dev, VBOX_PCI_STATUS_CAP_LIST);
+#ifdef AHCI_WITH_MSI
+    PCIDevSetStatus      (&pThis->dev, VBOX_PCI_STATUS_CAP_LIST);
+    PCIDevSetCapabilityList(&pThis->dev, 0x80);
+#else
+    PCIDevSetCapabilityList(&pThis->dev, 0x70);
+#endif
     PCIDevSetRevisionId  (&pThis->dev, 0x02);
     PCIDevSetClassProg   (&pThis->dev, 0x01);
@@ -7676,7 +7683,4 @@
     PCIDevSetBaseAddress (&pThis->dev, 5, false, false, false, 0x00000000);
 
-    // @todo: maybe 0x70, as MSI currently not implemented
-    PCIDevSetCapabilityList(&pThis->dev, 0x80);
-
     PCIDevSetInterruptLine(&pThis->dev, 0x00);
     PCIDevSetInterruptPin (&pThis->dev, 0x01);
@@ -7685,9 +7689,4 @@
     pThis->dev.config[0x71] = 0x00; /* next */
     pThis->dev.config[0x72] = 0x03; /* version ? */
-
-    // @todo: this way it claims MSI *enabled*, not disabled, which is only
-    // compensated by above lack of VBOX_PCI_STATUS_CAP_LIST in status
-    pThis->dev.config[0x80] = VBOX_PCI_CAP_ID_MSI; /* Capability ID: Message Signaled Interrupts. Disabled. */
-    pThis->dev.config[0x81] = 0x70; /* next. */
 
     pThis->dev.config[0x90] = 0x40; /* AHCI mode. */
@@ -7703,4 +7702,19 @@
     if (RT_FAILURE(rc))
         return rc;
+
+#ifdef AHCI_WITH_MSI
+    PDMMSIREG aMsiReg;
+    aMsiReg.cVectors = 1;
+    aMsiReg.iCapOffset = 0x80;
+    aMsiReg.iNextOffset = 0x70;
+    aMsiReg.iMsiFlags = 0;
+    rc = PDMDevHlpPCIRegisterMsi(pDevIns, &aMsiReg);
+    if (RT_FAILURE (rc))
+    {
+        LogRel(("Chipset cannot do MSI: %Rrc\n", rc));
+        PCIDevSetCapabilityList(&pThis->dev, 0x70);
+        /* That's OK, we can work without MSI */
+    }
+#endif
 
     /*
