VirtualBox

Changeset 91942 in vbox for trunk/src


Ignore:
Timestamp:
Oct 21, 2021 12:59:54 PM (3 years ago)
Author:
vboxsync
Message:

Devices/Graphics/HGSMIHost: Eliminate usage of VMMGetCpu(), bugref:10074

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp

    r90447 r91942  
    28282828int VBVAInit(PPDMDEVINS pDevIns, PVGASTATE pThis, PVGASTATECC pThisCC)
    28292829{
    2830     PVM pVM = PDMDevHlpGetVM(pDevIns);
    2831 
    28322830    int rc = HGSMICreate(&pThisCC->pHGSMI,
    2833                          pVM,
     2831                         pDevIns,
    28342832                         "VBVA",
    28352833                         0,
  • trunk/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.cpp

    r90791 r91942  
    162162typedef struct HGSMIINSTANCE
    163163{
    164     PVM pVM;                           /**< The VM. */
     164    PPDMDEVINS  pDevIns;               /**< The device instance. */
    165165
    166166    const char *pszName;               /**< A name for the instance. Mostyl used in the log. */
     
    328328    AssertPtr(pIns);
    329329
    330     Assert(VMMGetCpu(pIns->pVM) != NULL);
     330    Assert(PDMDevHlpGetVMCPU(pIns->pDevIns) != NULL);
    331331
    332332#ifndef VBOX_WITH_WDDM
     
    345345static bool hgsmiProcessHostCmdCompletion(HGSMIINSTANCE *pIns, HGSMIOFFSET offBuffer, bool fCompleteFirst)
    346346{
    347     Assert(VMMGetCpu(pIns->pVM) != NULL);
     347    Assert(PDMDevHlpGetVMCPU(pIns->pDevIns) != NULL);
    348348
    349349    int rc = hgsmiFIFOLock(pIns);
     
    415415    LogFlowFunc(("pIns %p\n", pIns));
    416416
    417     Assert(VMMGetCpu(pIns->pVM) != NULL);
     417    Assert(PDMDevHlpGetVMCPU(pIns->pDevIns) != NULL);
    418418
    419419    AssertPtrReturn(pIns->pHGFlags, HGSMIOFFSET_VOID);
     
    15141514
    15151515int HGSMICreate(PHGSMIINSTANCE *ppIns,
    1516                 PVM             pVM,
     1516                PPDMDEVINS      pDevIns,
    15171517                const char     *pszName,
    15181518                HGSMIOFFSET     offBase,
     
    15231523                size_t          cbContext)
    15241524{
    1525     LogFlowFunc(("ppIns = %p, pVM = %p, pszName = [%s], offBase = 0x%08X, pu8MemBase = %p, cbMem = 0x%08X, "
     1525    LogFlowFunc(("ppIns = %p, pDevIns = %p, pszName = [%s], offBase = 0x%08X, pu8MemBase = %p, cbMem = 0x%08X, "
    15261526                 "pfnNotifyGuest = %p, pvNotifyGuest = %p, cbContext = %d\n",
    15271527                 ppIns,
    1528                  pVM,
     1528                 pDevIns,
    15291529                 pszName,
    15301530                 offBase,
     
    15371537
    15381538    AssertPtrReturn(ppIns, VERR_INVALID_PARAMETER);
    1539     AssertPtrReturn(pVM, VERR_INVALID_PARAMETER);
     1539    AssertPtrReturn(pDevIns, VERR_INVALID_PARAMETER);
    15401540    AssertPtrReturn(pu8MemBase, VERR_INVALID_PARAMETER);
    15411541
     
    15531553        if (RT_SUCCESS (rc))
    15541554        {
    1555             pIns->pVM            = pVM;
     1555            pIns->pDevIns        = pDevIns;
    15561556            pIns->pszName        = RT_VALID_PTR(pszName) ? pszName : "";
    15571557
  • trunk/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.h

    r85121 r91942  
    3838
    3939int   HGSMICreate(PHGSMIINSTANCE *ppIns,
    40                   PVM             pVM,
     40                  PPDMDEVINS      pDevIns,
    4141                  const char     *pszName,
    4242                  HGSMIOFFSET     offBase,
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