Index: /trunk/include/VBox/msi.h
===================================================================
--- /trunk/include/VBox/msi.h	(revision 80703)
+++ /trunk/include/VBox/msi.h	(revision 80704)
@@ -101,22 +101,25 @@
 
 /**
- * MSI-X different from MSI by the fact that dedicated physical page
- * (in device memory) is assigned for MSI-X table, and Pending Bit Array (PBA),
- * which is recommended to be separated from the main table by at least 2K.
+ * MSI-X differs from MSI by the fact that a dedicated physical page (in device
+ * memory) is assigned for MSI-X table, and Pending Bit Array (PBA), which is
+ * recommended to be separated from the main table by at least 2K.
+ *
+ * @{
  */
-/* Size of a MSI-X page */
+/** Size of a MSI-X page */
 #define VBOX_MSIX_PAGE_SIZE                   0x1000
-/* Pending interrupts (PBA) */
+/** Pending interrupts (PBA) */
 #define VBOX_MSIX_PAGE_PENDING                (VBOX_MSIX_PAGE_SIZE / 2)
-/* Maximum number of vectors, per device/function */
+/** Maximum number of vectors, per device/function */
 #define VBOX_MSIX_MAX_ENTRIES                 2048
-/* Size of MSI-X PCI capability */
+/** Size of MSI-X PCI capability */
 #define VBOX_MSIX_CAP_SIZE                    12
-/* Offsets in MSI-X PCI capability structure (VBOX_PCI_CAP_ID_MSIX) */
+/** Offsets in MSI-X PCI capability structure (VBOX_PCI_CAP_ID_MSIX) */
 #define VBOX_MSIX_CAP_MESSAGE_CONTROL         0x02
 #define VBOX_MSIX_TABLE_BIROFFSET             0x04
 #define VBOX_MSIX_PBA_BIROFFSET               0x08
-/* Size of single MSI-X table entry */
+/** Size of single MSI-X table entry */
 #define VBOX_MSIX_ENTRY_SIZE                  16
+/** @} */
 
 
Index: /trunk/include/VBox/vmm/pdmdev.h
===================================================================
--- /trunk/include/VBox/vmm/pdmdev.h	(revision 80703)
+++ /trunk/include/VBox/vmm/pdmdev.h	(revision 80704)
@@ -332,5 +332,7 @@
     uint32_t            cbInstanceRC;
     /** Max number of PCI devices. */
-    uint32_t            cMaxPciDevices;
+    uint16_t            cMaxPciDevices;
+    /** Max number of MSI-X vectors in any of the PCI devices. */
+    uint16_t            cMaxMsixVectors;
     /** The description of the device. The UTF-8 string pointed to shall, like this structure,
      * remain unchanged from registration till VM destruction. */
@@ -556,5 +558,7 @@
     uint32_t            cbInstanceRC;
     /** Max number of PCI devices. */
-    uint32_t            cMaxPciDevices;
+    uint16_t            cMaxPciDevices;
+    /** Max number of MSI-X vectors in any of the PCI devices. */
+    uint16_t            cMaxMsixVectors;
     /** The description of the device. The UTF-8 string pointed to shall, like this structure,
      * remain unchanged from registration till VM destruction. */
@@ -664,5 +668,7 @@
     uint32_t            cbInstanceRC;
     /** Max number of PCI devices. */
-    uint32_t            cMaxPciDevices;
+    uint16_t            cMaxPciDevices;
+    /** Max number of MSI-X vectors in any of the PCI devices. */
+    uint16_t            cMaxMsixVectors;
     /** The description of the device. The UTF-8 string pointed to shall, like this structure,
      * remain unchanged from registration till VM destruction. */
Index: /trunk/src/VBox/Devices/Audio/DevHDA.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DevHDA.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/Audio/DevHDA.cpp	(revision 80704)
@@ -5326,4 +5326,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         1,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "Intel HD Audio Controller",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/Audio/DevIchAc97.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DevIchAc97.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/Audio/DevIchAc97.cpp	(revision 80704)
@@ -4556,4 +4556,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         1,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "ICH AC'97 Audio Controller",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/Audio/DevSB16.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DevSB16.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/Audio/DevSB16.cpp	(revision 80704)
@@ -2608,4 +2608,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         0,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "Sound Blaster 16 Controller",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/Bus/DevPCI.cpp
===================================================================
--- /trunk/src/VBox/Devices/Bus/DevPCI.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/Bus/DevPCI.cpp	(revision 80704)
@@ -1412,4 +1412,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         2,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "i440FX PCI bridge and PIIX3 ISA bridge.",
 #if defined(IN_RING3)
