Index: /trunk/src/VBox/Main/GuestImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/GuestImpl.cpp	(revision 28003)
+++ /trunk/src/VBox/Main/GuestImpl.cpp	(revision 28004)
@@ -38,4 +38,5 @@
 #include <iprt/cpp/utils.h>
 #include <iprt/getopt.h>
+#include <VBox/pgm.h>
 
 // defines
@@ -252,7 +253,7 @@
 }
 
-STDMETHODIMP Guest::InternalGetStatistics(ULONG aCpuId, ULONG *aCpuUser, ULONG *aCpuKernel, ULONG *aCpuIdle,
-                                          ULONG *aMemTotal, ULONG *aMemFree, ULONG *aMemBalloon, ULONG *aMemCache,
-                                          ULONG *aPageTotal)
+STDMETHODIMP Guest::InternalGetStatistics(ULONG *aCpuUser, ULONG *aCpuKernel, ULONG *aCpuIdle,
+                                          ULONG *aMemTotal, ULONG *aMemFree, ULONG *aMemBalloon, ULONG *aMemBalloonTotal,
+                                          ULONG *aMemCache, ULONG *aPageTotal)
 {
     CheckComArgOutPointerValid(aCpuUser);
@@ -275,7 +276,27 @@
     *aMemTotal = mCurrentGuestStat[GUESTSTATTYPE_MEMTOTAL];
     *aMemFree = mCurrentGuestStat[GUESTSTATTYPE_MEMFREE];
-    *aMemBalloon = mCurrentGuestStat[GUESTSTATTYPE_MEMBALLOON];
+
     *aMemCache = mCurrentGuestStat[GUESTSTATTYPE_MEMCACHE];
     *aPageTotal = mCurrentGuestStat[GUESTSTATTYPE_PAGETOTAL];
+
+    Console::SafeVMPtr pVM (mParent);
+    if (pVM.isOk())
+    {
+        unsigned uBalloon, uBalloonTotal;
+        *aMemBalloon      = 0;
+        *aMemBalloonTotal = 0;
+        int rc = PGMR3QueryBalloonSize(pVM.raw(), &uBalloon, &uBalloonTotal);
+        AssertRC(rc);
+        if (rc == VINF_SUCCESS)
+        {
+            *aMemBalloon      = uBalloon;
+            *aMemBalloonTotal = uBalloonTotal;
+        }
+    }
+    else
+    {
+        *aMemBalloon      = 0;
+        *aMemBalloonTotal = 0;
+    }
 
     return S_OK;
Index: /trunk/src/VBox/Main/HostImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/HostImpl.cpp	(revision 28003)
+++ /trunk/src/VBox/Main/HostImpl.cpp	(revision 28004)
@@ -2411,4 +2411,6 @@
     pm::SubMetric *ramUsageFree  = new pm::SubMetric("RAM/Usage/Free",
         "Physical memory currently available to applications.");
+    pm::SubMetric *ramUsageBalloon = new pm::SubMetric("RAM/Usage/Ballooned",
+        "Physical memory currently available from guest balloons.");
     /* Create and register base metrics */
     IUnknown *objptr;
@@ -2421,5 +2423,5 @@
     aCollector->registerBaseMetric (cpuMhz);
     pm::BaseMetric *ramUsage = new pm::HostRamUsage(hal, objptr, ramUsageTotal, ramUsageUsed,
-                                           ramUsageFree);
+                                           ramUsageFree, ramUsageBalloon);
     aCollector->registerBaseMetric (ramUsage);
 
@@ -2479,4 +2481,12 @@
     aCollector->registerMetric(new pm::Metric(ramUsage, ramUsageFree,
                                               new pm::AggregateMax()));
+
+    aCollector->registerMetric(new pm::Metric(ramUsage, ramUsageBalloon, 0));
+    aCollector->registerMetric(new pm::Metric(ramUsage, ramUsageBalloon,
+                                              new pm::AggregateAvg()));
+    aCollector->registerMetric(new pm::Metric(ramUsage, ramUsageBalloon,
+                                              new pm::AggregateMin()));
+    aCollector->registerMetric(new pm::Metric(ramUsage, ramUsageBalloon,
+                                              new pm::AggregateMax()));
 };
 
Index: /trunk/src/VBox/Main/Performance.cpp
===================================================================
--- /trunk/src/VBox/Main/Performance.cpp	(revision 28003)
+++ /trunk/src/VBox/Main/Performance.cpp	(revision 28004)
@@ -168,6 +168,8 @@
         &&  iTick != mLastTick)
     {
-        mGuest->InternalGetStatistics(0, &mCpuUser, &mCpuKernel, &mCpuIdle,
-                                      &mMemTotal, &mMemFree, &mMemBalloon, &mMemCache,
+        ULONG ulMemBalloonTotal;
+
+        mGuest->InternalGetStatistics(&mCpuUser, &mCpuKernel, &mCpuIdle,
+                                      &mMemTotal, &mMemFree, &mMemBalloon, &ulMemBalloonTotal, &mMemCache,
                                       &mPageTotal);
         mLastTick = iTick;
Index: /trunk/src/VBox/Main/PerformanceImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/PerformanceImpl.cpp	(revision 28003)
+++ /trunk/src/VBox/Main/PerformanceImpl.cpp	(revision 28004)
@@ -68,4 +68,8 @@
     "RAM/Usage/Free:min",
     "RAM/Usage/Free:max",
+    "RAM/Usage/Ballooned",
+    "RAM/Usage/Ballooned:avg",
+    "RAM/Usage/Ballooned:min",
+    "RAM/Usage/Ballooned:max",
     "Guest/CPU/Load/User",
     "Guest/CPU/Load/User:avg",
Index: /trunk/src/VBox/Main/idl/VirtualBox.xidl
===================================================================
--- /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 28003)
+++ /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 28004)
@@ -8271,5 +8271,5 @@
   <interface
     name="IGuestOSType" extends="$unknown"
-    uuid="8cec1502-8869-42e3-9d9c-45f0d1bb0861"
+    uuid="3fcf2078-3c69-45ca-bd5c-79c3e3c15362"
     wsmap="struct"
   >
@@ -8353,5 +8353,5 @@
   <interface
      name="IGuest" extends="$unknown"
-     uuid="a2c749bb-55df-46a4-8d88-567ee1503fff"
+     uuid="8e809ebd-c842-4952-8073-c9c07045c9a2"
      wsmap="managed"
      >
@@ -8426,7 +8426,4 @@
          Internal method; do not use as it might change at any time
       </desc> 
-      <param name="cpuId" type="unsigned long" dir="in"> 
-         <desc>Virtual CPU id</desc> 
-      </param> 
       <param name="cpuUser" type="unsigned long" dir="out"> 
          <desc>Percentage of processor time spent in user mode as seen by the guest</desc> 
@@ -8446,4 +8443,7 @@
       <param name="memBalloon" type="unsigned long" dir="out"> 
          <desc>Amount of ballooned physical guest RAM</desc> 
+      </param> 
+      <param name="memBalloonTotal" type="unsigned long" dir="out"> 
+         <desc>Amount of ballooned physical guest RAM for all running VMs</desc> 
       </param> 
       <param name="memCache" type="unsigned long" dir="out"> 
Index: /trunk/src/VBox/Main/include/GuestImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/GuestImpl.h	(revision 28003)
+++ /trunk/src/VBox/Main/include/GuestImpl.h	(revision 28004)
@@ -88,6 +88,6 @@
                               IN_BSTR aUserName, IN_BSTR aPassword,
                               ULONG aTimeoutMS, ULONG* aPID, IProgress **aProgress);
-    STDMETHOD(InternalGetStatistics)(ULONG aCpuId, ULONG *aCpuUser, ULONG *aCpuKernel, ULONG *aCpuIdle,
-                                     ULONG *aMemTotal, ULONG *aMemFree, ULONG *aMemBalloon, ULONG *aMemCache,
+    STDMETHOD(InternalGetStatistics)(ULONG *aCpuUser, ULONG *aCpuKernel, ULONG *aCpuIdle,
+                                     ULONG *aMemTotal, ULONG *aMemFree, ULONG *aMemBalloon, ULONG *aMemBalloonTotal, ULONG *aMemCache,
                                      ULONG *aPageTotal);
 
Index: /trunk/src/VBox/Main/include/Performance.h
===================================================================
--- /trunk/src/VBox/Main/include/Performance.h	(revision 28003)
+++ /trunk/src/VBox/Main/include/Performance.h	(revision 28004)
@@ -189,9 +189,9 @@
         void getGuestMemLoad(ULONG *pulMemTotal, ULONG *pulMemFree, ULONG *pulMemBalloon, ULONG *pulMemCache, ULONG *pulPageTotal)
         {
-            *pulMemTotal   = mMemTotal;
-            *pulMemFree    = mMemFree;
-            *pulMemBalloon = mMemBalloon;
-            *pulMemCache   = mMemCache;
-            *pulPageTotal  = mPageTotal;
+            *pulMemTotal        = mMemTotal;
+            *pulMemFree         = mMemFree;
+            *pulMemBalloon      = mMemBalloon;
+            *pulMemCache        = mMemCache;
+            *pulPageTotal       = mPageTotal;
         }
 
@@ -318,7 +318,7 @@
     {
     public:
-        HostRamUsage(CollectorHAL *hal, ComPtr<IUnknown> object, SubMetric *total, SubMetric *used, SubMetric *available)
-        : BaseMetric(hal, "RAM/Usage", object), mTotal(total), mUsed(used), mAvailable(available) {};
-        ~HostRamUsage() { delete mTotal; delete mUsed; delete mAvailable; };
+        HostRamUsage(CollectorHAL *hal, ComPtr<IUnknown> object, SubMetric *total, SubMetric *used, SubMetric *available, SubMetric *ballooned)
+        : BaseMetric(hal, "RAM/Usage", object), mTotal(total), mUsed(used), mAvailable(available), mBallooned(ballooned) {};
+        ~HostRamUsage() { delete mTotal; delete mUsed; delete mAvailable; delete mBallooned; };
 
         void init(ULONG period, ULONG length);
@@ -333,4 +333,5 @@
         SubMetric *mUsed;
         SubMetric *mAvailable;
+        SubMetric *mBallooned;
     };
 
