Index: /trunk/src/VBox/Main/GuestImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/GuestImpl.cpp	(revision 29224)
+++ /trunk/src/VBox/Main/GuestImpl.cpp	(revision 29225)
@@ -208,4 +208,14 @@
 }
 
+STDMETHODIMP Guest::COMGETTER(SharedPagingEnabled) (BOOL *enabled)
+{
+    return E_NOTIMPL;
+}
+
+STDMETHODIMP Guest::COMSETTER(SharedPagingEnabled) (BOOL enabled)
+{
+    return E_NOTIMPL;
+}
+
 STDMETHODIMP Guest::COMGETTER(MemoryBalloonSize) (ULONG *aMemoryBalloonSize)
 {
@@ -274,7 +284,7 @@
 
 STDMETHODIMP Guest::InternalGetStatistics(ULONG *aCpuUser, ULONG *aCpuKernel, ULONG *aCpuIdle,
-                                          ULONG *aMemTotal, ULONG *aMemFree, ULONG *aMemBalloon,
+                                          ULONG *aMemTotal, ULONG *aMemFree, ULONG *aMemBalloon, ULONG *aMemShared,
                                           ULONG *aMemCache, ULONG *aPageTotal,
-                                          ULONG *aMemAllocTotal, ULONG *aMemFreeTotal, ULONG *aMemBalloonTotal)
+                                          ULONG *aMemAllocTotal, ULONG *aMemFreeTotal, ULONG *aMemBalloonTotal, ULONG *aMemSharedTotal)
 {
     CheckComArgOutPointerValid(aCpuUser);
@@ -284,6 +294,11 @@
     CheckComArgOutPointerValid(aMemFree);
     CheckComArgOutPointerValid(aMemBalloon);
+    CheckComArgOutPointerValid(aMemShared);
     CheckComArgOutPointerValid(aMemCache);
     CheckComArgOutPointerValid(aPageTotal);
+    CheckComArgOutPointerValid(aMemAllocTotal);
+    CheckComArgOutPointerValid(aMemFreeTotal);
+    CheckComArgOutPointerValid(aMemBalloonTotal);
+    CheckComArgOutPointerValid(aMemSharedTotal);
 
     AutoCaller autoCaller(this);
@@ -292,12 +307,13 @@
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    *aCpuUser = mCurrentGuestStat[GUESTSTATTYPE_CPUUSER];
-    *aCpuKernel = mCurrentGuestStat[GUESTSTATTYPE_CPUKERNEL];
-    *aCpuIdle = mCurrentGuestStat[GUESTSTATTYPE_CPUIDLE];
-    *aMemTotal = mCurrentGuestStat[GUESTSTATTYPE_MEMTOTAL] * (_4K/_1K);     /* page (4K) -> 1KB units */
-    *aMemFree = mCurrentGuestStat[GUESTSTATTYPE_MEMFREE] * (_4K/_1K);       /* page (4K) -> 1KB units */
+    *aCpuUser    = mCurrentGuestStat[GUESTSTATTYPE_CPUUSER];
+    *aCpuKernel  = mCurrentGuestStat[GUESTSTATTYPE_CPUKERNEL];
+    *aCpuIdle    = mCurrentGuestStat[GUESTSTATTYPE_CPUIDLE];
+    *aMemTotal   = mCurrentGuestStat[GUESTSTATTYPE_MEMTOTAL] * (_4K/_1K);     /* page (4K) -> 1KB units */
+    *aMemFree    = mCurrentGuestStat[GUESTSTATTYPE_MEMFREE] * (_4K/_1K);       /* page (4K) -> 1KB units */
     *aMemBalloon = mCurrentGuestStat[GUESTSTATTYPE_MEMBALLOON] * (_4K/_1K); /* page (4K) -> 1KB units */
-    *aMemCache = mCurrentGuestStat[GUESTSTATTYPE_MEMCACHE] * (_4K/_1K);     /* page (4K) -> 1KB units */
-    *aPageTotal = mCurrentGuestStat[GUESTSTATTYPE_PAGETOTAL] * (_4K/_1K);   /* page (4K) -> 1KB units */
+    *aMemCache   = mCurrentGuestStat[GUESTSTATTYPE_MEMCACHE] * (_4K/_1K);     /* page (4K) -> 1KB units */
+    *aPageTotal  = mCurrentGuestStat[GUESTSTATTYPE_PAGETOTAL] * (_4K/_1K);   /* page (4K) -> 1KB units */
+    *aMemShared  = 0; /** todo */
 
     Console::SafeVMPtr pVM (mParent);
@@ -313,4 +329,5 @@
             *aMemFreeTotal    = (ULONG)(uFreeTotal / _1K);
             *aMemBalloonTotal = (ULONG)(uBalloonedTotal / _1K);
+            *aMemSharedTotal  = 0; /** todo */
         }
     }
Index: /trunk/src/VBox/Main/MachineImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/MachineImpl.cpp	(revision 29224)
+++ /trunk/src/VBox/Main/MachineImpl.cpp	(revision 29225)
@@ -1462,4 +1462,14 @@
     return setError(E_NOTIMPL, tr("Memory ballooning is only supported on 64-bit hosts"));
 #endif
+}
+
+STDMETHODIMP Machine::COMGETTER(SharedPagingEnabled) (BOOL *enabled)
+{
+    return E_NOTIMPL;
+}
+
+STDMETHODIMP Machine::COMSETTER(SharedPagingEnabled) (BOOL enabled)
+{
+    return E_NOTIMPL;
 }
 
