Index: trunk/src/VBox/Devices/PC/DevACPI.cpp
===================================================================
--- trunk/src/VBox/Devices/PC/DevACPI.cpp	(revision 65840)
+++ trunk/src/VBox/Devices/PC/DevACPI.cpp	(revision 65843)
@@ -171,5 +171,5 @@
     SYSTEM_INFO_INDEX_SERIAL3_IOBASE    = 7,
     SYSTEM_INFO_INDEX_SERIAL3_IRQ       = 8,
-    SYSTEM_INFO_INDEX_PREF64_MEMORY_START = 9,
+    SYSTEM_INFO_INDEX_PREF64_MEMORY_MIN = 9,
     SYSTEM_INFO_INDEX_RTC_STATUS        = 10,
     SYSTEM_INFO_INDEX_CPU_LOCKED        = 11, /**< Contains a flag indicating whether the CPU is locked or not */
@@ -192,5 +192,6 @@
     SYSTEM_INFO_INDEX_PARALLEL1_IOBASE  = 28,
     SYSTEM_INFO_INDEX_PARALLEL1_IRQ     = 29,
-    SYSTEM_INFO_INDEX_END               = 30,
+    SYSTEM_INFO_INDEX_PREF64_MEMORY_MAX = 30,
+    SYSTEM_INFO_INDEX_END               = 31,
     SYSTEM_INFO_INDEX_INVALID           = 0x80,
     SYSTEM_INFO_INDEX_VALID             = 0x200
@@ -309,5 +310,7 @@
     uint64_t            u64RamSize;
     /** Offset of the 64-bit prefetchable memory window. */
-    uint64_t            u64PciPref64;
+    uint64_t            u64PciPref64Min;
+    /** Limit of the 64-bit prefetchable memory window. */
+    uint64_t            u64PciPref64Max;
     /** The number of bytes below 4GB. */
     uint32_t            cbRamLow;
@@ -1326,7 +1329,13 @@
             break;
 
-        case SYSTEM_INFO_INDEX_PREF64_MEMORY_START:
-            *pu32 = pThis->u64PciPref64 >> 16; /* 64KB units */
-            Assert(((uint64_t)*pu32 << 16) == pThis->u64PciPref64);
+        case SYSTEM_INFO_INDEX_PREF64_MEMORY_MIN:
+            *pu32 = pThis->u64PciPref64Min >> 16; /* 64KB units */
+            Assert(((uint64_t)*pu32 << 16) == pThis->u64PciPref64Min);
+            break;
+
+        case SYSTEM_INFO_INDEX_PREF64_MEMORY_MAX:
+            *pu32 = pThis->u64PciPref64Max >> 16; /* 64KB units */
+            Assert(((uint64_t)*pu32 << 16) == pThis->u64PciPref64Max);
+            LogRel(("MAX\n"));
             break;
 
@@ -3139,7 +3148,7 @@
         /* Activate MEM4 */
         if (pThis->u64RamSize > offRamHole)
-            pThis->u64PciPref64 = RT_ALIGN_64(pThis->u64RamSize + cbRamHole, _1G);
+            pThis->u64PciPref64Min = RT_ALIGN_64(pThis->u64RamSize + cbRamHole, _1M);
         else
-            pThis->u64PciPref64 = _4G;
+            pThis->u64PciPref64Min = _4G;
     }
     uint64_t cbRamLow = pThis->u64RamSize > offRamHole ? offRamHole : pThis->u64RamSize;
@@ -3569,4 +3578,5 @@
                               "McfgLength\0"
                               "PciPref64Enabled\0"
+                              "PciPref64Limit\0"
                               "SmcEnabled\0"
                               "FdcEnabled\0"
@@ -3641,4 +3651,10 @@
         return PDMDEV_SET_ERROR(pDevIns, rc,
                                 N_("Configuration error: Failed to read \"PciPref64Enabled\""));
