VirtualBox

Changeset 17368 in vbox for trunk/src


Ignore:
Timestamp:
Mar 5, 2009 12:58:27 AM (16 years ago)
Author:
vboxsync
Message:

GMM: Fixed to the ring-3 interface, mainly using VMMR3CallR0.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/GMM.cpp

    r13816 r17368  
    5151    Req.enmPolicy = enmPolicy;
    5252    Req.enmPriority = enmPriority;
    53     return SUPCallVMMR0Ex(pVM->pVMR0, VMMR0_DO_GMM_INITIAL_RESERVATION, 0, &Req.Hdr);
     53    return VMMR3CallR0(pVM, VMMR0_DO_GMM_INITIAL_RESERVATION, 0, &Req.Hdr);
    5454}
    5555
     
    6666    Req.cShadowPages = cShadowPages;
    6767    Req.cFixedPages = cFixedPages;
    68     return SUPCallVMMR0Ex(pVM->pVMR0, VMMR0_DO_GMM_UPDATE_RESERVATION, 0, &Req.Hdr);
     68    return VMMR3CallR0(pVM, VMMR0_DO_GMM_UPDATE_RESERVATION, 0, &Req.Hdr);
    6969}
    7070
     
    9191    pReq->cPages = cPages;
    9292    NOREF(pVM);
     93    *ppReq = pReq;
    9394    return VINF_SUCCESS;
    9495}
     
    107108    for (unsigned i = 0; ; i++)
    108109    {
    109         int rc = SUPCallVMMR0Ex(pVM->pVMR0, VMMR0_DO_GMM_ALLOCATE_PAGES, 0, &pReq->Hdr);
     110        int rc = VMMR3CallR0(pVM, VMMR0_DO_GMM_ALLOCATE_PAGES, 0, &pReq->Hdr);
    110111        if (RT_SUCCESS(rc))
    111112            return rc;
     
    126127                              pReq->cPages);
    127128
    128         rc = SUPCallVMMR0Ex(pVM->pVMR0, VMMR0_DO_GMM_SEED_CHUNK, (uintptr_t)pvChunk, NULL);
     129        rc = VMMR3CallR0(pVM, VMMR0_DO_GMM_SEED_CHUNK, (uintptr_t)pvChunk, NULL);
    129130        if (RT_FAILURE(rc))
    130131            return VMSetError(pVM, rc, RT_SRC_POS, N_("GMM seeding failed"));
     
    178179GMMR3DECL(int) GMMR3FreePagesPerform(PVM pVM, PGMMFREEPAGESREQ pReq)
    179180{
    180     int rc = SUPCallVMMR0Ex(pVM->pVMR0, VMMR0_DO_GMM_FREE_PAGES, 0, &pReq->Hdr);
     181    int rc = VMMR3CallR0(pVM, VMMR0_DO_GMM_FREE_PAGES, 0, &pReq->Hdr);
    181182    if (RT_SUCCESS(rc))
    182183        return rc;
     
    223224    }
    224225
    225     int rc = SUPCallVMMR0Ex(pVM->pVMR0, VMMR0_DO_GMM_FREE_PAGES, 0, &pReq->Hdr);
     226    int rc = VMMR3CallR0(pVM, VMMR0_DO_GMM_FREE_PAGES, 0, &pReq->Hdr);
    226227    AssertLogRelRC(rc);
    227228
     
    237238    Req.Hdr.cbReq = sizeof(Req);
    238239
    239     return SUPCallVMMR0Ex(pVM->pVMR0, VMMR0_DO_GMM_BALLOONED_PAGES, 0, &Req.Hdr);
     240    return VMMR3CallR0(pVM, VMMR0_DO_GMM_BALLOONED_PAGES, 0, &Req.Hdr);
    240241}
    241242#endif
     
    247248GMMR3DECL(int)  GMMR3DeflatedBalloon(PVM pVM, uint32_t cPages)
    248249{
    249     return SUPCallVMMR0Ex(pVM->pVMR0, VMMR0_DO_GMM_DEFLATED_BALLOON, cPages, NULL);
     250    return VMMR3CallR0(pVM, VMMR0_DO_GMM_DEFLATED_BALLOON, cPages, NULL);
    250251}
    251252
     
    262263    Req.idChunkUnmap = idChunkUnmap;
    263264    Req.pvR3 = NULL;
    264     int rc = SUPCallVMMR0Ex(pVM->pVMR0, VMMR0_DO_GMM_MAP_UNMAP_CHUNK, 0, &Req.Hdr);
     265    int rc = VMMR3CallR0(pVM, VMMR0_DO_GMM_MAP_UNMAP_CHUNK, 0, &Req.Hdr);
    265266    if (RT_SUCCESS(rc) && ppvR3)
    266267        *ppvR3 = Req.pvR3;
     
    274275GMMR3DECL(int)  GMMR3SeedChunk(PVM pVM, RTR3PTR pvR3)
    275276{
    276     return SUPCallVMMR0Ex(pVM->pVMR0, VMMR0_DO_GMM_SEED_CHUNK, (uintptr_t)pvR3, NULL);
    277 }
    278 
     277    return VMMR3CallR0(pVM, VMMR0_DO_GMM_SEED_CHUNK, (uintptr_t)pvR3, NULL);
     278}
     279
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