Index: /trunk/src/VBox/Devices/Network/DevVirtioNet_1_0.cpp
===================================================================
--- /trunk/src/VBox/Devices/Network/DevVirtioNet_1_0.cpp	(revision 83602)
+++ /trunk/src/VBox/Devices/Network/DevVirtioNet_1_0.cpp	(revision 83603)
@@ -1450,5 +1450,5 @@
         AssertMsgReturnStmt(rc == VINF_SUCCESS && pDescChain->cbPhysReturn,
                             ("Not enough Rx buffers in queue to accomodate ethernet packet\n"),
-                            virtioCoreR3DescChainRelease(pDescChain),
+                            virtioCoreR3DescChainRelease(&pThis->Virtio, pDescChain),
                             VERR_INTERNAL_ERROR);
 
@@ -1458,5 +1458,5 @@
         AssertMsgReturnStmt(pDescChain->pSgPhysReturn->paSegs[0].cbSeg >= sizeof(VIRTIONET_PKT_HDR_T),
                             ("Desc chain's first seg has insufficient space for pkt header!\n"),
-                            virtioCoreR3DescChainRelease(pDescChain),
+                            virtioCoreR3DescChainRelease(&pThis->Virtio, pDescChain),
                             VERR_INTERNAL_ERROR);
 
@@ -1507,5 +1507,5 @@
         }
 
-        virtioCoreR3DescChainRelease(pDescChain);
+        virtioCoreR3DescChainRelease(&pThis->Virtio, pDescChain);
     }
 
@@ -2079,5 +2079,5 @@
         {
             LogFunc(("%s failed to find expected data on %s, rc = %Rrc\n", INSTANCE(pThis), VIRTQNAME(idxQueue), rc));
-            virtioCoreR3DescChainRelease(pDescChain);
+            virtioCoreR3DescChainRelease(pVirtio, pDescChain);
             break;
         }
@@ -2151,5 +2151,5 @@
                 Log4Func(("Failed to allocate S/G buffer: size=%u rc=%Rrc\n", uSize, rc));
                 /* Stop trying to fetch TX descriptors until we get more bandwidth. */
-                virtioCoreR3DescChainRelease(pDescChain);
+                virtioCoreR3DescChainRelease(pVirtio, pDescChain);
                 break;
             }
@@ -2164,5 +2164,5 @@
         }
 
-        virtioCoreR3DescChainRelease(pDescChain);
+        virtioCoreR3DescChainRelease(pVirtio, pDescChain);
         pDescChain = NULL;
     }
@@ -2288,5 +2288,5 @@
                  }
                  virtioNetR3Ctrl(pDevIns, pThis, pThisCC, pDescChain);
-                 virtioCoreR3DescChainRelease(pDescChain);
+                 virtioCoreR3DescChainRelease(&pThis->Virtio, pDescChain);
              }
              else if (IS_TX_QUEUE(idxQueue))
Index: /trunk/src/VBox/Devices/Storage/DevVirtioSCSI.cpp
===================================================================
--- /trunk/src/VBox/Devices/Storage/DevVirtioSCSI.cpp	(revision 83602)
+++ /trunk/src/VBox/Devices/Storage/DevVirtioSCSI.cpp	(revision 83603)
@@ -368,6 +368,4 @@
     /** The ring-3 device instance so we can easily get our bearings. */
     PPDMDEVINSR3                    pDevIns;
-    PPDMDEVINSRC                    pDevInsRC;
-    PPDMDEVINSR0                    pDevInsR0;
 
     /** Pointer to attached driver's base interface. */
@@ -742,5 +740,5 @@
     virtioCoreR3QueuePut(pDevIns, &pThis->Virtio, EVENTQ_IDX, &ReqSgBuf, pDescChain, true /*fFence*/);
     virtioCoreQueueSync(pDevIns, &pThis->Virtio, EVENTQ_IDX);
-    virtioCoreR3DescChainRelease(pDescChain);
+    virtioCoreR3DescChainRelease(&pThis->Virtio, pDescChain);
 
     return VINF_SUCCESS;
@@ -750,7 +748,8 @@
 static void virtioScsiR3FreeReq(PVIRTIOSCSITARGET pTarget, PVIRTIOSCSIREQ pReq)
 {
+    PVIRTIOSCSI pThis = PDMDEVINS_2_DATA(pTarget->pDevIns, PVIRTIOSCSI);
     RTMemFree(pReq->pbSense);
     pReq->pbSense = NULL;
-    virtioCoreR3DescChainRelease(pReq->pDescChain);
+    virtioCoreR3DescChainRelease(&pThis->Virtio, pReq->pDescChain);
     pReq->pDescChain = NULL;
     pTarget->pDrvMediaEx->pfnIoReqFree(pTarget->pDrvMediaEx, pReq->hIoReq);
@@ -1560,5 +1559,5 @@
                       LogRel(("Error submitting req packet, resetting %Rrc", rc));
 
-                  virtioCoreR3DescChainRelease(pDescChain);
+                  virtioCoreR3DescChainRelease(&pThis->Virtio, pDescChain);
              }
              pWorkerR3->cRedoDescs = 0;