@@ -1755,4 +1756,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         1,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "82801 Mobile PCI to PCI bridge",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/Bus/DevPciIch9.cpp
===================================================================
--- /trunk/src/VBox/Devices/Bus/DevPciIch9.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/Bus/DevPciIch9.cpp	(revision 80704)
@@ -3606,4 +3606,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         1,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "ICH9 PCI bridge",
 #if defined(IN_RING3)
@@ -3679,4 +3680,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         1,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "ICH9 PCI to PCI bridge",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/EFI/DevEFI.cpp
===================================================================
--- /trunk/src/VBox/Devices/EFI/DevEFI.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/EFI/DevEFI.cpp	(revision 80704)
@@ -2470,4 +2470,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         0,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "Extensible Firmware Interface Device.\n"
                                     "LUN#0 - NVRAM port",
Index: /trunk/src/VBox/Devices/EFI/DevFlash.cpp
===================================================================
--- /trunk/src/VBox/Devices/EFI/DevFlash.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/EFI/DevFlash.cpp	(revision 80704)
@@ -533,4 +533,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         0,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "Flash Memory Device",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/EFI/DevSmc.cpp
===================================================================
--- /trunk/src/VBox/Devices/EFI/DevSmc.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/EFI/DevSmc.cpp	(revision 80704)
@@ -1508,4 +1508,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         0,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "Apple System Management Controller",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/GIMDev/GIMDev.cpp
===================================================================
--- /trunk/src/VBox/Devices/GIMDev/GIMDev.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/GIMDev/GIMDev.cpp	(revision 80704)
@@ -423,4 +423,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         0,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "VirtualBox GIM Device",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/Graphics/DevVGA.cpp
===================================================================
--- /trunk/src/VBox/Devices/Graphics/DevVGA.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/Graphics/DevVGA.cpp	(revision 80704)
@@ -7281,4 +7281,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         1,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "VGA Adaptor with VESA extensions.",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/Input/DevPS2.cpp
===================================================================
--- /trunk/src/VBox/Devices/Input/DevPS2.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/Input/DevPS2.cpp	(revision 80704)
@@ -1059,4 +1059,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         0,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "PS/2 Keyboard and Mouse device. Emulates both the keyboard, mouse and the keyboard controller.\n"
                                     "LUN #0 is the keyboard connector.\n"
Index: /trunk/src/VBox/Devices/Misc/VirtualKD.cpp
===================================================================
--- /trunk/src/VBox/Devices/Misc/VirtualKD.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/Misc/VirtualKD.cpp	(revision 80704)
@@ -238,4 +238,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         0,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "Provides fast debugging interface when debugging Windows kernel",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/Network/DevE1000.cpp
===================================================================
--- /trunk/src/VBox/Devices/Network/DevE1000.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/Network/DevE1000.cpp	(revision 80704)
@@ -8103,5 +8103,5 @@
     /* .uReserved0 = */             0,
     /* .szName = */                 "e1000",
-    /* .fFlags = */                 PDM_DEVREG_FLAGS_DEFAULT_BITS | PDM_DEVREG_FLAGS_RC | PDM_DEVREG_FLAGS_R0 | PDM_DEVREG_FLAGS_MSI_X,
+    /* .fFlags = */                 PDM_DEVREG_FLAGS_DEFAULT_BITS | PDM_DEVREG_FLAGS_RC | PDM_DEVREG_FLAGS_R0,
     /* .fClass = */                 PDM_DEVREG_CLASS_NETWORK,
     /* .cMaxInstances = */          ~0U,
@@ -8111,4 +8111,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         1,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "Intel PRO/1000 MT Desktop Ethernet.",
 #if defined(IN_RING3)
@@ -8124,5 +8125,5 @@
     /* .pfnResume = */              NULL,
     /* .pfnAttach = */              e1kR3Attach,
-    /* pfnDeatch */    e1kR3Detach,
+    /* .pfnDeatch = */              e1kR3Detach,
     /* .pfnQueryInterface = */      NULL,
     /* .pfnInitComplete = */        NULL,
