Index: /trunk/src/VBox/VMM/VMMAll/PDMAll.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/PDMAll.cpp	(revision 88561)
+++ /trunk/src/VBox/VMM/VMMAll/PDMAll.cpp	(revision 88562)
@@ -308,4 +308,16 @@
 
 /**
+ * Checks if this thread is owning the PDM lock.
+ *
+ * @returns @c true if the lock is taken, @c false otherwise.
+ * @param   pVM     The cross context VM structure.
+ */
+bool pdmLockIsOwner(PCVMCC pVM)
+{
+    return PDMCritSectIsOwner(&pVM->pdm.s.CritSect);
+}
+
+
+/**
  * Converts ring 3 VMM heap pointer to a guest physical address
  *
Index: /trunk/src/VBox/VMM/include/PDMInternal.h
===================================================================
--- /trunk/src/VBox/VMM/include/PDMInternal.h	(revision 88561)
+++ /trunk/src/VBox/VMM/include/PDMInternal.h	(revision 88562)
@@ -1670,4 +1670,5 @@
 int         pdmLockEx(PVMCC pVM, int rc);
 void        pdmUnlock(PVMCC pVM);
+bool        pdmLockIsOwned(PCVMCC pVM);
 
 #if defined(VBOX_WITH_IOMMU_AMD) || defined(VBOX_WITH_IOMMU_INTEL)
