Index: /trunk/src/VBox/Main/MachineImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/MachineImpl.cpp	(revision 29461)
+++ /trunk/src/VBox/Main/MachineImpl.cpp	(revision 29462)
@@ -162,4 +162,5 @@
     mCPUHotPlugEnabled = false;
     mMemoryBalloonSize = 0;
+    mPageFusionEnabled = false;
     mVRAMSize = 8;
     mAccelerate3DEnabled = false;
@@ -1465,12 +1466,33 @@
 STDMETHODIMP Machine::COMGETTER(PageFusionEnabled) (BOOL *enabled)
 {
+    if (!enabled)
+        return E_POINTER;
+
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+    *enabled = mHWData->mPageFusionEnabled;
+    return S_OK;
+}
+
+STDMETHODIMP Machine::COMSETTER(PageFusionEnabled) (BOOL enabled)
+{
+    /* This must match GMMR0Init; currently we only support memory ballooning on all 64-bit hosts except Mac OS X */
+#if HC_ARCH_BITS == 64 && (defined(RT_OS_WINDOWS) || defined(RT_OS_SOLARIS) || defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD))
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+    setModified(IsModified_MachineData);
+    mHWData.backup();
+    mHWData->mPageFusionEnabled = enabled;
+    return S_OK;
+#else
     NOREF(enabled);
-    return E_NOTIMPL;
-}
-
-STDMETHODIMP Machine::COMSETTER(PageFusionEnabled) (BOOL enabled)
-{
-    NOREF(enabled);
-    return E_NOTIMPL;
+    return setError(E_NOTIMPL, tr("Page fusion is only supported on 64-bit hosts"));
+#endif
 }
 
@@ -6769,4 +6791,5 @@
 
         mHWData->mMemorySize = data.ulMemorySizeMB;
+        mHWData->mPageFusionEnabled = data.fPageFusionEnabled;
 
         // boot order
@@ -7827,4 +7850,5 @@
         // memory
         data.ulMemorySizeMB = mHWData->mMemorySize;
+        data.fPageFusionEnabled = mHWData->mPageFusionEnabled;
 
         // firmware
Index: /trunk/src/VBox/Main/include/MachineImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/MachineImpl.h	(revision 29461)
+++ /trunk/src/VBox/Main/include/MachineImpl.h	(revision 29462)
@@ -259,4 +259,5 @@
         ULONG                mMemorySize;
         ULONG                mMemoryBalloonSize;
+        BOOL                 mPageFusionEnabled;
         ULONG                mVRAMSize;
         ULONG                mMonitorCount;
Index: /trunk/src/VBox/Main/xml/Settings.cpp
===================================================================
--- /trunk/src/VBox/Main/xml/Settings.cpp	(revision 29461)
+++ /trunk/src/VBox/Main/xml/Settings.cpp	(revision 29462)
@@ -1491,5 +1491,6 @@
           keyboardHidType(KeyboardHidType_PS2Keyboard),
           clipboardMode(ClipboardMode_Bidirectional),
-          ulMemoryBalloonSize(0)
+          ulMemoryBalloonSize(0),
+          fPageFusionEnabled(false)
 {
     mapBootOrder[0] = DeviceType_Floppy;
@@ -1547,4 +1548,5 @@
                   && (clipboardMode             == h.clipboardMode)
                   && (ulMemoryBalloonSize       == h.ulMemoryBalloonSize)
+                  && (fPageFusionEnabled        == h.fPageFusionEnabled)
                   && (llGuestProperties         == h.llGuestProperties)
                   && (strNotificationPatterns   == h.strNotificationPatterns)
@@ -2173,5 +2175,8 @@
         }
         else if (pelmHwChild->nameEquals("Memory"))
+        {
             pelmHwChild->getAttributeValue("RAMSize", hw.ulMemorySizeMB);
+            pelmHwChild->getAttributeValue("PageFusion", hw.fPageFusionEnabled);
+        }
         else if (pelmHwChild->nameEquals("Firmware"))
         {
@@ -3129,4 +3134,8 @@
     xml::ElementNode *pelmMemory = pelmHardware->createChild("Memory");
     pelmMemory->setAttribute("RAMSize", hw.ulMemorySizeMB);
+    if (m->sv >= SettingsVersion_v1_10)
+    {
+        pelmMemory->setAttribute("PageFusion", hw.fPageFusionEnabled);
+    }
 
     if (    (m->sv >= SettingsVersion_v1_9)