Index: /trunk/src/VBox/Devices/Network/DevINIP.cpp
===================================================================
--- /trunk/src/VBox/Devices/Network/DevINIP.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/Network/DevINIP.cpp	(revision 80704)
@@ -740,4 +740,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         0,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "Internal Network IP stack device",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/Network/DevPCNet.cpp
===================================================================
--- /trunk/src/VBox/Devices/Network/DevPCNet.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/Network/DevPCNet.cpp	(revision 80704)
@@ -5554,4 +5554,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         1,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "AMD PCnet Ethernet controller.\n",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/Network/DevVirtioNet.cpp
===================================================================
--- /trunk/src/VBox/Devices/Network/DevVirtioNet.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/Network/DevVirtioNet.cpp	(revision 80704)
@@ -2365,4 +2365,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         1,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "Virtio Ethernet.\n",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/PC/DevACPI.cpp
===================================================================
--- /trunk/src/VBox/Devices/PC/DevACPI.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/PC/DevACPI.cpp	(revision 80704)
@@ -4196,4 +4196,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         1,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "Advanced Configuration and Power Interface",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/PC/DevDMA.cpp
===================================================================
--- /trunk/src/VBox/Devices/PC/DevDMA.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/PC/DevDMA.cpp	(revision 80704)
@@ -1138,4 +1138,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         0,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "DMA Controller Device",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/PC/DevHPET.cpp
===================================================================
--- /trunk/src/VBox/Devices/PC/DevHPET.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/PC/DevHPET.cpp	(revision 80704)
@@ -1490,4 +1490,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         0,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "High Precision Event Timer (HPET) Device",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/PC/DevIoApic.cpp
===================================================================
--- /trunk/src/VBox/Devices/PC/DevIoApic.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/PC/DevIoApic.cpp	(revision 80704)
@@ -1385,4 +1385,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         0,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "I/O Advanced Programmable Interrupt Controller (IO-APIC) Device",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/PC/DevLpc-new.cpp
===================================================================
--- /trunk/src/VBox/Devices/PC/DevLpc-new.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/PC/DevLpc-new.cpp	(revision 80704)
@@ -400,4 +400,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         1,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "Low Pin Count (LPC) Bus",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/PC/DevPIC.cpp
===================================================================
--- /trunk/src/VBox/Devices/PC/DevPIC.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/PC/DevPIC.cpp	(revision 80704)
@@ -1055,4 +1055,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         0,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "Intel 8259 Programmable Interrupt Controller (PIC) Device.",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/PC/DevPcArch.cpp
===================================================================
--- /trunk/src/VBox/Devices/PC/DevPcArch.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/PC/DevPcArch.cpp	(revision 80704)
@@ -299,4 +299,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         0,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "PC Architecture Device",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/PC/DevPcBios.cpp
===================================================================
--- /trunk/src/VBox/Devices/PC/DevPcBios.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/PC/DevPcBios.cpp	(revision 80704)
@@ -1811,4 +1811,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         0,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "PC BIOS Device",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/PC/DevPit-i8254.cpp
===================================================================
--- /trunk/src/VBox/Devices/PC/DevPit-i8254.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/PC/DevPit-i8254.cpp	(revision 80704)
@@ -1540,4 +1540,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         0,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "Intel 8254 Programmable Interval Timer (PIT) And Dummy Speaker Device",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/PC/DevRTC.cpp
===================================================================
--- /trunk/src/VBox/Devices/PC/DevRTC.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/PC/DevRTC.cpp	(revision 80704)
@@ -1277,4 +1277,5 @@
     /* .cbInstanceRC = */           sizeof(RTCSTATERC),
     /* .cMaxPciDevices = */         0,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "Motorola MC146818 RTC/CMOS Device.",
 #ifdef IN_RING3
Index: /trunk/src/VBox/Devices/Parallel/DevParallel.cpp
===================================================================
--- /trunk/src/VBox/Devices/Parallel/DevParallel.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/Parallel/DevParallel.cpp	(revision 80704)
@@ -825,4 +825,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         0,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "Parallel Communication Port",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/Samples/DevPlayground.cpp
===================================================================
--- /trunk/src/VBox/Devices/Samples/DevPlayground.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/Samples/DevPlayground.cpp	(revision 80704)
@@ -352,4 +352,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         1,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "VBox Playground Device.",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/Samples/VBoxSampleDevice.cpp
===================================================================
--- /trunk/src/VBox/Devices/Samples/VBoxSampleDevice.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/Samples/VBoxSampleDevice.cpp	(revision 80704)
@@ -100,4 +100,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         0,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "VBox Sample Device.",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/Serial/DevOxPcie958.cpp
===================================================================
--- /trunk/src/VBox/Devices/Serial/DevOxPcie958.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/Serial/DevOxPcie958.cpp	(revision 80704)
@@ -632,5 +632,5 @@
     /* .uReserved0 = */             0,
     /* .szName = */                 "oxpcie958uart",
