VirtualBox

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


Ignore:
Timestamp:
Nov 10, 2021 5:19:29 PM (3 years ago)
Author:
vboxsync
Message:

VMM: Nested VMX: bugref:10092 Eliminate fEffectiveRW, use the W bit from the PGMPTATTRS instead.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/PGMAllBth.h

    r92313 r92334  
    277277                && pCurType->enmKind != PGMPHYSHANDLERKIND_WRITE
    278278#   if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE)
    279                 && pGstWalk->Core.fEffectiveRW
     279                && (pGstWalk->Core.fEffective & PGM_PTATTRS_W_MASK)
    280280                && !pGstWalk->Core.fEffectiveUS /** @todo Remove pGstWalk->Core.fEffectiveUS and X86_PTE_US further down in the sync code. */
    281281#   endif
     
    437437    {
    438438        if (    (   (uErr & X86_TRAP_PF_RW)
    439                  && !GstWalk.Core.fEffectiveRW
     439                 && !(GstWalk.Core.fEffective & PGM_PTATTRS_W_MASK)
    440440                 && (   (uErr & X86_TRAP_PF_US)
    441441                     || CPUMIsGuestR0WriteProtEnabled(pVCpu)) )
     
    778778             * Check to see if we need to emulate the instruction if CR0.WP=0.
    779779             */
    780             if (    !GstWalk.Core.fEffectiveRW
     780            if (    !(GstWalk.Core.fEffective & PGM_PTATTRS_W_MASK)
    781781                &&  (CPUMGetGuestCR0(pVCpu) & (X86_CR0_WP | X86_CR0_PG)) == X86_CR0_PG
    782782                &&  CPUMGetGuestCPL(pVCpu) < 3)
     
    798798#    if (PGM_GST_TYPE == PGM_TYPE_32BIT || PGM_GST_TYPE == PGM_TYPE_PAE) && 1
    799799                if (   GstWalk.Core.fEffectiveUS
    800                     && !GstWalk.Core.fEffectiveRW
     800                    && !(GstWalk.Core.fEffective & PGM_PTATTRS_W_MASK)
    801801                    && (GstWalk.Core.fBigPage || (GstWalk.Pde.u & X86_PDE_RW))
    802802                    && pVM->cCpus == 1 /* Sorry, no go on SMP. Add CFGM option? */)
     
    881881         */
    882882        else if (    GstWalk.Core.fEffectiveUS
    883                  && !GstWalk.Core.fEffectiveRW
     883                 && !(GstWalk.Core.fEffective & PGM_PTATTRS_W_MASK)
    884884                 && (GstWalk.Core.fBigPage || (GstWalk.Pde.u & X86_PDE_RW))
    885885                 &&  pVCpu->pgm.s.cNetwareWp0Hacks > 0
  • trunk/src/VBox/VMM/VMMAll/PGMAllGst.h

    r92331 r92334  
    257257            Assert(fEffective & PGM_PTATTRS_R_MASK);
    258258
    259             pWalk->Core.fEffectiveRW = !!(fEffective & X86_PTE_RW);
    260259            pWalk->Core.fEffectiveUS = !!(fEffective & X86_PTE_US);
    261260            pWalk->Core.fBigPage     = true;
     
    320319        Assert(fEffective & PGM_PTATTRS_R_MASK);
    321320
    322         pWalk->Core.fEffectiveRW = !!(fEffective & X86_PTE_RW);
    323321        pWalk->Core.fEffectiveUS = !!(fEffective & X86_PTE_US);
    324322        pWalk->Core.fSucceeded   = true;
  • trunk/src/VBox/VMM/VMMAll/PGMAllGstSlatEpt.cpp.h

    r92333 r92334  
    153153            pWalk->Core.fEffective = fEffective;
    154154
    155             pWalk->Core.fEffectiveRW = !!fWrite;
    156155            pWalk->Core.fEffectiveUS = true;
    157156            pWalk->Core.fGigantPage  = true;
     
    191190            pWalk->Core.fEffective = fEffective;
    192191
    193             pWalk->Core.fEffectiveRW = !!fWrite;
    194192            pWalk->Core.fEffectiveUS = true;
    195193            pWalk->Core.fBigPage     = true;
     
    246244        pWalk->Core.fEffective = fEffective;
    247245
    248         pWalk->Core.fEffectiveRW = !!fWrite;
    249246        pWalk->Core.fEffectiveUS = true;
    250247        pWalk->Core.fSucceeded   = true;
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