VirtualBox

Changeset 80179 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Aug 7, 2019 10:48:23 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
132620
Message:

VMM: Kicking out raw-mode - Bunch of R0PTRTYPE use in PGM. bugref:9517

Location:
trunk/src/VBox/VMM/VMMAll
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/PGMAll.cpp

    r80167 r80179  
    22522252    if (RT_SUCCESS(rc))
    22532253    {
    2254         RTRCPTR     RCPtr       = NIL_RTRCPTR;
    22552254        RTHCPTR     HCPtr       = NIL_RTHCPTR;
    22562255# ifndef VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0
     
    22652264# endif
    22662265            if (fChanged)
    2267             {
    22682266                pVCpu->pgm.s.aGCPhysGstPaePDs[iPdpt]   = GCPhys;
    2269                 pVCpu->pgm.s.apGstPaePDsRC[iPdpt]      = (RCPTRTYPE(PX86PDPAE))RCPtr;
    2270             }
    22712267
    22722268            *ppPd = pVCpu->pgm.s.CTX_SUFF(apGstPaePDs)[iPdpt];
     
    22822278    pVCpu->pgm.s.apGstPaePDsR0[iPdpt]      = 0;
    22832279# endif
    2284     pVCpu->pgm.s.apGstPaePDsRC[iPdpt]      = 0;
    22852280
    22862281    pgmUnlock(pVM);
     
    23772372            pVCpu->pgm.s.apGstPaePDsR0[i]     = 0;
    23782373#endif
    2379             pVCpu->pgm.s.apGstPaePDsRC[i]     = 0;
    23802374            pVCpu->pgm.s.aGCPhysGstPaePDs[i]  = NIL_RTGCPHYS;
    23812375        }
  • trunk/src/VBox/VMM/VMMAll/PGMAllBth.h

    r80172 r80179  
    135135        pgmPoolFreeByPage(pPool, pOldShwPageCR3, NIL_PGMPOOL_IDX, UINT32_MAX);
    136136        pVCpu->pgm.s.pShwPageCR3R3 = NIL_RTR3PTR;
    137         pVCpu->pgm.s.pShwPageCR3RC = NIL_RTRCPTR;
    138137        pVCpu->pgm.s.pShwPageCR3R0 = NIL_RTR0PTR;
    139138    }
     
    148147
    149148    pVCpu->pgm.s.pShwPageCR3R3 = (R3PTRTYPE(PPGMPOOLPAGE))MMHyperCCToR3(pVM, pNewShwPageCR3);
    150     pVCpu->pgm.s.pShwPageCR3RC = (RCPTRTYPE(PPGMPOOLPAGE))MMHyperCCToRC(pVM, pNewShwPageCR3);
    151149    pVCpu->pgm.s.pShwPageCR3R0 = (R0PTRTYPE(PPGMPOOLPAGE))MMHyperCCToR0(pVM, pNewShwPageCR3);
    152150
     
    35863584                    false);
    35873585#  if !defined(IN_RING0) && PGM_GST_TYPE != PGM_TYPE_AMD64
    3588 #   if PGM_GST_TYPE == PGM_TYPE_32BIT
     3586#   if 0
     3587#    if PGM_GST_TYPE == PGM_TYPE_32BIT
    35893588    rc = PGMShwGetPage(pVCpu, (RTRCUINTPTR)pPGM->pGst32BitPdRC, NULL, &HCPhysShw);
    3590 #   else
     3589#    else
    35913590    rc = PGMShwGetPage(pVCpu, (RTRCUINTPTR)pPGM->pGstPaePdptRC, NULL, &HCPhysShw);
    3592 #   endif
     3591#    endif
    35933592    AssertRCReturn(rc, 1);
    35943593    HCPhys = NIL_RTHCPHYS;
    35953594    rc = pgmRamGCPhys2HCPhys(pVM, PGM_A20_APPLY(pVCpu, cr3 & GST_CR3_PAGE_MASK), &HCPhys);
    35963595    AssertMsgReturn(HCPhys == HCPhysShw, ("HCPhys=%RHp HCPhyswShw=%RHp (cr3)\n", HCPhys, HCPhysShw), false);
     3596#   endif
    35973597#   if PGM_GST_TYPE == PGM_TYPE_32BIT && defined(IN_RING3)
    35983598    pgmGstGet32bitPDPtr(pVCpu);
     
    43894389            pVCpu->pgm.s.apGstPaePDsR0[i]     = 0;
    43904390#  endif
    4391             pVCpu->pgm.s.apGstPaePDsRC[i]     = 0;
    43924391            pVCpu->pgm.s.aGCPhysGstPaePDs[i]  = NIL_RTGCPHYS;
    43934392        }
     
    44434442#  ifdef IN_RING0
    44444443    pVCpu->pgm.s.pShwPageCR3R3 = MMHyperCCToR3(pVM, pVCpu->pgm.s.CTX_SUFF(pShwPageCR3));
    4445     pVCpu->pgm.s.pShwPageCR3RC = MMHyperCCToRC(pVM, pVCpu->pgm.s.CTX_SUFF(pShwPageCR3));
    44464444#  else
    44474445    pVCpu->pgm.s.pShwPageCR3R0 = MMHyperCCToR0(pVM, pVCpu->pgm.s.CTX_SUFF(pShwPageCR3));
    4448     pVCpu->pgm.s.pShwPageCR3RC = MMHyperCCToRC(pVM, pVCpu->pgm.s.CTX_SUFF(pShwPageCR3));
    44494446#  endif
    44504447
     
    45084505    pVCpu->pgm.s.pGst32BitPdR0 = 0;
    45094506# endif
    4510     pVCpu->pgm.s.pGst32BitPdRC = 0;
    45114507
    45124508#elif PGM_GST_TYPE == PGM_TYPE_PAE
     
    45154511    pVCpu->pgm.s.pGstPaePdptR0 = 0;
    45164512# endif
    4517     pVCpu->pgm.s.pGstPaePdptRC = 0;
    45184513    for (unsigned i = 0; i < X86_PG_PAE_PDPE_ENTRIES; i++)
    45194514    {
     
    45224517        pVCpu->pgm.s.apGstPaePDsR0[i]    = 0;
    45234518# endif
    4524         pVCpu->pgm.s.apGstPaePDsRC[i]    = 0;
    45254519        pVCpu->pgm.s.aGCPhysGstPaePDs[i] = NIL_RTGCPHYS;
    45264520    }
     
    45684562        pVCpu->pgm.s.pShwPageCR3R3 = 0;
    45694563        pVCpu->pgm.s.pShwPageCR3R0 = 0;
    4570         pVCpu->pgm.s.pShwPageCR3RC = 0;
    45714564    }
    45724565
  • trunk/src/VBox/VMM/VMMAll/PGMAllGst.h

    r80163 r80179  
    516516PGM_GST_DECL(int, Relocate)(PVMCPU pVCpu, RTGCPTR offDelta)
    517517{
    518     pVCpu->pgm.s.pGst32BitPdRC += offDelta;
    519     for (unsigned i = 0; i < RT_ELEMENTS(pVCpu->pgm.s.apGstPaePDsRC); i++)
    520         pVCpu->pgm.s.apGstPaePDsRC[i] += offDelta;
    521     pVCpu->pgm.s.pGstPaePdptRC += offDelta;
    522 
     518    RT_NOREF(pVCpu, offDelta);
    523519    return VINF_SUCCESS;
    524520}
  • trunk/src/VBox/VMM/VMMAll/PGMAllHandler.cpp

    r80172 r80179  
    459459        pVM->pgm.s.pLastPhysHandlerR0 = 0;
    460460        pVM->pgm.s.pLastPhysHandlerR3 = 0;
    461         pVM->pgm.s.pLastPhysHandlerRC = 0;
    462461
    463462        pPhysHandler->Core.Key     = NIL_RTGCPHYS;
     
    538537        pVM->pgm.s.pLastPhysHandlerR0 = 0;
    539538        pVM->pgm.s.pLastPhysHandlerR3 = 0;
    540         pVM->pgm.s.pLastPhysHandlerRC = 0;
    541539
    542540        pgmUnlock(pVM);
     
    938936        pVM->pgm.s.pLastPhysHandlerR0 = 0;
    939937        pVM->pgm.s.pLastPhysHandlerR3 = 0;
    940         pVM->pgm.s.pLastPhysHandlerRC = 0;
    941938        PGMHandlerPhysicalTypeRelease(pVM, pCur->hType);
    942939        MMHyperFree(pVM, pCur);
     
    10961093                        pVM->pgm.s.pLastPhysHandlerR0 = 0;
    10971094                        pVM->pgm.s.pLastPhysHandlerR3 = 0;
    1098                         pVM->pgm.s.pLastPhysHandlerRC = 0;
    10991095                        PGMHandlerPhysicalTypeRelease(pVM, pCur2->hType);
    11001096                        MMHyperFree(pVM, pCur2);
  • trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp

    r80172 r80179  
    323323{
    324324    pgmLock(pVM);
    325     for (uint32_t i = 0; i < PGM_RAMRANGE_TLB_ENTRIES; i++)
    326     {
    327         pVM->pgm.s.apRamRangesTlbR3[i] = NIL_RTR3PTR;
    328         pVM->pgm.s.apRamRangesTlbR0[i] = NIL_RTR0PTR;
    329         pVM->pgm.s.apRamRangesTlbRC[i] = NIL_RTRCPTR;
    330     }
     325    RT_ZERO(pVM->pgm.s.apRamRangesTlbR3);
     326    RT_ZERO(pVM->pgm.s.apRamRangesTlbR0);
    331327    pgmUnlock(pVM);
    332328}
  • trunk/src/VBox/VMM/VMMAll/PGMAllShw.h

    r76553 r80179  
    222222
    223223    pVCpu->pgm.s.pShwPageCR3R3 = (R3PTRTYPE(PPGMPOOLPAGE))MMHyperCCToR3(pVM, pNewShwPageCR3);
    224     pVCpu->pgm.s.pShwPageCR3RC = (RCPTRTYPE(PPGMPOOLPAGE))MMHyperCCToRC(pVM, pNewShwPageCR3);
    225224    pVCpu->pgm.s.pShwPageCR3R0 = (R0PTRTYPE(PPGMPOOLPAGE))MMHyperCCToR0(pVM, pNewShwPageCR3);
    226225
     
    261260        pVCpu->pgm.s.pShwPageCR3R3 = 0;
    262261        pVCpu->pgm.s.pShwPageCR3R0 = 0;
    263         pVCpu->pgm.s.pShwPageCR3RC = 0;
    264262
    265263        pgmUnlock(pVM);
     
    613611PGM_SHW_DECL(int, Relocate)(PVMCPU pVCpu, RTGCPTR offDelta)
    614612{
    615 # if PGM_SHW_TYPE != PGM_TYPE_NONE
    616     pVCpu->pgm.s.pShwPageCR3RC += offDelta;
    617 # else
    618613    RT_NOREF(pVCpu, offDelta);
    619 # endif
    620614    return VINF_SUCCESS;
    621615}
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