-    /* .fFlags = */                 PDM_DEVREG_FLAGS_DEFAULT_BITS | PDM_DEVREG_FLAGS_RC | PDM_DEVREG_FLAGS_R0 | PDM_DEVREG_FLAGS_MSI_X,
+    /* .fFlags = */                 PDM_DEVREG_FLAGS_DEFAULT_BITS | PDM_DEVREG_FLAGS_RC | PDM_DEVREG_FLAGS_R0,
     /* .fClass = */                 PDM_DEVREG_CLASS_SERIAL,
     /* .cMaxInstances = */          ~0U,
@@ -640,4 +640,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         1,
+    /* .cMaxMsixVectors = */        VBOX_MSIX_MAX_ENTRIES,
     /* .pszDescription = */         "OXPCIe958 based UART controller.\n",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/Serial/DevSerial.cpp
===================================================================
--- /trunk/src/VBox/Devices/Serial/DevSerial.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/Serial/DevSerial.cpp	(revision 80704)
@@ -479,4 +479,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         0,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "Serial Communication Port",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/Storage/DevAHCI.cpp
===================================================================
--- /trunk/src/VBox/Devices/Storage/DevAHCI.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/Storage/DevAHCI.cpp	(revision 80704)
@@ -6244,4 +6244,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         1,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "Intel AHCI controller.\n",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/Storage/DevATA.cpp
===================================================================
--- /trunk/src/VBox/Devices/Storage/DevATA.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/Storage/DevATA.cpp	(revision 80704)
@@ -8070,4 +8070,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         1,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "Intel PIIX3 ATA controller.\n"
                                     "  LUN #0 is primary master.\n"
Index: /trunk/src/VBox/Devices/Storage/DevBusLogic.cpp
===================================================================
--- /trunk/src/VBox/Devices/Storage/DevBusLogic.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/Storage/DevBusLogic.cpp	(revision 80704)
@@ -4505,4 +4505,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         1,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "BusLogic BT-958 SCSI host adapter.\n",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/Storage/DevFdc.cpp
===================================================================
--- /trunk/src/VBox/Devices/Storage/DevFdc.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/Storage/DevFdc.cpp	(revision 80704)
@@ -2849,4 +2849,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         0,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "Floppy drive controller (Intel 82078)",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp
===================================================================
--- /trunk/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp	(revision 80704)
@@ -5527,4 +5527,5 @@
     MsiReg.iMsixNextOffset = 0x00;
     MsiReg.iMsixBar        = 3;
+    Assert(pDevIns->pReg->cMaxMsixVectors >= MsiReg.cMsixVectors); /* fix device registration when enabling this */
 #  else
     MsiReg.cMsiVectors     = 1;
@@ -5752,4 +5753,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         1,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "LSI Logic 53c1030 SCSI controller.\n",
 #if defined(IN_RING3)
@@ -5826,4 +5828,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         1,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "LSI Logic SAS1068 controller.\n",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/Storage/DevVirtioSCSI.cpp
===================================================================
--- /trunk/src/VBox/Devices/Storage/DevVirtioSCSI.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/Storage/DevVirtioSCSI.cpp	(revision 80704)
@@ -2382,4 +2382,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         1,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "Virtio Host SCSI.\n",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/USB/DevOHCI.cpp
===================================================================
--- /trunk/src/VBox/Devices/USB/DevOHCI.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/USB/DevOHCI.cpp	(revision 80704)
@@ -6160,4 +6160,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         1,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "OHCI USB controller.\n",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/Devices/VMMDev/VMMDev.cpp
===================================================================
--- /trunk/src/VBox/Devices/VMMDev/VMMDev.cpp	(revision 80703)
+++ /trunk/src/VBox/Devices/VMMDev/VMMDev.cpp	(revision 80704)
@@ -4753,4 +4753,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         1,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "VirtualBox VMM Device\n",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/ExtPacks/BusMouseSample/BusMouse.cpp
===================================================================
--- /trunk/src/VBox/ExtPacks/BusMouseSample/BusMouse.cpp	(revision 80703)
+++ /trunk/src/VBox/ExtPacks/BusMouseSample/BusMouse.cpp	(revision 80704)
@@ -845,4 +845,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         0,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "Microsoft Bus Mouse controller. LUN #0 is the mouse connector.",
 # if defined(IN_RING3)
