VirtualBox

Changeset 91928 in vbox


Ignore:
Timestamp:
Oct 21, 2021 9:09:51 AM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
147733
Message:

VMM,Devices: Eliminate direct calls to PGMHandlerPhysical* APIs and introduce callbacks in the device helper callback table, bugref:10074

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmdev.h

    r91927 r91928  
    24242424
    24252425/** Current PDMDEVHLPR3 version number. */
    2426 #define PDM_DEVHLPR3_VERSION                    PDM_VERSION_MAKE_PP(0xffe7, 54, 0)
     2426#define PDM_DEVHLPR3_VERSION                    PDM_VERSION_MAKE_PP(0xffe7, 55, 0)
    24272427
    24282428/**
     
    46604660
    46614661    /**
     4662     * Register a access handler for a physical range.
     4663     *
     4664     * @returns VBox status code.
     4665     * @retval  VINF_SUCCESS when successfully installed.
     4666     * @retval  VINF_PGM_GCPHYS_ALIASED when the shadow PTs could be updated because
     4667     *          the guest page aliased or/and mapped by multiple PTs. A CR3 sync has been
     4668     *          flagged together with a pool clearing.
     4669     * @retval  VERR_PGM_HANDLER_PHYSICAL_CONFLICT if the range conflicts with an existing
     4670     *          one. A debug assertion is raised.
     4671     *
     4672     * @param   pDevIns             The device instance.
     4673     * @param   GCPhys              Start physical address.
     4674     * @param   GCPhysLast          Last physical address. (inclusive)
     4675     * @param   hType               The handler type registration handle.
     4676     * @param   pvUserR3            User argument to the R3 handler.
     4677     * @param   pvUserR0            User argument to the R0 handler.
     4678     * @param   pvUserRC            User argument to the RC handler. This can be a value
     4679     *                              less that 0x10000 or a (non-null) pointer that is
     4680     *                              automatically relocated.
     4681     * @param   pszDesc             Description of this handler.  If NULL, the type
     4682     *                              description will be used instead.
     4683     */
     4684    DECLR3CALLBACKMEMBER(int, pfnPGMHandlerPhysicalRegister, (PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTGCPHYS GCPhysLast,
     4685                                                              PGMPHYSHANDLERTYPE hType, RTR3PTR pvUserR3, RTR0PTR pvUserR0,
     4686                                                              RTRCPTR pvUserRC, R3PTRTYPE(const char *) pszDesc));
     4687
     4688    /**
     4689     * Deregister a physical page access handler.
     4690     *
     4691     * @returns VBox status code.
     4692     * @param   pDevIns             The device instance.
     4693     * @param   GCPhys              Start physical address.
     4694     */
     4695    DECLR3CALLBACKMEMBER(int, pfnPGMHandlerPhysicalDeregister,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys));
     4696
     4697    /**
     4698     * Temporarily turns off the access monitoring of a page within a monitored
     4699     * physical write/all page access handler region.
     4700     *
     4701     * Use this when no further \#PFs are required for that page. Be aware that
     4702     * a page directory sync might reset the flags, and turn on access monitoring
     4703     * for the page.
     4704     *
     4705     * The caller must do required page table modifications.
     4706     *
     4707     * @returns VBox status code.
     4708     * @param   pDevIns             The device instance.
     4709     * @param   GCPhys              The start address of the access handler. This
     4710     *                              must be a fully page aligned range or we risk
     4711     *                              messing up other handlers installed for the
     4712     *                              start and end pages.
     4713     * @param   GCPhysPage          The physical address of the page to turn off
     4714     *                              access monitoring for.
     4715     */
     4716    DECLR3CALLBACKMEMBER(int, pfnPGMHandlerPhysicalPageTempOff,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTGCPHYS GCPhysPage));
     4717
     4718    /**
     4719     * Resets any modifications to individual pages in a physical page access
     4720     * handler region.
     4721     *
     4722     * This is used in pair with PGMHandlerPhysicalPageTempOff(),
     4723     * PGMHandlerPhysicalPageAliasMmio2() or PGMHandlerPhysicalPageAliasHC().
     4724     *
     4725     * @returns VBox status code.
     4726     * @param   pDevIns             The device instance.
     4727     * @param   GCPhys              The start address of the handler regions, i.e. what you
     4728     *                              passed to PGMR3HandlerPhysicalRegister(),
     4729     *                              PGMHandlerPhysicalRegisterEx() or
     4730     *                              PGMHandlerPhysicalModify().
     4731     */
     4732    DECLR3CALLBACKMEMBER(int, pfnPGMHandlerPhysicalReset,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys));
     4733
     4734    /**
    46624735     * Registers the guest memory range that can be used for patching.
    46634736     *
     
    56105683    DECLR0CALLBACKMEMBER(int, pfnHpetSetUpContext,(PPDMDEVINS pDevIns, PPDMHPETREG pHpetReg, PCPDMHPETHLPR0 *ppHpetHlp));
    56115684
     5685    /**
     5686     * Temporarily turns off the access monitoring of a page within a monitored
     5687     * physical write/all page access handler region.
     5688     *
     5689     * Use this when no further \#PFs are required for that page. Be aware that
     5690     * a page directory sync might reset the flags, and turn on access monitoring
     5691     * for the page.
     5692     *
     5693     * The caller must do required page table modifications.
     5694     *
     5695     * @returns VBox status code.
     5696     * @param   pDevIns             The device instance.
     5697     * @param   GCPhys              The start address of the access handler. This
     5698     *                              must be a fully page aligned range or we risk
     5699     *                              messing up other handlers installed for the
     5700     *                              start and end pages.
     5701     * @param   GCPhysPage          The physical address of the page to turn off
     5702     *                              access monitoring for.
     5703     */
     5704    DECLR0CALLBACKMEMBER(int, pfnPGMHandlerPhysicalPageTempOff,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTGCPHYS GCPhysPage));
     5705
    56125706    /** Space reserved for future members.
    56135707     * @{ */
     
    56335727
    56345728/** Current PDMDEVHLP version number. */
    5635 #define PDM_DEVHLPR0_VERSION                    PDM_VERSION_MAKE(0xffe5, 22, 0)
     5729#define PDM_DEVHLPR0_VERSION                    PDM_VERSION_MAKE(0xffe5, 23, 0)
    56365730
    56375731
     
    89048998
    89058999/**
     9000 * @copydoc PDMDEVHLPR3::pfnPGMHandlerPhysicalRegister
     9001 */
     9002DECLINLINE(int) PDMDevHlpPGMHandlerPhysicalRegister(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTGCPHYS GCPhysLast,
     9003                                                    PGMPHYSHANDLERTYPE hType, RTR3PTR pvUserR3, RTR0PTR pvUserR0,
     9004                                                    RTRCPTR pvUserRC, R3PTRTYPE(const char *) pszDesc)
     9005{
     9006    return pDevIns->pHlpR3->pfnPGMHandlerPhysicalRegister(pDevIns, GCPhys, GCPhysLast, hType,
     9007                                                          pvUserR3, pvUserR0, pvUserRC, pszDesc);
     9008}
     9009
     9010/**
     9011 * @copydoc PDMDEVHLPR3::pfnPGMHandlerPhysicalDeregister
     9012 */
     9013DECLINLINE(int) PDMDevHlpPGMHandlerPhysicalDeregister(PPDMDEVINS pDevIns, RTGCPHYS GCPhys)
     9014{
     9015    return pDevIns->pHlpR3->pfnPGMHandlerPhysicalDeregister(pDevIns, GCPhys);
     9016}
     9017#endif
     9018
     9019/**
     9020 * @copydoc PDMDEVHLPR3::pfnPGMHandlerPhysicalPageTempOff
     9021 */
     9022DECLINLINE(int) PDMDevHlpPGMHandlerPhysicalPageTempOff(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTGCPHYS GCPhysPage)
     9023{
     9024    return pDevIns->CTX_SUFF(pHlp)->pfnPGMHandlerPhysicalPageTempOff(pDevIns, GCPhys, GCPhysPage);
     9025}
     9026
     9027#ifdef IN_RING3
     9028/**
     9029 * @copydoc PDMDEVHLPR3::pfnPGMHandlerPhysicalReset
     9030 */
     9031DECLINLINE(int) PDMDevHlpPGMHandlerPhysicalReset(PPDMDEVINS pDevIns, RTGCPHYS GCPhys)
     9032{
     9033    return pDevIns->pHlpR3->pfnPGMHandlerPhysicalReset(pDevIns, GCPhys);
     9034}
     9035
     9036/**
    89069037 * @copydoc PDMDEVHLPR3::pfnVMMRegisterPatchMemory
    89079038 */
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA-cmd.cpp

    r91507 r91928  
    592592        for (uint32_t i = 0; i < pGbo->cDescriptors; ++i)
    593593        {
    594             rc = PGMHandlerPhysicalRegister(PDMDevHlpGetVM(pSvgaR3State->pDevIns),
    595                                             pGbo->paDescriptors[i].GCPhys, pGbo->paDescriptors[i].GCPhys + pGbo->paDescriptors[i].cPages * PAGE_SIZE - 1,
    596                                             pSvgaR3State->hGboAccessHandlerType, pSvgaR3State->pDevIns, NIL_RTR0PTR, NIL_RTRCPTR, "VMSVGA GBO");
     594            rc = PDMDevHlpPGMHandlerPhysicalRegister(pSvgaR3State->pDevIns,
     595                                                     pGbo->paDescriptors[i].GCPhys, pGbo->paDescriptors[i].GCPhys + pGbo->paDescriptors[i].cPages * PAGE_SIZE - 1,
     596                                                     pSvgaR3State->hGboAccessHandlerType, pSvgaR3State->pDevIns, NIL_RTR0PTR, NIL_RTRCPTR, "VMSVGA GBO");
    597597            AssertRC(rc);
    598598        }
     
    611611            for (uint32_t i = 0; i < pGbo->cDescriptors; ++i)
    612612            {
    613                 int rc = PGMHandlerPhysicalDeregister(PDMDevHlpGetVM(pSvgaR3State->pDevIns), pGbo->paDescriptors[i].GCPhys);
     613                int rc = PDMDevHlpPGMHandlerPhysicalDeregister(pSvgaR3State->pDevIns, pGbo->paDescriptors[i].GCPhys);
    614614                AssertRC(rc);
    615615            }
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp

    r91920 r91928  
    28612861    for (uint32_t i = 0; i < pGMR->numDescriptors; i++)
    28622862    {
    2863         rc = PGMHandlerPhysicalRegister(PDMDevHlpGetVM(pDevIns),
    2864                                         pGMR->paDesc[i].GCPhys, pGMR->paDesc[i].GCPhys + pGMR->paDesc[i].numPages * PAGE_SIZE - 1,
    2865                                         pThis->svga.hGmrAccessHandlerType, pThis, NIL_RTR0PTR, NIL_RTRCPTR, "VMSVGA GMR");
     2863        rc = PDMDevHlpPGMHandlerPhysicalRegister(pDevIns,
     2864                                                 pGMR->paDesc[i].GCPhys, pGMR->paDesc[i].GCPhys + pGMR->paDesc[i].numPages * PAGE_SIZE - 1,
     2865                                                 pThis->svga.hGmrAccessHandlerType, pThis, NIL_RTR0PTR, NIL_RTRCPTR, "VMSVGA GMR");
    28662866        AssertRC(rc);
    28672867    }
     
    28782878    for (uint32_t i = 0; i < pGMR->numDescriptors; i++)
    28792879    {
    2880         int rc = PGMHandlerPhysicalDeregister(PDMDevHlpGetVM(pDevIns), pGMR->paDesc[i].GCPhys);
     2880        int rc = PDMDevHlpPGMHandlerPhysicalDeregister(pDevIns, pGMR->paDesc[i].GCPhys);
    28812881        AssertRC(rc);
    28822882    }
     
    28972897            for (uint32_t j = 0; j < pGMR->numDescriptors; j++)
    28982898            {
    2899                 int rc = PGMHandlerPhysicalReset(PDMDevHlpGetVM(pDevIns), pGMR->paDesc[j].GCPhys);
     2899                int rc = PDMDevHlpPGMHandlerPhysicalReset(pDevIns, pGMR->paDesc[j].GCPhys);
    29002900                AssertRC(rc);
    29012901            }
     
    45804580            {
    45814581# ifdef VMSVGA_USE_FIFO_ACCESS_HANDLER
    4582                 int rc2 = PGMHandlerPhysicalReset(PDMDevHlpGetVM(pDevIns), pThis->svga.GCPhysFIFO);
     4582                int rc2 = PDMDevHlpPGMHandlerPhysicalReset(pDevIns, pThis->svga.GCPhysFIFO);
    45834583                AssertRC(rc2); /* No break. Racing EMTs unmapping and remapping the region. */
    45844584# endif
     
    51965196        if (RT_SUCCESS(rc))
    51975197        {
    5198             rc = PGMHandlerPhysicalRegister(PDMDevHlpGetVM(pDevIns), GCPhysAddress,
     5198            rc = PDMDevHlpPGMHandlerPhysicalRegister(pDevIns, GCPhysAddress,
    51995199#  ifdef DEBUG_FIFO_ACCESS
    5200                                             GCPhysAddress + (pThis->svga.cbFIFO - 1),
     5200                                                     GCPhysAddress + (pThis->svga.cbFIFO - 1),
    52015201#  else
    5202                                             GCPhysAddress + PAGE_SIZE - 1,
     5202                                                     GCPhysAddress + PAGE_SIZE - 1,
    52035203#  endif
    5204                                             pThis->svga.hFifoAccessHandlerType, pThis, NIL_RTR0PTR, NIL_RTRCPTR,
    5205                                             "VMSVGA FIFO");
     5204                                                     pThis->svga.hFifoAccessHandlerType, pThis, NIL_RTR0PTR, NIL_RTRCPTR,
     5205                                                     "VMSVGA FIFO");
    52065206            AssertRC(rc);
    52075207        }
     
    52185218        Assert(pThis->svga.GCPhysFIFO);
    52195219# if defined(VMSVGA_USE_FIFO_ACCESS_HANDLER) || defined(DEBUG_FIFO_ACCESS)
    5220         rc = PGMHandlerPhysicalDeregister(PDMDevHlpGetVM(pDevIns), pThis->svga.GCPhysFIFO);
     5220        rc = PDMDevHlpPGMHandlerPhysicalDeregister(pDevIns, pThis->svga.GCPhysFIFO);
    52215221        AssertRC(rc);
    52225222# else
  • trunk/src/VBox/Devices/Graphics/DevVGA.cpp

    r90447 r91928  
    36263626static VBOXSTRICTRC vgaLFBAccess(PVMCC pVM, PPDMDEVINS pDevIns, PVGASTATE pThis, RTGCPHYS GCPhys, RTGCPTR GCPtr)
    36273627{
     3628    RT_NOREF(pVM);
     3629
    36283630    VBOXSTRICTRC rc = PDMDevHlpCritSectEnter(pDevIns, &pThis->CritSect, VINF_EM_RAW_EMULATE_INSTR);
    36293631    if (rc == VINF_SUCCESS)
     
    36403642         * ASSUME: the guest always maps video memory RW.
    36413643         */
    3642         rc = PGMHandlerPhysicalPageTempOff(pVM, pThis->GCPhysVRAM, GCPhys);
     3644        rc = PDMDevHlpPGMHandlerPhysicalPageTempOff(pDevIns, pThis->GCPhysVRAM, GCPhys);
    36433645        if (RT_SUCCESS(rc))
    36443646        {
     
    47854787    if (pThis->fHasDirtyBits && pThis->GCPhysVRAM && pThis->GCPhysVRAM != NIL_RTGCPHYS)
    47864788    {
    4787         PGMHandlerPhysicalReset(PDMDevHlpGetVM(pDevIns), pThis->GCPhysVRAM);
     4789        PDMDevHlpPGMHandlerPhysicalReset(pDevIns, pThis->GCPhysVRAM);
    47884790        pThis->fHasDirtyBits = false;
    47894791    }
     
    48144816        /* The dirty bits array has been just cleared, reset handlers as well. */
    48154817        if (pThis->GCPhysVRAM && pThis->GCPhysVRAM != NIL_RTGCPHYS)
    4816             PGMHandlerPhysicalReset(PDMDevHlpGetVM(pDevIns), pThis->GCPhysVRAM);
     4818            PDMDevHlpPGMHandlerPhysicalReset(pDevIns, pThis->GCPhysVRAM);
    48174819    }
    48184820    if (pThis->fRemappedVGA)
     
    54995501{
    55005502    Assert(pThis->GCPhysVRAM);
    5501     int rc = PGMHandlerPhysicalRegister(PDMDevHlpGetVM(pDevIns),
    5502                                         pThis->GCPhysVRAM, pThis->GCPhysVRAM + (cbFrameBuffer - 1),
    5503                                         pThis->hLfbAccessHandlerType, pDevIns, pDevIns->pDevInsR0RemoveMe,
    5504                                         pDevIns->pDevInsForRC, "VGA LFB");
     5503    int rc = PDMDevHlpPGMHandlerPhysicalRegister(pDevIns,
     5504                                                 pThis->GCPhysVRAM, pThis->GCPhysVRAM + (cbFrameBuffer - 1),
     5505                                                 pThis->hLfbAccessHandlerType, pDevIns, pDevIns->pDevInsR0RemoveMe,
     5506                                                 pDevIns->pDevInsForRC, "VGA LFB");
    55055507
    55065508    AssertRC(rc);
     
    55155517{
    55165518    Assert(pThis->GCPhysVRAM);
    5517     int rc = PGMHandlerPhysicalDeregister(PDMDevHlpGetVM(pDevIns), pThis->GCPhysVRAM);
     5519    int rc = PDMDevHlpPGMHandlerPhysicalDeregister(pDevIns, pThis->GCPhysVRAM);
    55185520    AssertRC(rc);
    55195521    return rc;
     
    55695571# endif
    55705572            {
    5571                 rc = PGMHandlerPhysicalRegister(PDMDevHlpGetVM(pDevIns), GCPhysAddress, GCPhysAddress + (pThis->vram_size - 1),
    5572                                                 pThis->hLfbAccessHandlerType, pDevIns, pDevIns->pDevInsR0RemoveMe,
    5573                                                 pDevIns->pDevInsForRC, "VGA LFB");
     5573                rc = PDMDevHlpPGMHandlerPhysicalRegister(pDevIns, GCPhysAddress, GCPhysAddress + (pThis->vram_size - 1),
     5574                                                         pThis->hLfbAccessHandlerType, pDevIns, pDevIns->pDevInsR0RemoveMe,
     5575                                                         pDevIns->pDevInsForRC, "VGA LFB");
    55745576                AssertLogRelRC(rc);
    55755577            }
     
    55965598# endif
    55975599        {
    5598             rc = PGMHandlerPhysicalDeregister(PDMDevHlpGetVM(pDevIns), pThis->GCPhysVRAM);
     5600            rc = PDMDevHlpPGMHandlerPhysicalDeregister(pDevIns, pThis->GCPhysVRAM);
    55995601            AssertRC(rc);
    56005602        }
     
    60536055        &&  pThis->GCPhysVRAM != NIL_RTGCPHYS)
    60546056    {
    6055         int rc = PGMHandlerPhysicalReset(PDMDevHlpGetVM(pDevIns), pThis->GCPhysVRAM);
     6057        int rc = PDMDevHlpPGMHandlerPhysicalReset(pDevIns, pThis->GCPhysVRAM);
    60566058        AssertRC(rc);
    60576059    }
  • trunk/src/VBox/VMM/VMMR0/PDMR0DevHlp.cpp

    r91906 r91928  
    13171317    LogFlow(("pdmR0DevHlp_HpetSetUpContext: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, VINF_SUCCESS));
    13181318    return VINF_SUCCESS;
     1319}
     1320
     1321
     1322/** @interface_method_impl{PDMDEVHLPR0,pfnPGMHandlerPhysicalPageTempOff} */
     1323static DECLCALLBACK(int) pdmR0DevHlp_PGMHandlerPhysicalPageTempOff(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTGCPHYS GCPhysPage)
     1324{
     1325    PDMDEV_ASSERT_DEVINS(pDevIns);
     1326    LogFlow(("pdmR0DevHlp_PGMHandlerPhysicalPageTempOff: caller='%s'/%d: GCPhys=%RGp\n", pDevIns->pReg->szName, pDevIns->iInstance, GCPhys));
     1327
     1328    int rc = PGMHandlerPhysicalPageTempOff(pDevIns->Internal.s.pGVM, GCPhys, GCPhysPage);
     1329
     1330    Log(("pdmR0DevHlp_PGMHandlerPhysicalPageTempOff: caller='%s'/%d: returns %Rrc\n",
     1331         pDevIns->pReg->szName, pDevIns->iInstance, rc));
     1332    return rc;
    13191333}
    13201334
     
    14121426    pdmR0DevHlp_IoApicSetUpContext,
    14131427    pdmR0DevHlp_HpetSetUpContext,
     1428    pdmR0DevHlp_PGMHandlerPhysicalPageTempOff,
    14141429    NULL /*pfnReserved1*/,
    14151430    NULL /*pfnReserved2*/,
     
    15191534    pdmR0DevHlp_IoApicSetUpContext,
    15201535    pdmR0DevHlp_HpetSetUpContext,
     1536    pdmR0DevHlp_PGMHandlerPhysicalPageTempOff,
    15211537    NULL /*pfnReserved1*/,
    15221538    NULL /*pfnReserved2*/,
  • trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp

    r91926 r91928  
    763763
    764764    Log(("pdmR3DevHlp_PGMHandlerPhysicalTypeRegister: caller='%s'/%d: returns %Rrc\n",
     765         pDevIns->pReg->szName, pDevIns->iInstance, rc));
     766    return rc;
     767}
     768
     769
     770/** @interface_method_impl{PDMDEVHLPR3,pfnPGMHandlerPhysicalRegister} */
     771static DECLCALLBACK(int) pdmR3DevHlp_PGMHandlerPhysicalRegister(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTGCPHYS GCPhysLast,
     772                                                                PGMPHYSHANDLERTYPE hType, RTR3PTR pvUserR3, RTR0PTR pvUserR0,
     773                                                                RTRCPTR pvUserRC, R3PTRTYPE(const char *) pszDesc)
     774{
     775    PDMDEV_ASSERT_DEVINS(pDevIns);
     776    PVM  pVM = pDevIns->Internal.s.pVMR3;
     777    LogFlow(("pdmR3DevHlp_PGMHandlerPhysicalRegister: caller='%s'/%d: GCPhys=%RGp GCPhysLast=%RGp hType=%u pvUserR3=%p pvUserR0=%llx pvUsereRC=%llx pszDesc=%p:{%s}\n",
     778             pDevIns->pReg->szName, pDevIns->iInstance, GCPhys, GCPhysLast, hType, pvUserR3, pvUserR0, pvUserRC, pszDesc, pszDesc));
     779
     780    int rc = PGMHandlerPhysicalRegister(pVM, GCPhys, GCPhysLast, hType, pvUserR3, pvUserR0, pvUserRC, pszDesc);
     781
     782    Log(("pdmR3DevHlp_PGMHandlerPhysicalRegister: caller='%s'/%d: returns %Rrc\n",
     783         pDevIns->pReg->szName, pDevIns->iInstance, rc));
     784    return rc;
     785}
     786
     787
     788/** @interface_method_impl{PDMDEVHLPR3,pfnPGMHandlerPhysicalDeregister} */
     789static DECLCALLBACK(int) pdmR3DevHlp_PGMHandlerPhysicalDeregister(PPDMDEVINS pDevIns, RTGCPHYS GCPhys)
     790{
     791    PDMDEV_ASSERT_DEVINS(pDevIns);
     792    PVM  pVM = pDevIns->Internal.s.pVMR3;
     793    LogFlow(("pdmR3DevHlp_PGMHandlerPhysicalDeregister: caller='%s'/%d: GCPhys=%RGp\n", pDevIns->pReg->szName, pDevIns->iInstance, GCPhys));
     794
     795    int rc = PGMHandlerPhysicalDeregister(pVM, GCPhys);
     796
     797    Log(("pdmR3DevHlp_PGMHandlerPhysicalDeregister: caller='%s'/%d: returns %Rrc\n",
     798         pDevIns->pReg->szName, pDevIns->iInstance, rc));
     799    return rc;
     800}
     801
     802
     803/** @interface_method_impl{PDMDEVHLPR3,pfnPGMHandlerPhysicalPageTempOff} */
     804static DECLCALLBACK(int) pdmR3DevHlp_PGMHandlerPhysicalPageTempOff(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTGCPHYS GCPhysPage)
     805{
     806    PDMDEV_ASSERT_DEVINS(pDevIns);
     807    PVM  pVM = pDevIns->Internal.s.pVMR3;
     808    LogFlow(("pdmR3DevHlp_PGMHandlerPhysicalPageTempOff: caller='%s'/%d: GCPhys=%RGp\n", pDevIns->pReg->szName, pDevIns->iInstance, GCPhys));
     809
     810    int rc = PGMHandlerPhysicalPageTempOff(pVM, GCPhys, GCPhysPage);
     811
     812    Log(("pdmR3DevHlp_PGMHandlerPhysicalPageTempOff: caller='%s'/%d: returns %Rrc\n",
     813         pDevIns->pReg->szName, pDevIns->iInstance, rc));
     814    return rc;
     815}
     816
     817
     818/** @interface_method_impl{PDMDEVHLPR3,pfnPGMHandlerPhysicalReset} */
     819static DECLCALLBACK(int) pdmR3DevHlp_PGMHandlerPhysicalReset(PPDMDEVINS pDevIns, RTGCPHYS GCPhys)
     820{
     821    PDMDEV_ASSERT_DEVINS(pDevIns);
     822    PVM  pVM = pDevIns->Internal.s.pVMR3;
     823    LogFlow(("pdmR3DevHlp_PGMHandlerPhysicalReset: caller='%s'/%d: GCPhys=%RGp\n", pDevIns->pReg->szName, pDevIns->iInstance, GCPhys));
     824
     825    int rc = PGMHandlerPhysicalReset(pVM, GCPhys);
     826
     827    Log(("pdmR3DevHlp_PGMHandlerPhysicalReset: caller='%s'/%d: returns %Rrc\n",
    765828         pDevIns->pReg->szName, pDevIns->iInstance, rc));
    766829    return rc;
     
    48454908    pdmR3DevHlp_QueryGenericUserObject,
    48464909    pdmR3DevHlp_PGMHandlerPhysicalTypeRegister,
     4910    pdmR3DevHlp_PGMHandlerPhysicalRegister,
     4911    pdmR3DevHlp_PGMHandlerPhysicalDeregister,
     4912    pdmR3DevHlp_PGMHandlerPhysicalPageTempOff,
     4913    pdmR3DevHlp_PGMHandlerPhysicalReset,
    48474914    pdmR3DevHlp_VMMRegisterPatchMemory,
    48484915    pdmR3DevHlp_VMMDeregisterPatchMemory,
     
    52205287    pdmR3DevHlp_QueryGenericUserObject,
    52215288    pdmR3DevHlp_PGMHandlerPhysicalTypeRegister,
     5289    pdmR3DevHlp_PGMHandlerPhysicalRegister,
     5290    pdmR3DevHlp_PGMHandlerPhysicalDeregister,
     5291    pdmR3DevHlp_PGMHandlerPhysicalPageTempOff,
     5292    pdmR3DevHlp_PGMHandlerPhysicalReset,
    52225293    pdmR3DevHlp_VMMRegisterPatchMemory,
    52235294    pdmR3DevHlp_VMMDeregisterPatchMemory,
     
    53825453    PDMDEV_ASSERT_DEVINS(pDevIns);
    53835454    RT_NOREF(enmKind, pfnHandlerR3, pszHandlerR0, pszPfHandlerR0, pszHandlerRC, pszPfHandlerRC, pszDesc, phType);
     5455    AssertReleaseMsgFailed(("Untrusted device called trusted helper! '%s'/%d\n",
     5456                            pDevIns->pReg->szName, pDevIns->iInstance));
     5457    return VERR_ACCESS_DENIED;
     5458}
     5459
     5460
     5461/** @interface_method_impl{PDMDEVHLPR3,pfnPGMHandlerPhysicalRegister} */
     5462static DECLCALLBACK(int) pdmR3DevHlp_Untrusted_PGMHandlerPhysicalRegister(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTGCPHYS GCPhysLast,
     5463                                                                          PGMPHYSHANDLERTYPE hType, RTR3PTR pvUserR3, RTR0PTR pvUserR0,
     5464                                                                          RTRCPTR pvUserRC, R3PTRTYPE(const char *) pszDesc)
     5465{
     5466    PDMDEV_ASSERT_DEVINS(pDevIns);
     5467    RT_NOREF(GCPhys, GCPhysLast, hType, pvUserR3, pvUserR0, pvUserRC, pszDesc);
     5468    AssertReleaseMsgFailed(("Untrusted device called trusted helper! '%s'/%d\n",
     5469                            pDevIns->pReg->szName, pDevIns->iInstance));
     5470    return VERR_ACCESS_DENIED;
     5471}
     5472
     5473
     5474/** @interface_method_impl{PDMDEVHLPR3,pfnPGMHandlerPhysicalDeregister} */
     5475static DECLCALLBACK(int) pdmR3DevHlp_Untrusted_PGMHandlerPhysicalDeregister(PPDMDEVINS pDevIns, RTGCPHYS GCPhys)
     5476{
     5477    PDMDEV_ASSERT_DEVINS(pDevIns);
     5478    RT_NOREF(GCPhys);
     5479    AssertReleaseMsgFailed(("Untrusted device called trusted helper! '%s'/%d\n",
     5480                            pDevIns->pReg->szName, pDevIns->iInstance));
     5481    return VERR_ACCESS_DENIED;
     5482}
     5483
     5484
     5485/** @interface_method_impl{PDMDEVHLPR3,pfnPGMHandlerPhysicalPageTempOff} */
     5486static DECLCALLBACK(int) pdmR3DevHlp_Untrusted_PGMHandlerPhysicalPageTempOff(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTGCPHYS GCPhysPage)
     5487{
     5488    PDMDEV_ASSERT_DEVINS(pDevIns);
     5489    RT_NOREF(GCPhys, GCPhysPage);
     5490    AssertReleaseMsgFailed(("Untrusted device called trusted helper! '%s'/%d\n",
     5491                            pDevIns->pReg->szName, pDevIns->iInstance));
     5492    return VERR_ACCESS_DENIED;
     5493}
     5494
     5495
     5496/** @interface_method_impl{PDMDEVHLPR3,pfnPGMHandlerPhysicalReset} */
     5497static DECLCALLBACK(int) pdmR3DevHlp_Untrusted_PGMHandlerPhysicalReset(PPDMDEVINS pDevIns, RTGCPHYS GCPhys)
     5498{
     5499    PDMDEV_ASSERT_DEVINS(pDevIns);
     5500    RT_NOREF(GCPhys);
    53845501    AssertReleaseMsgFailed(("Untrusted device called trusted helper! '%s'/%d\n",
    53855502                            pDevIns->pReg->szName, pDevIns->iInstance));
     
    58205937    pdmR3DevHlp_Untrusted_QueryGenericUserObject,
    58215938    pdmR3DevHlp_Untrusted_PGMHandlerPhysicalTypeRegister,
     5939    pdmR3DevHlp_Untrusted_PGMHandlerPhysicalRegister,
     5940    pdmR3DevHlp_Untrusted_PGMHandlerPhysicalDeregister,
     5941    pdmR3DevHlp_Untrusted_PGMHandlerPhysicalPageTempOff,
     5942    pdmR3DevHlp_Untrusted_PGMHandlerPhysicalReset,
    58225943    pdmR3DevHlp_Untrusted_VMMRegisterPatchMemory,
    58235944    pdmR3DevHlp_Untrusted_VMMDeregisterPatchMemory,
Note: See TracChangeset for help on using the changeset viewer.

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