Index: /trunk/src/VBox/Main/Performance.cpp
===================================================================
--- /trunk/src/VBox/Main/Performance.cpp	(revision 29224)
+++ /trunk/src/VBox/Main/Performance.cpp	(revision 29225)
@@ -164,9 +164,10 @@
         &&  iTick != mLastTick)
     {
-        ULONG ulMemAllocTotal, ulMemFreeTotal, ulMemBalloonTotal;
-
+        ULONG ulMemAllocTotal, ulMemFreeTotal, ulMemBalloonTotal, ulMemSharedTotal, uMemShared;
+
+        /** todo shared stats. */
         mGuest->InternalGetStatistics(&mCpuUser, &mCpuKernel, &mCpuIdle,
-                                      &mMemTotal, &mMemFree, &mMemBalloon, &mMemCache,
-                                      &mPageTotal, &ulMemAllocTotal, &ulMemFreeTotal, &ulMemBalloonTotal);
+                                      &mMemTotal, &mMemFree, &mMemBalloon, &mMemCache, &uMemShared,
+                                      &mPageTotal, &ulMemAllocTotal, &ulMemFreeTotal, &ulMemBalloonTotal, &ulMemSharedTotal);
 
         if (mHostHAL)
Index: /trunk/src/VBox/Main/idl/VirtualBox.xidl
===================================================================
--- /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 29224)
+++ /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 29225)
@@ -4420,4 +4420,11 @@
     </attribute>
 
+    <attribute name="SharedPagingEnabled" type="boolean">
+      <desc>
+        This setting determines whether VirtualBox allows page
+        sharing for this machine (64 bits host only).
+      </desc>
+    </attribute>
+
     <attribute name="VRAMSize" type="unsigned long">
       <desc>Video memory size in megabytes.</desc>
@@ -8564,4 +8571,11 @@
     </attribute>
 
+    <attribute name="SharedPagingEnabled" type="boolean">
+      <desc>
+        Flag whether VirtualBox allows page sharing for this machine 
+        (64 bits host only; transient property).
+      </desc>
+    </attribute>
+
     <attribute name="statisticsUpdateInterval" type="unsigned long">
       <desc>Interval to update guest statistics in seconds.</desc>
@@ -8590,4 +8604,7 @@
          <desc>Amount of ballooned physical guest RAM</desc>
       </param>
+      <param name="memShared" type="unsigned long" dir="out">
+        <desc>Amount of shared physical guest RAM</desc>
+      </param>
       <param name="memCache" type="unsigned long" dir="out">
          <desc>Total amount of guest (disk) cache memory</desc>
@@ -8604,4 +8621,7 @@
       <param name="memBalloonTotal" type="unsigned long" dir="out">
          <desc>Total amount of memory ballooned by the hypervisor</desc>
+      </param>
+      <param name="memSharedTotal" type="unsigned long" dir="out">
+        <desc>Total amount of shared memory in the hypervisor</desc>
       </param>
     </method>
Index: /trunk/src/VBox/Main/include/GuestImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/GuestImpl.h	(revision 29224)
+++ /trunk/src/VBox/Main/include/GuestImpl.h	(revision 29225)
@@ -80,4 +80,6 @@
     STDMETHOD(COMGETTER(SupportsSeamless)) (BOOL *aSupportsSeamless);
     STDMETHOD(COMGETTER(SupportsGraphics)) (BOOL *aSupportsGraphics);
+    STDMETHOD(COMGETTER(SharedPagingEnabled)) (BOOL *enabled);
+    STDMETHOD(COMSETTER(SharedPagingEnabled)) (BOOL enabled);
     STDMETHOD(COMGETTER(MemoryBalloonSize)) (ULONG *aMemoryBalloonSize);
     STDMETHOD(COMSETTER(MemoryBalloonSize)) (ULONG aMemoryBalloonSize);
@@ -96,6 +98,6 @@
     STDMETHOD(GetProcessStatus)(ULONG aPID, ULONG *aExitCode, ULONG *aFlags, ULONG *aStatus);
     STDMETHOD(InternalGetStatistics)(ULONG *aCpuUser, ULONG *aCpuKernel, ULONG *aCpuIdle,
-                                     ULONG *aMemTotal, ULONG *aMemFree, ULONG *aMemBalloon, ULONG *aMemCache,
-                                     ULONG *aPageTotal, ULONG *aMemAllocTotal, ULONG *aMemFreeTotal, ULONG *aMemBalloonTotal);
+                                     ULONG *aMemTotal, ULONG *aMemFree, ULONG *aMemBalloon, ULONG *aMemShared, ULONG *aMemCache,
+                                     ULONG *aPageTotal, ULONG *aMemAllocTotal, ULONG *aMemFreeTotal, ULONG *aMemBalloonTotal, ULONG *aMemSharedTotal);
 
     // public methods that are not in IDL
Index: /trunk/src/VBox/Main/include/MachineImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/MachineImpl.h	(revision 29224)
+++ /trunk/src/VBox/Main/include/MachineImpl.h	(revision 29225)
@@ -393,4 +393,6 @@
     STDMETHOD(COMGETTER(MemoryBalloonSize))(ULONG *memoryBalloonSize);
     STDMETHOD(COMSETTER(MemoryBalloonSize))(ULONG memoryBalloonSize);
+    STDMETHOD(COMGETTER(SharedPagingEnabled))(BOOL *enabled);
+    STDMETHOD(COMSETTER(SharedPagingEnabled))(BOOL enabled);
     STDMETHOD(COMGETTER(VRAMSize))(ULONG *memorySize);
     STDMETHOD(COMSETTER(VRAMSize))(ULONG memorySize);