Index: /trunk/src/VBox/VMM/VMMAll/APICAll.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/APICAll.cpp	(revision 80703)
+++ /trunk/src/VBox/VMM/VMMAll/APICAll.cpp	(revision 80704)
@@ -3525,4 +3525,5 @@
     /* .cbInstanceRC = */           0,
     /* .cMaxPciDevices = */         0,
+    /* .cMaxMsixVectors = */        0,
     /* .pszDescription = */         "Advanced Programmable Interrupt Controller",
 #if defined(IN_RING3)
Index: /trunk/src/VBox/VMM/VMMR0/PDMR0Device.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR0/PDMR0Device.cpp	(revision 80703)
+++ /trunk/src/VBox/VMM/VMMR0/PDMR0Device.cpp	(revision 80704)
@@ -31,8 +31,9 @@
 #include <VBox/vmm/hm.h>
 #include <VBox/vmm/vmcc.h>
+#include <VBox/vmm/gvmm.h>
 
 #include <VBox/log.h>
 #include <VBox/err.h>
-#include <VBox/vmm/gvmm.h>
+#include <VBox/msi.h>
 #include <VBox/sup.h>
 #include <iprt/asm.h>
@@ -1813,4 +1814,6 @@
         AssertLogRelMsgReturn(pDevReg->cMaxInstances   > 0, ("[%u]: %#x\n", i, pDevReg->cMaxInstances),  VERR_INVALID_PARAMETER);
         AssertLogRelMsgReturn(pDevReg->cMaxPciDevices <= 8, ("[%u]: %#x\n", i, pDevReg->cMaxPciDevices), VERR_INVALID_PARAMETER);
+        AssertLogRelMsgReturn(pDevReg->cMaxMsixVectors <= VBOX_MSIX_MAX_ENTRIES,
+                              ("[%u]: %#x\n", i, pDevReg->cMaxMsixVectors), VERR_INVALID_PARAMETER);
 
         /* The name must be printable ascii and correctly terminated. */
Index: /trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp	(revision 80703)
+++ /trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp	(revision 80704)
@@ -1928,7 +1928,7 @@
                           ("'%s'/%d: cMaxPciDevices is 0\n", pDevIns->pReg->szName, pDevIns->iInstance),
                           VERR_WRONG_ORDER);
-    AssertLogRelMsgReturn((pDevIns->pReg->fFlags & PDM_DEVREG_FLAGS_MSI_X) || pMsiReg->cMsixVectors == 0,
-                          ("'%s'/%d: PDM_DEVREG_FLAGS_MSI_X not set and cMsixVectors=%u\n",
-                           pDevIns->pReg->szName, pDevIns->iInstance, pMsiReg->cMsixVectors),
+    AssertLogRelMsgReturn(pMsiReg->cMsixVectors <= pDevIns->pReg->cMaxMsixVectors,
+                          ("'%s'/%d: cMsixVectors=%u cMaxMsixVectors=%u\n",
+                           pDevIns->pReg->szName, pDevIns->iInstance, pMsiReg->cMsixVectors, pDevIns->pReg->cMaxMsixVectors),
                           VERR_INVALID_FLAGS);
 
Index: /trunk/src/VBox/VMM/VMMR3/PDMDevice.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/PDMDevice.cpp	(revision 80703)
+++ /trunk/src/VBox/VMM/VMMR3/PDMDevice.cpp	(revision 80704)
@@ -39,4 +39,5 @@
 #include <VBox/version.h>
 #include <VBox/log.h>
+#include <VBox/msi.h>
 #include <VBox/err.h>
 #include <iprt/alloc.h>
@@ -762,4 +763,7 @@
     AssertLogRelMsgReturn(pReg->cMaxPciDevices <= 8, ("%#x (szName=%s)\n", pReg->cMaxPciDevices, pReg->szName),
                           VERR_PDM_INVALID_DEVICE_REGISTRATION);
+    AssertLogRelMsgReturn(pReg->cMaxMsixVectors <= VBOX_MSIX_MAX_ENTRIES,
+                          ("%#x (szName=%s)\n", pReg->cMaxMsixVectors, pReg->szName),
+                          VERR_PDM_INVALID_DEVICE_REGISTRATION);
 
     /*