+
+    /* query the limit of the the 64-bit prefetchable memory window */
+    rc = CFGMR3QueryU64Def(pCfg, "PciPref64Limit", &pThis->u64PciPref64Max, _1G64*64);
+    if (RT_FAILURE(rc))
+        return PDMDEV_SET_ERROR(pDevIns, rc,
+                                N_("Configuration error: Failed to read \"PciPref64Limit\""));
 
     /* query whether we are supposed to present custom table */
Index: trunk/src/VBox/Devices/PC/vbox.dsl
===================================================================
--- trunk/src/VBox/Devices/PC/vbox.dsl	(revision 65840)
+++ trunk/src/VBox/Devices/PC/vbox.dsl	(revision 65843)
@@ -338,5 +338,5 @@
     IndexField (IDX0, DAT0, DwordAcc, NoLock, Preserve)
     {
-        MEML,  32,
+        MEML,  32, // low-memory length (64KB units)
         UIOA,  32, // if IO APIC enabled
         UHPT,  32, // if HPET enabled
@@ -347,5 +347,5 @@
         SL3B,  32, // Serial3 base IO address
         SL3I,  32, // Serial3 IRQ
-        PMEM,  32,
+        PMNN,  32, // start of 64-bit prefetch window (64KB units)
         URTC,  32, // if RTC shown in tables
         CPUL,  32, // flag of CPU lock state
@@ -368,4 +368,5 @@
         PP1B,  32, // Parallel1 base IO address
         PP1I,  32, // Parallel1 IRQ
+        PMNX,  32, // limit of 64-bit prefetch window (64KB units)
         Offset (0x80),
         ININ, 32,
@@ -389,6 +390,6 @@
             DBG ("UFDC: ")
             HEX4 (UFDC)
-            DBG ("PMEM: ")
-            HEX4 (PMEM)
+            DBG ("PMNN: ")
+            HEX4 (PMNN)
         }
 
@@ -1580,7 +1581,7 @@
                     0x0000000000000000,       // _GRA: Granularity.
                     0x0000000100000000,       // _MIN: Min address, def. 4GB, will be overwritten.
-                    0x00000fffffffffff,       // _MAX: Max possible address, 16TB-1, fixed.
+                    0x0000000fffffffff,       // _MAX: Max address, def. 64GB-1, will be overwritten.
                     0x0000000000000000,       // _TRA: Translation
-                    0x00000fff00000000,       // _LEN: Range length (calculated from _MIN)
+                    0x0000000f00000000,       // _LEN: Range length (_MAX-_MIN+1)
                     ,                         // ResourceSourceIndex: Optional field left blank
                     ,                         // ResourceSource:      Optional field left blank
@@ -1597,5 +1598,5 @@
                 Subtract (0xfe000000, RAMT, RAMR)
 
-                if (LNotEqual (PMEM, 0x00000000))
+                if (LNotEqual (PMNN, 0x00000000))
                 {
                     // Not for Windows < 7!
@@ -1606,5 +1607,6 @@
                         CreateQwordField (TOM, \_SB.PCI0.MEM4._LEN, TM4L)
 
-                        Multiply (PMEM, 0x10000, TM4N)       // PMEM in units of 64KB
+                        Multiply (PMNN, 0x10000, TM4N)       // PMNN in units of 64KB
+                        Subtract (Multiply (PMNX, 0x10000), 1, TM4X) // PMNX in units of 64KB
                         Add (Subtract (TM4X, TM4N), 1, TM4L) // determine LEN, MAX is already there
 
Index: trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
===================================================================
--- trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp	(revision 65840)
+++ trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp	(revision 65843)
@@ -3228,5 +3228,8 @@
                 InsertConfigInteger(pCfg,  "McfgBase",   uMcfgBase);
                 InsertConfigInteger(pCfg,  "McfgLength", cbMcfgLength);
-                InsertConfigInteger(pCfg,  "PciPref64Enabled", 1);
+                /* 64-bit prefetch window root resource:
+                 * Only for ICH9 and if PAE or Long Mode is enabled */
+                if (fEnablePAE || fIsGuest64Bit)
+                    InsertConfigInteger(pCfg,  "PciPref64Enabled", 1);
             }
             InsertConfigInteger(pCfg,  "HostBusPciAddress", uHbcPCIAddress);
