Index: /trunk/src/VBox/Devices/Audio/DevHDA.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DevHDA.cpp	(revision 82390)
+++ /trunk/src/VBox/Devices/Audio/DevHDA.cpp	(revision 82391)
@@ -956,11 +956,8 @@
 static VBOXSTRICTRC hdaRegReadU32(PPDMDEVINS pDevIns, PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value)
 {
-    uint32_t iRegMem = g_aHdaRegMap[iReg].mem_idx;
-
-    DEVHDA_LOCK_RETURN(pDevIns, pThis, VINF_IOM_R3_MMIO_READ);
-
+    RT_NOREF(pDevIns);
+
+    uint32_t const iRegMem = g_aHdaRegMap[iReg].mem_idx;
     *pu32Value = pThis->au32Regs[iRegMem] & g_aHdaRegMap[iReg].readable;
-
-    DEVHDA_UNLOCK(pDevIns, pThis);
     return VINF_SUCCESS;
 }
@@ -1027,16 +1024,11 @@
 static VBOXSTRICTRC hdaRegReadLPIB(PPDMDEVINS pDevIns, PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value)
 {
-    DEVHDA_LOCK_RETURN(pDevIns, pThis, VINF_IOM_R3_MMIO_READ);
+    RT_NOREF(pDevIns);
 
     const uint8_t  uSD     = HDA_SD_NUM_FROM_REG(pThis, LPIB, iReg);
-    uint32_t       u32LPIB = HDA_STREAM_REG(pThis, LPIB, uSD);
-#ifdef LOG_ENABLED
-    const uint32_t u32CBL  = HDA_STREAM_REG(pThis, CBL,  uSD);
-    LogFlowFunc(("[SD%RU8] LPIB=%RU32, CBL=%RU32\n", uSD, u32LPIB, u32CBL));
-#endif
-
+    const uint32_t u32LPIB = HDA_STREAM_REG(pThis, LPIB, uSD);
     *pu32Value = u32LPIB;
-
-    DEVHDA_UNLOCK(pDevIns, pThis);
+    LogFlowFunc(("[SD%RU8] LPIB=%RU32, CBL=%RU32\n", uSD, u32LPIB, HDA_STREAM_REG(pThis, CBL, uSD)));
+
     return VINF_SUCCESS;
 }
@@ -1087,5 +1079,4 @@
 #ifdef IN_RING3 /** @todo r=bird: No reason (except logging) for this to be ring-3 only! */
     RT_NOREF(pDevIns, iReg);
-    DEVHDA_LOCK(pDevIns, pThis);
 
     const uint64_t u64WalClkCur = ASMAtomicReadU64(&pThis->u64WalClk);
@@ -1093,5 +1084,4 @@
 
     Log3Func(("%RU32 (max @ %RU64)\n", *pu32Value, hdaR3WalClkGetMax(pThis)));
-    DEVHDA_UNLOCK(pDevIns, pThis);
     return VINF_SUCCESS;
 #else
@@ -1968,17 +1958,10 @@
 static VBOXSTRICTRC hdaRegReadIRS(PPDMDEVINS pDevIns, PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value)
 {
-    DEVHDA_LOCK_RETURN(pDevIns, pThis, VINF_IOM_R3_MMIO_READ);
-
     /* regarding 3.4.3 we should mark IRS as busy in case CORB is active */
     if (   HDA_REG(pThis, CORBWP) != HDA_REG(pThis, CORBRP)
         || (HDA_REG(pThis, CORBCTL) & HDA_CORBCTL_DMA))
-    {
         HDA_REG(pThis, IRS) = HDA_IRS_ICB;  /* busy */
-    }
-
-    VBOXSTRICTRC rc = hdaRegReadU32(pDevIns, pThis, iReg, pu32Value);
-    DEVHDA_UNLOCK(pDevIns, pThis);
-
-    return rc;
+
+    return hdaRegReadU32(pDevIns, pThis, iReg, pu32Value);
 }
 
@@ -3031,14 +3014,8 @@
 
     if (!(HDA_REG(pThis, GCTL) & HDA_GCTL_CRST) && idxRegDsc != HDA_REG_GCTL)
-        LogFunc(("Access to registers except GCTL is blocked while reset\n"));
-
-    if (idxRegDsc == -1)
-        LogRel(("HDA: Invalid read access @0x%x (bytes=%u)\n", (uint32_t)off, cb));
-
-    if (idxRegDsc != -1)
-    {
-        /* Leave lock before calling read function. */
-        DEVHDA_UNLOCK(pDevIns, pThis);
-
+        LogFunc(("Access to registers except GCTL is blocked while resetting\n"));
+
+    if (idxRegDsc >= 0)
+    {
         /* ASSUMES gapless DWORD at end of map. */
         if (g_aHdaRegMap[idxRegDsc].size == 4)
@@ -3087,9 +3064,10 @@
     else
     {
-        DEVHDA_UNLOCK(pDevIns, pThis);
-
+        LogRel(("HDA: Invalid read access @0x%x (bytes=%u)\n", (uint32_t)off, cb));
+        Log3Func(("\tHole at %x is accessed for read\n", offRegLog));
         rc = VINF_IOM_MMIO_UNUSED_FF;
-        Log3Func(("\tHole at %x is accessed for read\n", offRegLog));
-    }
+    }
+
+    DEVHDA_UNLOCK(pDevIns, pThis);
 
     /*