@@ -1583,5 +1582,5 @@
              }
 
-             virtioCoreR3DescChainRelease(pDescChain);
+             virtioCoreR3DescChainRelease(&pThis->Virtio, pDescChain);
         }
     }
Index: /trunk/src/VBox/Devices/VirtIO/Virtio_1_0.cpp
===================================================================
--- /trunk/src/VBox/Devices/VirtIO/Virtio_1_0.cpp	(revision 83602)
+++ /trunk/src/VBox/Devices/VirtIO/Virtio_1_0.cpp	(revision 83603)
@@ -693,4 +693,5 @@
         pDescChain->pSgPhysReturn = &pDescChain->SgBufIn;
         pDescChain->cbPhysReturn  = cbIn;
+        STAM_REL_COUNTER_ADD(&pVirtio->StatDescChainsSegsIn, cSegsIn);
     }
 
@@ -700,6 +701,8 @@
         pDescChain->pSgPhysSend   = &pDescChain->SgBufOut;
         pDescChain->cbPhysSend    = cbOut;
-    }
-
+        STAM_REL_COUNTER_ADD(&pVirtio->StatDescChainsSegsOut, cSegsOut);
+    }
+
+    STAM_REL_COUNTER_INC(&pVirtio->StatDescChainsAllocated);
     Log6Func(("%s -- segs OUT: %u (%u bytes)   IN: %u (%u bytes) --\n", pVirtq->szVirtqName, cSegsOut, cbOut, cSegsIn, cbIn));
 
@@ -731,8 +734,9 @@
  * @returns New reference count.
  * @retval  0 if freed or invalid parameter.
+ * @param   pVirtio         Pointer to the shared virtio state.
  * @param   pDescChain      The descriptor chain to reference.  NULL is quietly
  *                          ignored (returns 0).
  */
-uint32_t virtioCoreR3DescChainRelease(PVIRTIO_DESC_CHAIN_T pDescChain)
+uint32_t virtioCoreR3DescChainRelease(PVIRTIOCORE pVirtio, PVIRTIO_DESC_CHAIN_T pDescChain)
 {
     if (!pDescChain)
@@ -746,4 +750,5 @@
         pDescChain->u32Magic = ~VIRTIO_DESC_CHAIN_MAGIC;
         RTMemFree(pDescChain);
+        STAM_REL_COUNTER_INC(&pVirtio->StatDescChainsFreed);
     }
     return cRefs;
@@ -2103,5 +2108,17 @@
     AssertLogRelRCReturn(rc, PDMDEV_SET_ERROR(pDevIns, rc, N_("virtio: cannot register PCI Capabilities address space")));
 
-    return rc;
+    /*
+     * Statistics.
+     */
+    PDMDevHlpSTAMRegisterF(pDevIns, &pVirtio->StatDescChainsAllocated,  STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
+                           "Total number of allocated descriptor chains",   "DescChainsAllocated");
+    PDMDevHlpSTAMRegisterF(pDevIns, &pVirtio->StatDescChainsFreed,      STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
+                           "Total number of freed descriptor chains",       "DescChainsFreed");
+    PDMDevHlpSTAMRegisterF(pDevIns, &pVirtio->StatDescChainsSegsIn,     STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
+                           "Total number of inbound segments",              "DescChainsSegsIn");
+    PDMDevHlpSTAMRegisterF(pDevIns, &pVirtio->StatDescChainsSegsOut,    STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
+                           "Total number of outbound segments",             "DescChainsSegsOut");
+
+    return VINF_SUCCESS;
 }
 
Index: /trunk/src/VBox/Devices/VirtIO/Virtio_1_0.h
===================================================================
--- /trunk/src/VBox/Devices/VirtIO/Virtio_1_0.h	(revision 83602)
+++ /trunk/src/VBox/Devices/VirtIO/Virtio_1_0.h	(revision 83603)
@@ -288,4 +288,12 @@
     /** The MMIO handle for the PCI capability region (\#2). */
     IOMMMIOHANDLE               hMmioPciCap;
+
+    /** @name Statistics
+     * @{ */
+    STAMCOUNTER                 StatDescChainsAllocated;
+    STAMCOUNTER                 StatDescChainsFreed;
+    STAMCOUNTER                 StatDescChainsSegsIn;
+    STAMCOUNTER                 StatDescChainsSegsOut;
+    /** @} */
 } VIRTIOCORE;
 
@@ -397,5 +405,5 @@
                              uint16_t uHeadIdx, PPVIRTIO_DESC_CHAIN_T ppDescChain);
 uint32_t virtioCoreR3DescChainRetain(PVIRTIO_DESC_CHAIN_T pDescChain);
-uint32_t virtioCoreR3DescChainRelease(PVIRTIO_DESC_CHAIN_T pDescChain);
+uint32_t virtioCoreR3DescChainRelease(PVIRTIOCORE pVirtio, PVIRTIO_DESC_CHAIN_T pDescChain);
 
 int  virtioCoreR3QueuePeek(PPDMDEVINS pDevIns, PVIRTIOCORE pVirtio, uint16_t idxQueue,
