VirtualBox

Changeset 82050 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Nov 20, 2019 8:43:09 PM (5 years ago)
Author:
vboxsync
Message:

DevVGA: PDMCritSect -> PDMDevHlpCritSect. bugref:9218

Location:
trunk/src/VBox/Devices/Graphics
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp

    r82048 r82050  
    764764 *
    765765 * @returns VBox status code.
     766 * @param   pDevIns     The device instance.
    766767 * @param   pThis       VMSVGA State
    767768 * @param   pu32        Where to store the read value
    768769 */
    769 PDMBOTHCBDECL(int) vmsvgaReadPort(PVGASTATE pThis, uint32_t *pu32)
     770static int vmsvgaReadPort(PPDMDEVINS pDevIns, PVGASTATE pThis, uint32_t *pu32)
    770771{
    771772    int rc = VINF_SUCCESS;
     
    10701071            /* Go to ring-3 and halt the CPU. */
    10711072            rc = VINF_IOM_R3_IOPORT_READ;
     1073            RT_NOREF(pDevIns);
    10721074            break;
    10731075#else
     
    10831085            if (pThis->svga.fBusy)
    10841086            {
    1085                 PDMCritSectLeave(&pThis->CritSect); /* hack around lock order issue. */
     1087                PDMDevHlpCritSectLeave(pDevIns, &pThis->CritSect); /* hack around lock order issue. */
    10861088                rc = VMR3WaitForDeviceReady(pVM, idCpu);
    1087                 PDMCritSectEnter(&pThis->CritSect, VERR_IGNORED);
     1089                PDMDevHlpCritSectEnter(pDevIns, &pThis->CritSect, VERR_IGNORED);
    10881090            }
    10891091            ASMAtomicDecU32(&pSVGAState->cBusyDelayedEmts);
     
    19961998
    19971999    case SVGA_VALUE_PORT:
    1998         return vmsvgaReadPort(pThis, pu32);
     2000        return vmsvgaReadPort(pDevIns, pThis, pu32);
    19992001
    20002002    case SVGA_BIOS_PORT:
     
    47554757                || (pThis->svga.u32IrqMask & SVGA_IRQFLAG_FIFO_PROGRESS))
    47564758            {
    4757                 int rc2 = PDMCritSectEnter(&pThis->CritSect, VERR_IGNORED);
     4759                int rc2 = PDMDevHlpCritSectEnter(pDevIns, &pThis->CritSect, VERR_IGNORED);
    47584760                AssertRC(rc2);
    47594761
     
    47734775                }
    47744776
    4775                 PDMCritSectLeave(&pThis->CritSect);
     4777                PDMDevHlpCritSectLeave(pDevIns, &pThis->CritSect);
    47764778            }
    47774779        }
  • trunk/src/VBox/Devices/Graphics/DevVGA.cpp

    r82048 r82050  
    28802880{
    28812881    PVGASTATE pThis = PDMDEVINS_2_DATA(pDevIns, PVGASTATE);
    2882     Assert(PDMCritSectIsOwner(pDevIns->CTX_SUFF(pCritSectRo)));
     2882    Assert(PDMDevHlpCritSectIsOwner(pDevIns, pDevIns->CTX_SUFF(pCritSectRo)));
    28832883
    28842884    NOREF(pvUser);
     
    29002900{
    29012901    PVGASTATE pThis = PDMDEVINS_2_DATA(pDevIns, PVGASTATE);
    2902     Assert(PDMCritSectIsOwner(pDevIns->CTX_SUFF(pCritSectRo)));
     2902    Assert(PDMDevHlpCritSectIsOwner(pDevIns, pDevIns->CTX_SUFF(pCritSectRo)));
    29032903    NOREF(pvUser);
    29042904
     
    29212921{
    29222922    PVGASTATE pThis = PDMDEVINS_2_DATA(pDevIns, PVGASTATE);
    2923     Assert(PDMCritSectIsOwner(pDevIns->CTX_SUFF(pCritSectRo)));
     2923    Assert(PDMDevHlpCritSectIsOwner(pDevIns, pDevIns->CTX_SUFF(pCritSectRo)));
    29242924
    29252925    NOREF(pvUser);
     
    29872987{
    29882988    PVGASTATE pThis = PDMDEVINS_2_DATA(pDevIns, PVGASTATE); NOREF(pvUser);
    2989     Assert(PDMCritSectIsOwner(pDevIns->CTX_SUFF(pCritSectRo)));
     2989    Assert(PDMDevHlpCritSectIsOwner(pDevIns, pDevIns->CTX_SUFF(pCritSectRo)));
    29902990
    29912991#ifdef VBE_BYTEWISE_IO
     
    30183018{
    30193019    PVGASTATE pThis = PDMDEVINS_2_DATA(pDevIns, PVGASTATE); NOREF(pvUser);
    3020     Assert(PDMCritSectIsOwner(pDevIns->CTX_SUFF(pCritSectRo)));
     3020    Assert(PDMDevHlpCritSectIsOwner(pDevIns, pDevIns->CTX_SUFF(pCritSectRo)));
    30213021
    30223022#ifdef VBE_BYTEWISE_IO
     
    30593059    NOREF(pvUser);
    30603060    PVGASTATE pThis = PDMDEVINS_2_DATA(pDevIns, PVGASTATE);
    3061     Assert(PDMCritSectIsOwner(pDevIns->CTX_SUFF(pCritSectRo)));
     3061    Assert(PDMDevHlpCritSectIsOwner(pDevIns, pDevIns->CTX_SUFF(pCritSectRo)));
    30623062
    30633063#ifdef VBE_BYTEWISE_IO
     
    30923092{
    30933093    PVGASTATE pThis = PDMDEVINS_2_DATA(pDevIns, PVGASTATE);
    3094     Assert(PDMCritSectIsOwner(pDevIns->CTX_SUFF(pCritSectRo)));
     3094    Assert(PDMDevHlpCritSectIsOwner(pDevIns, pDevIns->CTX_SUFF(pCritSectRo)));
    30953095    LogFlowFunc(("Port 0x%x, u32 0x%x, cb %d\n", Port, u32, cb));
    30963096
     
    31073107                if (u32 == HGSMIOFFSET_VOID)
    31083108                {
    3109                     PDMCritSectEnter(&pThis->CritSectIRQ, VERR_SEM_BUSY);
     3109                    PDMDevHlpCritSectEnter(pDevIns, &pThis->CritSectIRQ, VERR_SEM_BUSY);
    31103110
    31113111                    if (pThis->fu32PendingGuestFlags == 0)
     
    31263126                    }
    31273127
    3128                     PDMCritSectLeave(&pThis->CritSectIRQ);
     3128                    PDMDevHlpCritSectLeave(pDevIns, &pThis->CritSectIRQ);
    31293129                }
    31303130                else
     
    31643164{
    31653165    PVGASTATE pThis = PDMDEVINS_2_DATA(pDevIns, PVGASTATE);
    3166     Assert(PDMCritSectIsOwner(pDevIns->CTX_SUFF(pCritSectRo)));
     3166    Assert(PDMDevHlpCritSectIsOwner(pDevIns, pDevIns->CTX_SUFF(pCritSectRo)));
    31673167    LogFlowFunc(("Port 0x%x, cb %d\n", Port, cb));
    31683168
     
    34243424{
    34253425    PVGASTATE pThis = PDMDEVINS_2_DATA(pDevIns, PVGASTATE);
    3426     Assert(PDMCritSectIsOwner(pDevIns->CTX_SUFF(pCritSectRo)));
     3426    Assert(PDMDevHlpCritSectIsOwner(pDevIns, pDevIns->CTX_SUFF(pCritSectRo)));
    34273427
    34283428    return vgaInternalMMIOFill(pThis, pvUser, GCPhysAddr, u32Item, cbItem, cItems);
     
    34393439    PVGASTATE pThis = PDMDEVINS_2_DATA(pDevIns, PVGASTATE);
    34403440    STAM_PROFILE_START(&pThis->CTX_MID_Z(Stat,MemoryRead), a);
    3441     Assert(PDMCritSectIsOwner(pDevIns->CTX_SUFF(pCritSectRo)));
     3441    Assert(PDMDevHlpCritSectIsOwner(pDevIns, pDevIns->CTX_SUFF(pCritSectRo)));
    34423442    NOREF(pvUser);
    34433443
     
    34963496    NOREF(pvUser);
    34973497    STAM_PROFILE_START(&pThis->CTX_MID_Z(Stat,MemoryWrite), a);
    3498     Assert(PDMCritSectIsOwner(pDevIns->CTX_SUFF(pCritSectRo)));
     3498    Assert(PDMDevHlpCritSectIsOwner(pDevIns, pDevIns->CTX_SUFF(pCritSectRo)));
    34993499
    35003500    int rc;
     
    35693569static int vgaLFBAccess(PVMCC pVM, PVGASTATE pThis, RTGCPHYS GCPhys, RTGCPTR GCPtr)
    35703570{
    3571     int rc = PDMCritSectEnter(&pThis->CritSect, VINF_EM_RAW_EMULATE_INSTR);
     3571    int rc = PDMDevHlpCritSectEnter(pThis->CTX_SUFF(pDevIns), &pThis->CritSect, VINF_EM_RAW_EMULATE_INSTR);
    35723572    if (rc != VINF_SUCCESS)
    35733573        return rc;
     
    35903590        rc = PGMShwMakePageWritable(PDMDevHlpGetVMCPU(pThis->CTX_SUFF(pDevIns)), GCPtr,
    35913591                                    PGM_MK_PG_IS_MMIO2 | PGM_MK_PG_IS_WRITE_FAULT);
    3592         PDMCritSectLeave(&pThis->CritSect);
     3592        PDMDevHlpCritSectLeave(pThis->CTX_SUFF(pDevIns), &pThis->CritSect);
    35933593        AssertMsgReturn(    rc == VINF_SUCCESS
    35943594                        /* In the SMP case the page table might be removed while we wait for the PGM lock in the trap handler. */
     
    35983598                        rc);
    35993599#else /* IN_RING3 : We don't have any virtual page address of the access here. */
    3600         PDMCritSectLeave(&pThis->CritSect);
     3600        PDMDevHlpCritSectLeave(pThis->CTX_SUFF(pDevIns), &pThis->CritSect);
    36013601        Assert(GCPtr == 0);
    36023602        RT_NOREF1(GCPtr);
     
    36053605    }
    36063606
    3607     PDMCritSectLeave(&pThis->CritSect);
     3607    PDMDevHlpCritSectLeave(pThis->CTX_SUFF(pDevIns), &pThis->CritSect);
    36083608    AssertMsgFailed(("PGMHandlerPhysicalPageTempOff -> rc=%d\n", rc));
    36093609    return rc;
     
    36743674    static int lastWasNotNewline = 0;  /* We are only called in a single-threaded way */
    36753675    RT_NOREF2(pDevIns, pvUser);
    3676     Assert(PDMCritSectIsOwner(pDevIns->CTX_SUFF(pCritSectRo)));
     3676    Assert(PDMDevHlpCritSectIsOwner(pDevIns, pDevIns->CTX_SUFF(pCritSectRo)));
    36773677
    36783678    /*
     
    37203720{
    37213721    PVGASTATE pThis = PDMDEVINS_2_DATA(pDevIns, PVGASTATE);
    3722     Assert(PDMCritSectIsOwner(pDevIns->CTX_SUFF(pCritSectRo)));
     3722    Assert(PDMDevHlpCritSectIsOwner(pDevIns, pDevIns->CTX_SUFF(pCritSectRo)));
    37233723    NOREF(pvUser); NOREF(Port);
    37243724
     
    37433743    PVGASTATE pThis = PDMDEVINS_2_DATA(pDevIns, PVGASTATE);
    37443744    NOREF(pvUser); NOREF(Port);
    3745     Assert(PDMCritSectIsOwner(pDevIns->CTX_SUFF(pCritSectRo)));
     3745    Assert(PDMDevHlpCritSectIsOwner(pDevIns, pDevIns->CTX_SUFF(pCritSectRo)));
    37463746
    37473747    int rc = VINF_SUCCESS;
     
    47234723    PPDMDEVINS pDevIns = pThis->CTX_SUFF(pDevIns);
    47244724
    4725     int rc = PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY);
     4725    int rc = PDMDevHlpCritSectEnter(pDevIns, &pThis->CritSect, VERR_SEM_BUSY);
    47264726    AssertRC(rc);
    47274727
     
    47314731    {
    47324732        /* Nothing to do as the guest will explicitely update us about frame buffer changes. */
    4733         PDMCritSectLeave(&pThis->CritSect);
     4733        PDMDevHlpCritSectLeave(pDevIns, &pThis->CritSect);
    47344734        return VINF_SUCCESS;
    47354735    }
     
    47414741    if (VBVAUpdateDisplay (pThis) == VINF_SUCCESS)
    47424742    {
    4743         PDMCritSectLeave(&pThis->CritSect);
     4743        PDMDevHlpCritSectLeave(pDevIns, &pThis->CritSect);
    47444744        return VINF_SUCCESS;
    47454745    }
     
    47604760    rc = vga_update_display(pThis, false /*fUpdateAll*/, false /*fFailOnResize*/, true /*reset_dirty*/,
    47614761                            pThis->pDrv, &pThis->graphic_mode);
    4762     PDMCritSectLeave(&pThis->CritSect);
     4762    PDMDevHlpCritSectLeave(pDevIns, &pThis->CritSect);
    47634763    return rc;
    47644764}
     
    47974797DECLCALLBACK(int) vgaUpdateDisplayAll(PVGASTATE pThis, bool fFailOnResize)
    47984798{
     4799    PPDMDEVINS pDevIns = pThis->CTX_SUFF(pDevIns);
    47994800#ifdef DEBUG_sunlover
    48004801    LogFlow(("vgaPortUpdateDisplayAll\n"));
    48014802#endif /* DEBUG_sunlover */
    48024803
    4803     int rc = PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY);
     4804    int rc = PDMDevHlpCritSectEnter(pDevIns, &pThis->CritSect, VERR_SEM_BUSY);
    48044805    AssertRC(rc);
    48054806
    48064807    rc = updateDisplayAll(pThis, fFailOnResize);
    48074808
    4808     PDMCritSectLeave(&pThis->CritSect);
     4809    PDMDevHlpCritSectLeave(pDevIns, &pThis->CritSect);
    48094810    return rc;
    48104811}
     
    48874888                                               uint32_t *pcx, uint32_t *pcy)
    48884889{
    4889     PVGASTATE pThis = IDISPLAYPORT_2_VGASTATE(pInterface);
     4890    PVGASTATE  pThis   = IDISPLAYPORT_2_VGASTATE(pInterface);
     4891    PPDMDEVINS pDevIns = pThis->CTX_SUFF(pDevIns);
    48904892    PDMDEV_ASSERT_EMT(VGASTATE2DEVINS(pThis));
    48914893
     
    48984900        return VERR_INVALID_PARAMETER;
    48994901
    4900     int rc = PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY);
     4902    int rc = PDMDevHlpCritSectEnter(pDevIns, &pThis->CritSect, VERR_SEM_BUSY);
    49014903    AssertRCReturn(rc, rc);
    49024904
     
    49794981        rc = VERR_NOT_SUPPORTED;
    49804982
    4981     PDMCritSectLeave(&pThis->CritSect);
     4983    PDMDevHlpCritSectLeave(pDevIns, &pThis->CritSect);
    49824984
    49834985    LogFlow(("vgaPortTakeScreenshot: returns %Rrc (cbData=%d cx=%d cy=%d)\n", rc, *pcbData, *pcx, *pcy));
     
    50155017                                           uint32_t cx, uint32_t cy)
    50165018{
    5017     PVGASTATE       pThis = IDISPLAYPORT_2_VGASTATE(pInterface);
    5018     int             rc = VINF_SUCCESS;
     5019    PVGASTATE       pThis   = IDISPLAYPORT_2_VGASTATE(pInterface);
     5020    PPDMDEVINS      pDevIns = pThis->CTX_SUFF(pDevIns);
     5021    int             rc;
    50195022    PDMDEV_ASSERT_EMT(VGASTATE2DEVINS(pThis));
    50205023    LogFlow(("vgaPortDisplayBlt: pvData=%p x=%d y=%d cx=%d cy=%d\n", pvData, x, y, cx, cy));
    50215024
    5022     rc = PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY);
     5025    rc = PDMDevHlpCritSectEnter(pDevIns, &pThis->CritSect, VERR_SEM_BUSY);
    50235026    AssertRC(rc);
    50245027
     
    50855088        rc = VERR_INVALID_PARAMETER;
    50865089
    5087     PDMCritSectLeave(&pThis->CritSect);
     5090    PDMDevHlpCritSectLeave(pDevIns, &pThis->CritSect);
    50885091
    50895092    LogFlow(("vgaPortDisplayBlt: returns %Rrc\n", rc));
     
    50935096static DECLCALLBACK(void) vgaPortUpdateDisplayRect(PPDMIDISPLAYPORT pInterface, int32_t x, int32_t y, uint32_t w, uint32_t h)
    50945097{
     5098    PVGASTATE  pThis   = IDISPLAYPORT_2_VGASTATE(pInterface);
     5099    PPDMDEVINS pDevIns = pThis->CTX_SUFF(pDevIns);
    50955100    uint32_t v;
    50965101    vga_draw_line_func *vga_draw_line;
     
    51045109    uint8_t *pbSrc;
    51055110
    5106     PVGASTATE pThis = IDISPLAYPORT_2_VGASTATE(pInterface);
    51075111
    51085112#ifdef DEBUG_sunlover
     
    51125116    Assert(pInterface);
    51135117
    5114     int rc = PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY);
     5118    int rc = PDMDevHlpCritSectEnter(pDevIns, &pThis->CritSect, VERR_SEM_BUSY);
    51155119    AssertRC(rc);
    51165120
     
    51225126        LogFlow(("vgaPortUpdateDisplayRect: nothing to do fRender is false.\n"));
    51235127#endif /* DEBUG_sunlover */
    5124         PDMCritSectLeave(&pThis->CritSect);
     5128        PDMDevHlpCritSectLeave(pDevIns, &pThis->CritSect);
    51255129        return;
    51265130    }
     
    51685172        LogFlow(("vgaPortUpdateDisplayRect: nothing to do: %dx%d\n", w, h));
    51695173#endif /* DEBUG_sunlover */
    5170         PDMCritSectLeave(&pThis->CritSect);
     5174        PDMDevHlpCritSectLeave(pDevIns, &pThis->CritSect);
    51715175        return;
    51725176    }
     
    51865190             * Nothing to do, just return.
    51875191             */
    5188             PDMCritSectLeave(&pThis->CritSect);
     5192            PDMDevHlpCritSectLeave(pDevIns, &pThis->CritSect);
    51895193            return;
    51905194        case 8:
     
    52355239    }
    52365240
    5237     PDMCritSectLeave(&pThis->CritSect);
     5241    PDMDevHlpCritSectLeave(pDevIns, &pThis->CritSect);
    52385242#ifdef DEBUG_sunlover
    52395243    LogFlow(("vgaPortUpdateDisplayRect: completed.\n"));
     
    52515255                uint32_t cbDstLine, uint32_t cDstBitsPerPixel)
    52525256{
     5257    PVGASTATE  pThis   = IDISPLAYPORT_2_VGASTATE(pInterface);
     5258    PPDMDEVINS pDevIns = pThis->CTX_SUFF(pDevIns);
    52535259    uint32_t v;
    52545260    vga_draw_line_func *vga_draw_line;
     
    52575263    LogFlow(("vgaPortCopyRect: %d,%d %dx%d -> %d,%d\n", xSrc, ySrc, cx, cy, xDst, yDst));
    52585264#endif /* DEBUG_sunlover */
    5259 
    5260     PVGASTATE pThis = IDISPLAYPORT_2_VGASTATE(pInterface);
    52615265
    52625266    Assert(pInterface);
     
    53215325    }
    53225326
    5323     int rc = PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY);
     5327    int rc = PDMDevHlpCritSectEnter(pDevIns, &pThis->CritSect, VERR_SEM_BUSY);
    53245328    AssertRC(rc);
    53255329
     
    53425346       )
    53435347    {
    5344         PDMCritSectLeave(&pThis->CritSect);
     5348        PDMDevHlpCritSectLeave(pDevIns, &pThis->CritSect);
    53455349        return VERR_INVALID_STATE;
    53465350    }
     
    53525356        case 0:
    53535357            /* Nothing to do, just return. */
    5354             PDMCritSectLeave(&pThis->CritSect);
     5358            PDMDevHlpCritSectLeave(pDevIns, &pThis->CritSect);
    53555359            return VINF_SUCCESS;
    53565360        case 8:
     
    53935397    }
    53945398
    5395     PDMCritSectLeave(&pThis->CritSect);
     5399    PDMDevHlpCritSectLeave(pDevIns, &pThis->CritSect);
    53965400#ifdef DEBUG_sunlover
    53975401    LogFlow(("vgaPortCopyRect: completed.\n"));
     
    54035407static DECLCALLBACK(void) vgaPortSetRenderVRAM(PPDMIDISPLAYPORT pInterface, bool fRender)
    54045408{
    5405     PVGASTATE pThis = IDISPLAYPORT_2_VGASTATE(pInterface);
     5409    PVGASTATE  pThis   = IDISPLAYPORT_2_VGASTATE(pInterface);
     5410    PPDMDEVINS pDevIns = pThis->CTX_SUFF(pDevIns);
    54065411
    54075412    LogFlow(("vgaPortSetRenderVRAM: fRender = %d\n", fRender));
    54085413
    5409     int rc = PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY);
     5414    int rc = PDMDevHlpCritSectEnter(pDevIns, &pThis->CritSect, VERR_SEM_BUSY);
    54105415    AssertRC(rc);
    54115416
    54125417    pThis->fRenderVRAM = fRender;
    54135418
    5414     PDMCritSectLeave(&pThis->CritSect);
     5419    PDMDevHlpCritSectLeave(pDevIns, &pThis->CritSect);
    54155420}
    54165421
     
    55025507    Assert(pPciDev == pDevIns->apPciDevs[0]);
    55035508
    5504     int rc = PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY);
     5509    int rc = PDMDevHlpCritSectEnter(pDevIns, &pThis->CritSect, VERR_SEM_BUSY);
    55055510    AssertRC(rc);
    55065511
     
    55515556        /* NB: VBE_DISPI_INDEX_FB_BASE_HI is left unchanged here. */
    55525557    }
    5553     PDMCritSectLeave(&pThis->CritSect);
     5558    PDMDevHlpCritSectLeave(pDevIns, &pThis->CritSect);
    55545559    return rc;
    55555560}
     
    59755980    if (pThis->pDrv)
    59765981    {
    5977         PDMCritSectLeave(&pThis->CritSect); /* hack around lock order issue. */
     5982        PDMDevHlpCritSectLeave(pDevIns, &pThis->CritSect); /* hack around lock order issue. */
    59785983        pThis->pDrv->pfnReset(pThis->pDrv);
    59795984        pThis->pDrv->pfnVBVAMousePointerShape(pThis->pDrv, false, false, 0, 0, 0, 0, NULL);
    5980         PDMCritSectEnter(&pThis->CritSect, VERR_IGNORED);
     5985        PDMDevHlpCritSectEnter(pDevIns, &pThis->CritSect, VERR_IGNORED);
    59815986    }
    59825987
     
    61816186    }
    61826187
    6183     PDMR3CritSectDelete(&pThis->CritSectIRQ);
    6184     PDMR3CritSectDelete(&pThis->CritSect);
     6188    PDMDevHlpCritSectDelete(pDevIns, &pThis->CritSectIRQ);
     6189    PDMDevHlpCritSectDelete(pDevIns, &pThis->CritSect);
    61856190    return VINF_SUCCESS;
    61866191}
  • trunk/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp

    r82048 r82050  
    907907        return;
    908908
    909     PDMCritSectEnter(&pVGAState->CritSect, VERR_SEM_BUSY);
     909    PDMDevHlpCritSectEnter(pVGAState->CTX_SUFF(pDevIns), &pVGAState->CritSect, VERR_SEM_BUSY);
    910910
    911911    VBOX_VHWA_PENDINGCMD *pIter, *pNext;
     
    921921    }
    922922
    923     PDMCritSectLeave(&pVGAState->CritSect);
     923    PDMDevHlpCritSectLeave(pVGAState->CTX_SUFF(pDevIns), &pVGAState->CritSect);
    924924}
    925925
     
    929929        return;
    930930
    931     PDMCritSectEnter(&pVGAState->CritSect, VERR_SEM_BUSY);
     931    PDMDevHlpCritSectEnter(pVGAState->CTX_SUFF(pDevIns), &pVGAState->CritSect, VERR_SEM_BUSY);
    932932
    933933    VBOX_VHWA_PENDINGCMD *pIter, *pNext;
     
    939939    }
    940940
    941     PDMCritSectLeave(&pVGAState->CritSect);
     941    PDMDevHlpCritSectLeave(pVGAState->CTX_SUFF(pDevIns), &pVGAState->CritSect);
    942942}
    943943
     
    953953            pCommand->Flags |= VBOXVHWACMD_FLAG_HG_ASYNCH;
    954954            pPend->pCommand = pCommand;
    955             PDMCritSectEnter(&pVGAState->CritSect, VERR_SEM_BUSY);
     955            PDMDevHlpCritSectEnter(pVGAState->CTX_SUFF(pDevIns), &pVGAState->CritSect, VERR_SEM_BUSY);
    956956            if (ASMAtomicUoReadU32(&pVGAState->pendingVhwaCommands.cPending) < VBOX_VHWA_MAX_PENDING_COMMANDS)
    957957            {
    958958                RTListAppend(&pVGAState->pendingVhwaCommands.PendingList, &pPend->Node);
    959959                ASMAtomicIncU32(&pVGAState->pendingVhwaCommands.cPending);
    960                 PDMCritSectLeave(&pVGAState->CritSect);
     960                PDMDevHlpCritSectLeave(pVGAState->CTX_SUFF(pDevIns), &pVGAState->CritSect);
    961961                return;
    962962            }
    963             PDMCritSectLeave(&pVGAState->CritSect);
     963            PDMDevHlpCritSectLeave(pVGAState->CTX_SUFF(pDevIns), &pVGAState->CritSect);
    964964            LogRel(("VBVA: Pending command count has reached its threshold.. completing them all.."));
    965965            RTMemFree(pPend);
     
    11071107        return true;
    11081108
    1109     PDMCritSectEnter(&pVGAState->CritSect, VERR_SEM_BUSY);
     1109    PDMDevHlpCritSectEnter(pVGAState->CTX_SUFF(pDevIns), &pVGAState->CritSect, VERR_SEM_BUSY);
    11101110
    11111111    VBOX_VHWA_PENDINGCMD *pIter, *pNext;
     
    11141114        if (!vbvaVHWACommandSubmit(pVGAState, pIter->pCommand, true))
    11151115        {
    1116             PDMCritSectLeave(&pVGAState->CritSect);
     1116            PDMDevHlpCritSectLeave(pVGAState->CTX_SUFF(pDevIns), &pVGAState->CritSect);
    11171117            return false; /* the command should be still pending */
    11181118        }
     
    11241124    }
    11251125
    1126     PDMCritSectLeave(&pVGAState->CritSect);
     1126    PDMDevHlpCritSectLeave(pVGAState->CTX_SUFF(pDevIns), &pVGAState->CritSect);
    11271127
    11281128    return true;
     
    20842084    PPDMDEVINS pDevIns = pVGAState->pDevInsR3;
    20852085
    2086     PDMCritSectEnter(&pVGAState->CritSectIRQ, VERR_SEM_BUSY);
     2086    PDMDevHlpCritSectEnter(pVGAState->CTX_SUFF(pDevIns), &pVGAState->CritSectIRQ, VERR_SEM_BUSY);
    20872087
    20882088    const uint32_t fu32CurrentGuestFlags = HGSMIGetHostGuestFlags(pVGAState->pHGSMI);
     
    21062106    }
    21072107
    2108     PDMCritSectLeave(&pVGAState->CritSectIRQ);
     2108    PDMDevHlpCritSectLeave(pVGAState->CTX_SUFF(pDevIns), &pVGAState->CritSectIRQ);
    21092109}
    21102110
     
    21132113    PPDMDEVINS pDevIns = pThis->pDevInsR3;
    21142114
    2115     PDMCritSectEnter(&pThis->CritSectIRQ, VERR_SEM_BUSY);
     2115    PDMDevHlpCritSectEnter(pDevIns, &pThis->CritSectIRQ, VERR_SEM_BUSY);
    21162116
    21172117    if (HGSMIGetHostGuestFlags(pThis->pHGSMI) & HGSMIHOSTFLAGS_IRQ)
    21182118        PDMDevHlpPCISetIrqNoWait(pDevIns, 0, PDM_IRQ_LEVEL_HIGH);
    21192119
    2120     PDMCritSectLeave(&pThis->CritSectIRQ);
     2120    PDMDevHlpCritSectLeave(pDevIns, &pThis->CritSectIRQ);
    21212121}
    21222122
     
    27972797
    27982798    pThis = IDISPLAYPORT_2_VGASTATE(pInterface);
    2799     rc = PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY);
     2799    rc = PDMDevHlpCritSectEnter(pThis->pDevInsR3, &pThis->CritSect, VERR_SEM_BUSY);
    28002800    AssertRC(rc);
    28012801    rc = vbvaSendModeHintWorker(pThis, cx, cy, cBPP, iDisplay, dx, dy, fEnabled,
    28022802                                fNotifyGuest);
    2803     PDMCritSectLeave(&pThis->CritSect);
     2803    PDMDevHlpCritSectLeave(pThis->pDevInsR3, &pThis->CritSect);
    28042804    return rc;
    28052805}
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette