VirtualBox

Changeset 92626 in vbox for trunk/src/VBox/VMM/VMMR3


Ignore:
Timestamp:
Nov 29, 2021 12:32:58 PM (3 years ago)
Author:
vboxsync
Message:

VMM: Nested VMX: bugref:10092 Adjust PGM APIs and translate nested-guest CR3 prior to mapping them when switching mode and other places.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/EM.cpp

    r92583 r92626  
    14571457    {
    14581458        CPUM_IMPORT_EXTRN_RCSTRICT(pVCpu, CPUMCTX_EXTRN_CR0 | CPUMCTX_EXTRN_CR3 | CPUMCTX_EXTRN_CR4 | CPUMCTX_EXTRN_EFER, rc);
    1459         int const rc2 = PGMUpdateCR3(pVCpu, CPUMGetGuestCR3(pVCpu), false /* fCr3Mapped */);
     1459        int const rc2 = PGMUpdateCR3(pVCpu, CPUMGetGuestCR3(pVCpu));
    14601460        if (RT_FAILURE(rc2))
    14611461            return rc2;
  • trunk/src/VBox/VMM/VMMR3/NEMR3Native-darwin.cpp

    r92583 r92626  
    11251125    if (fUpdateCr3)
    11261126    {
    1127         int rc = PGMUpdateCR3(pVCpu, pVCpu->cpum.GstCtx.cr3, false /*fCr3Mapped*/);
     1127        int rc = PGMUpdateCR3(pVCpu, pVCpu->cpum.GstCtx.cr3);
    11281128        if (rc == VINF_SUCCESS)
    11291129        { /* likely */ }
  • trunk/src/VBox/VMM/VMMR3/NEMR3Native-linux.cpp

    r92583 r92626  
    15661566        if (fUpdateCr3)
    15671567        {
    1568             int rc = PGMUpdateCR3(pVCpu, pVCpu->cpum.GstCtx.cr3, false /*fCr3Mapped*/);
     1568            int rc = PGMUpdateCR3(pVCpu, pVCpu->cpum.GstCtx.cr3);
    15691569            if (rc == VINF_SUCCESS)
    15701570            { /* likely */ }
  • trunk/src/VBox/VMM/VMMR3/NEMR3Native-win.cpp

    r92583 r92626  
    18961896                {
    18971897                    LogFlow(("nemR3NativeRunGC: calling PGMFlushTLB...\n"));
    1898                     int rc = PGMFlushTLB(pVCpu, CPUMGetGuestCR3(pVCpu), true /*fGlobal*/, false /*fCr3Mapped*/);
     1898                    int rc = PGMFlushTLB(pVCpu, CPUMGetGuestCR3(pVCpu), true /*fGlobal*/);
    18991899                    AssertRCReturn(rc, rc);
    19001900                    if (rcStrict == VINF_NEM_FLUSH_TLB)
  • trunk/src/VBox/VMM/VMMR3/PGM.cpp

    r92567 r92626  
    795795
    796796        pPGM->GCPhysCR3         = NIL_RTGCPHYS;
     797        pPGM->GCPhysNstGstCR3   = NIL_RTGCPHYS;
    797798
    798799        pPGM->pGst32BitPdR3     = NULL;
     
    17821783    }
    17831784    pVCpu->pgm.s.GCPhysCR3 = NIL_RTGCPHYS;
     1785    pVCpu->pgm.s.GCPhysNstGstCR3 = NIL_RTGCPHYS;
    17841786
    17851787    int rc = PGMHCChangeMode(pVM, pVCpu, PGMMODE_REAL);
     
    18341836        }
    18351837        pVCpu->pgm.s.GCPhysCR3 = NIL_RTGCPHYS;
     1838        pVCpu->pgm.s.GCPhysNstGstCR3 = NIL_RTGCPHYS;
    18361839    }
    18371840
  • trunk/src/VBox/VMM/VMMR3/PGMPhys.cpp

    r92565 r92626  
    56435643                    pPGM->pGstPaePdptR3    = NULL;
    56445644                    pPGM->pGstAmd64Pml4R3  = NULL;
     5645                    pPGM->pGstEptPml4R3    = NULL;
    56455646                    pPGM->pGst32BitPdR0    = NIL_RTR0PTR;
    56465647                    pPGM->pGstPaePdptR0    = NIL_RTR0PTR;
    56475648                    pPGM->pGstAmd64Pml4R0  = NIL_RTR0PTR;
     5649                    pPGM->pGstEptPml4R0    = NIL_RTR0PTR;
    56485650                    for (unsigned i = 0; i < RT_ELEMENTS(pPGM->apGstPaePDsR3); i++)
    56495651                    {
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