VirtualBox

Changeset 72811 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Jul 3, 2018 8:01:59 AM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
123354
Message:

VMM/HMVMXR0: Camel-case fixes to parts of VT-x code to try match naming style (eg with 'u64Cr0Fixed1', 'fClearCr0Mask').

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r72810 r72811  
    36633663        PVM pVM = pVCpu->CTX_SUFF(pVM);
    36643664        Assert(!RT_HI_U32(pMixedCtx->cr0));
    3665         uint32_t const uShadowCR0 = pMixedCtx->cr0;
    3666         uint32_t       uGuestCR0  = pMixedCtx->cr0;
     3665        uint32_t const u32ShadowCr0 = pMixedCtx->cr0;
     3666        uint32_t       u32GuestCr0  = pMixedCtx->cr0;
    36673667
    36683668        /*
     
    36933693        {
    36943694            /* Guest CPL 0 writes to its read-only pages should cause a #PF VM-exit. */
    3695             uGuestCR0 |= X86_CR0_WP;
     3695            u32GuestCr0 |= X86_CR0_WP;
    36963696        }
    36973697
     
    37053705         * set on the first CPUs to support VT-x and no mention of with regards to UX in VM-entry checks.
    37063706         */
    3707         uGuestCR0 |= X86_CR0_NE;
     3707        u32GuestCr0 |= X86_CR0_NE;
    37083708
    37093709        /* If CR0.NE isn't set, we need to intercept #MF exceptions and report them to the guest differently. */
    3710         bool const fInterceptMF = !(uShadowCR0 & X86_CR0_NE);
     3710        bool const fInterceptMF = !(u32ShadowCr0 & X86_CR0_NE);
    37113711
    37123712        /*
     
    37553755         * Set/clear the CR0 specific bits along with their exceptions (PE, PG, CD, NW).
    37563756         */
    3757         uint32_t fSetCR0 = (uint32_t)(pVM->hm.s.vmx.Msrs.u64Cr0Fixed0 & pVM->hm.s.vmx.Msrs.u64Cr0Fixed1);
    3758         uint32_t fZapCR0 = (uint32_t)(pVM->hm.s.vmx.Msrs.u64Cr0Fixed0 | pVM->hm.s.vmx.Msrs.u64Cr0Fixed1);
     3757        uint32_t fSetCr0 = (uint32_t)(pVM->hm.s.vmx.Msrs.u64Cr0Fixed0 & pVM->hm.s.vmx.Msrs.u64Cr0Fixed1);
     3758        uint32_t fZapCr0 = (uint32_t)(pVM->hm.s.vmx.Msrs.u64Cr0Fixed0 | pVM->hm.s.vmx.Msrs.u64Cr0Fixed1);
    37593759        if (pVM->hm.s.vmx.fUnrestrictedGuest)             /* Exceptions for unrestricted-guests for fixed CR0 bits (PE, PG). */
    3760             fSetCR0 &= ~(X86_CR0_PE | X86_CR0_PG);
     3760            fSetCr0 &= ~(X86_CR0_PE | X86_CR0_PG);
    37613761        else
    3762             Assert((fSetCR0 & (X86_CR0_PE | X86_CR0_PG)) == (X86_CR0_PE | X86_CR0_PG));
    3763 
    3764         uGuestCR0 |= fSetCR0;
    3765         uGuestCR0 &= fZapCR0;
    3766         uGuestCR0 &= ~(X86_CR0_CD | X86_CR0_NW);          /* Always enable caching. */
     3762            Assert((fSetCr0 & (X86_CR0_PE | X86_CR0_PG)) == (X86_CR0_PE | X86_CR0_PG));
     3763
     3764        u32GuestCr0 |= fSetCr0;
     3765        u32GuestCr0 &= fZapCr0;
     3766        u32GuestCr0 &= ~(X86_CR0_CD | X86_CR0_NW);        /* Always enable caching. */
    37673767
    37683768        /*
     
    37713771         * we want to be notified immediately of guest CR0 changes (e.g. PG to update our shadow page tables).
    37723772         */
    3773         uint32_t uCR0Mask = X86_CR0_PE
    3774                           | X86_CR0_NE
    3775                           | (pVM->hm.s.fNestedPaging ? 0 : X86_CR0_WP)
    3776                           | X86_CR0_PG
    3777                           | X86_CR0_ET    /* Bit ignored on VM-entry and VM-exit. Don't let the guest modify the host CR0.ET */
    3778                           | X86_CR0_CD    /* Bit ignored on VM-entry and VM-exit. Don't let the guest modify the host CR0.CD */
    3779                           | X86_CR0_NW;   /* Bit ignored on VM-entry and VM-exit. Don't let the guest modify the host CR0.NW */
     3773        uint32_t u32Cr0Mask = X86_CR0_PE
     3774                            | X86_CR0_NE
     3775                            | (pVM->hm.s.fNestedPaging ? 0 : X86_CR0_WP)
     3776                            | X86_CR0_PG
     3777                            | X86_CR0_ET   /* Bit ignored on VM-entry and VM-exit. Don't let the guest modify the host CR0.ET */
     3778                            | X86_CR0_CD   /* Bit ignored on VM-entry and VM-exit. Don't let the guest modify the host CR0.CD */
     3779                            | X86_CR0_NW;  /* Bit ignored on VM-entry and VM-exit. Don't let the guest modify the host CR0.NW */
    37803780
    37813781        /** @todo Avoid intercepting CR0.PE with unrestricted guests. Fix PGM
     
    37843784#if 0
    37853785        if (pVM->hm.s.vmx.fUnrestrictedGuest)
    3786             uCr0Mask &= ~X86_CR0_PE;
     3786            u32Cr0Mask &= ~X86_CR0_PE;
    37873787#endif
    37883788        /*
    37893789         * Finally, update VMCS fields with the CR0 values.
    37903790         */
    3791         int rc = VMXWriteVmcs32(VMX_VMCS_GUEST_CR0, uGuestCR0);
    3792         rc    |= VMXWriteVmcs32(VMX_VMCS_CTRL_CR0_READ_SHADOW, uShadowCR0);
    3793         if (uCR0Mask != pVCpu->hm.s.vmx.u32CR0Mask)
    3794             rc |= VMXWriteVmcs32(VMX_VMCS_CTRL_CR0_MASK, uCR0Mask);
     3791        int rc = VMXWriteVmcs32(VMX_VMCS_GUEST_CR0, u32GuestCr0);
     3792        rc    |= VMXWriteVmcs32(VMX_VMCS_CTRL_CR0_READ_SHADOW, u32ShadowCr0);
     3793        if (u32Cr0Mask != pVCpu->hm.s.vmx.u32Cr0Mask)
     3794            rc |= VMXWriteVmcs32(VMX_VMCS_CTRL_CR0_MASK, u32Cr0Mask);
    37953795        if (uProcCtls != pVCpu->hm.s.vmx.u32ProcCtls)
    37963796            rc |= VMXWriteVmcs32(VMX_VMCS32_CTRL_PROC_EXEC, uProcCtls);
     
    37983798
    37993799        /* Update our caches. */
    3800         pVCpu->hm.s.vmx.u32CR0Mask  = uCR0Mask;
     3800        pVCpu->hm.s.vmx.u32Cr0Mask  = u32Cr0Mask;
    38013801        pVCpu->hm.s.vmx.u32ProcCtls = uProcCtls;
    38023802
    38033803        ASMAtomicUoAndU64(&pVCpu->hm.s.fCtxChanged, ~HM_CHANGED_GUEST_CR0);
    38043804
    3805         Log4Func(("uCr0Mask=%#RX32 uShadowCR0=%#RX32 uGuestCR0=%#RX32 (fSetCR0=%#RX32 fZapCR0=%#RX32\n", uCR0Mask, uShadowCR0,
    3806                   uGuestCR0, fSetCR0, fZapCR0));
     3805        Log4Func(("u32Cr0Mask=%#RX32 u32ShadowCr0=%#RX32 u32GuestCr0=%#RX32 (fSetCr0=%#RX32 fZapCr0=%#RX32\n", u32Cr0Mask,
     3806                  u32ShadowCr0, u32GuestCr0, fSetCr0, fZapCr0));
    38073807    }
    38083808
     
    39153915            }
    39163916
    3917             Log4Func(("uGuestCR3=%#RGp (GstN)\n", GCPhysGuestCR3));
     3917            Log4Func(("u32GuestCr3=%#RGp (GstN)\n", GCPhysGuestCR3));
    39183918            rc = VMXWriteVmcsGstN(VMX_VMCS_GUEST_CR3, GCPhysGuestCR3);
    39193919            AssertRCReturn(rc, rc);
     
    39243924            RTHCPHYS HCPhysGuestCR3 = PGMGetHyperCR3(pVCpu);
    39253925
    3926             Log4Func(("uGuestCR3=%#RHv (HstN)\n", HCPhysGuestCR3));
     3926            Log4Func(("u32GuestCr3=%#RHv (HstN)\n", HCPhysGuestCR3));
    39273927            rc = VMXWriteVmcsHstN(VMX_VMCS_GUEST_CR3, HCPhysGuestCR3);
    39283928            AssertRCReturn(rc, rc);
     
    39393939    {
    39403940        Assert(!RT_HI_U32(pMixedCtx->cr4));
    3941         uint32_t       uGuestCR4  = pMixedCtx->cr4;
    3942         uint32_t const uShadowCR4 = pMixedCtx->cr4;
     3941        uint32_t       u32GuestCr4  = pMixedCtx->cr4;
     3942        uint32_t const u32ShadowCr4 = pMixedCtx->cr4;
    39433943
    39443944        /*
     
    39553955            Assert(pVM->hm.s.vmx.pRealModeTSS);
    39563956            Assert(PDMVmmDevHeapIsEnabled(pVM));
    3957             uGuestCR4 &= ~X86_CR4_VME;
     3957            u32GuestCr4 &= ~X86_CR4_VME;
    39583958        }
    39593959
     
    39643964            {
    39653965                /* We use 4 MB pages in our identity mapping page table when the guest doesn't have paging. */
    3966                 uGuestCR4 |= X86_CR4_PSE;
     3966                u32GuestCr4 |= X86_CR4_PSE;
    39673967                /* Our identity mapping is a 32-bit page directory. */
    3968                 uGuestCR4 &= ~X86_CR4_PAE;
     3968                u32GuestCr4 &= ~X86_CR4_PAE;
    39693969            }
    39703970            /* else use guest CR4.*/
     
    39823982                case PGMMODE_32_BIT:            /* 32-bit paging. */
    39833983                {
    3984                     uGuestCR4 &= ~X86_CR4_PAE;
     3984                    u32GuestCr4 &= ~X86_CR4_PAE;
    39853985                    break;
    39863986                }
     
    39893989                case PGMMODE_PAE_NX:            /* PAE paging with NX. */
    39903990                {
    3991                     uGuestCR4 |= X86_CR4_PAE;
     3991                    u32GuestCr4 |= X86_CR4_PAE;
    39923992                    break;
    39933993                }
     
    40054005
    40064006        /* We need to set and clear the CR4 specific bits here (mainly the X86_CR4_VMXE bit). */
    4007         uint64_t const fSetCR4 = (pVM->hm.s.vmx.Msrs.u64Cr4Fixed0 & pVM->hm.s.vmx.Msrs.u64Cr4Fixed1);
    4008         uint64_t const fZapCR4 = (pVM->hm.s.vmx.Msrs.u64Cr4Fixed0 | pVM->hm.s.vmx.Msrs.u64Cr4Fixed1);
    4009         uGuestCR4 |= fSetCR4;
    4010         uGuestCR4 &= fZapCR4;
     4007        uint64_t const fSetCr4 = (pVM->hm.s.vmx.Msrs.u64Cr4Fixed0 & pVM->hm.s.vmx.Msrs.u64Cr4Fixed1);
     4008        uint64_t const fZapCr4 = (pVM->hm.s.vmx.Msrs.u64Cr4Fixed0 | pVM->hm.s.vmx.Msrs.u64Cr4Fixed1);
     4009        u32GuestCr4 |= fSetCr4;
     4010        u32GuestCr4 &= fZapCr4;
    40114011
    40124012        /* Setup CR4 mask. CR4 flags owned by the host, if the guest attempts to change them,
    40134013           that would cause a VM-exit. */
    4014         uint32_t u32CR4Mask = X86_CR4_VME
     4014        uint32_t u32Cr4Mask = X86_CR4_VME
    40154015                            | X86_CR4_PAE
    40164016                            | X86_CR4_PGE
     
    40184018                            | X86_CR4_VMXE;
    40194019        if (pVM->cpum.ro.HostFeatures.fXSaveRstor)
    4020             u32CR4Mask |= X86_CR4_OSXSAVE;
     4020            u32Cr4Mask |= X86_CR4_OSXSAVE;
    40214021        if (pVM->cpum.ro.GuestFeatures.fPcid)
    4022             u32CR4Mask |= X86_CR4_PCIDE;
     4022            u32Cr4Mask |= X86_CR4_PCIDE;
    40234023
    40244024        /* Write VT-x's view of the guest CR4, the CR4 modify mask and the read-only CR4 shadow
    40254025           into the VMCS and update our cache. */
    4026         rc  = VMXWriteVmcs32(VMX_VMCS_GUEST_CR4, uGuestCR4);
    4027         rc |= VMXWriteVmcs32(VMX_VMCS_CTRL_CR4_READ_SHADOW, uShadowCR4);
    4028         if (pVCpu->hm.s.vmx.u32CR4Mask != u32CR4Mask)
    4029             rc |= VMXWriteVmcs32(VMX_VMCS_CTRL_CR4_MASK, u32CR4Mask);
     4026        rc  = VMXWriteVmcs32(VMX_VMCS_GUEST_CR4, u32GuestCr4);
     4027        rc |= VMXWriteVmcs32(VMX_VMCS_CTRL_CR4_READ_SHADOW, u32ShadowCr4);
     4028        if (pVCpu->hm.s.vmx.u32Cr4Mask != u32Cr4Mask)
     4029            rc |= VMXWriteVmcs32(VMX_VMCS_CTRL_CR4_MASK, u32Cr4Mask);
    40304030        AssertRCReturn(rc, rc);
    4031         pVCpu->hm.s.vmx.u32CR4Mask = u32CR4Mask;
     4031        pVCpu->hm.s.vmx.u32Cr4Mask = u32Cr4Mask;
    40324032
    40334033        /* Whether to save/load/restore XCR0 during world switch depends on CR4.OSXSAVE and host+guest XCR0. */
     
    40364036        ASMAtomicUoAndU64(&pVCpu->hm.s.fCtxChanged, ~HM_CHANGED_GUEST_CR4);
    40374037
    4038         Log4Func(("uGuestCR4=%#RX32 uShadowCR4=%#RX32 (fSetCR4=%#RX32 fZapCR4=%#RX32)\n", uGuestCR4, uShadowCR4, fSetCR4,
    4039                   fZapCR4));
     4038        Log4Func(("u32GuestCr4=%#RX32 u32ShadowCr4=%#RX32 (fSetCr4=%#RX32 fZapCr4=%#RX32)\n", u32GuestCr4, u32ShadowCr4, fSetCr4,
     4039                  fZapCr4));
    40404040    }
    40414041    return rc;
     
    40924092    }
    40934093
    4094     uint32_t uGuestDR7;
     4094    uint32_t u32GuestDr7;
    40954095    if (   fSteppingDB
    40964096        || (CPUMGetHyperDR7(pVCpu) & X86_DR7_ENABLED_MASK))
     
    41214121
    41224122        /* Update DR7 with the hypervisor value (other DRx registers are handled by CPUM one way or another). */
    4123         uGuestDR7 = (uint32_t)CPUMGetHyperDR7(pVCpu);
     4123        u32GuestDr7 = (uint32_t)CPUMGetHyperDR7(pVCpu);
    41244124        pVCpu->hm.s.fUsingHyperDR7 = true;
    41254125        fInterceptMovDRx = true;
     
    41704170
    41714171        /* Update DR7 with the actual guest value. */
    4172         uGuestDR7 = pMixedCtx->dr[7];
     4172        u32GuestDr7 = pMixedCtx->dr[7];
    41734173        pVCpu->hm.s.fUsingHyperDR7 = false;
    41744174    }
     
    41934193     * Update guest DR7.
    41944194     */
    4195     int rc = VMXWriteVmcs32(VMX_VMCS_GUEST_DR7, uGuestDR7);
     4195    int rc = VMXWriteVmcs32(VMX_VMCS_GUEST_DR7, u32GuestDr7);
    41964196    AssertRCReturn(rc, rc);
    41974197
     
    63996399                    rc |= VMXReadVmcs32(VMX_VMCS_CTRL_CR0_READ_SHADOW, &u32Shadow);
    64006400                    VMXLOCAL_BREAK_RC(rc);
    6401                     u32Val = (u32Val & ~pVCpu->hm.s.vmx.u32CR0Mask)
    6402                            | (u32Shadow & pVCpu->hm.s.vmx.u32CR0Mask);
     6401                    u32Val = (u32Val & ~pVCpu->hm.s.vmx.u32Cr0Mask)
     6402                           | (u32Shadow & pVCpu->hm.s.vmx.u32Cr0Mask);
    64036403                    VMMRZCallRing3Disable(pVCpu);   /* Calls into PGM which has Log statements. */
    64046404                    CPUMSetGuestCR0(pVCpu, u32Val);
     
    64116411                    rc |= VMXReadVmcs32(VMX_VMCS_CTRL_CR4_READ_SHADOW, &u32Shadow);
    64126412                    VMXLOCAL_BREAK_RC(rc);
    6413                     u32Val = (u32Val & ~pVCpu->hm.s.vmx.u32CR4Mask)
    6414                            | (u32Shadow & pVCpu->hm.s.vmx.u32CR4Mask);
     6413                    u32Val = (u32Val & ~pVCpu->hm.s.vmx.u32Cr4Mask)
     6414                           | (u32Shadow & pVCpu->hm.s.vmx.u32Cr4Mask);
    64156415                    CPUMSetGuestCR4(pVCpu, u32Val);
    64166416                }
     
    88918891    }
    88928892
    8893     if (pDbgState->fClearCr0Mask && pVCpu->hm.s.vmx.u32CR0Mask != 0)
    8894     {
    8895         pVCpu->hm.s.vmx.u32CR0Mask = 0;
     8893    if (pDbgState->fClearCr0Mask && pVCpu->hm.s.vmx.u32Cr0Mask != 0)
     8894    {
     8895        pVCpu->hm.s.vmx.u32Cr0Mask = 0;
    88968896        VMXWriteVmcs32(VMX_VMCS_CTRL_CR0_MASK, 0);
    88978897        Log6(("hmR0VmxRunDebugStateRevert: VMX_VMCS_CTRL_CR0_MASK: 0\n"));
    88988898    }
    88998899
    8900     if (pDbgState->fClearCr4Mask && pVCpu->hm.s.vmx.u32CR4Mask != 0)
    8901     {
    8902         pVCpu->hm.s.vmx.u32CR4Mask = 0;
     8900    if (pDbgState->fClearCr4Mask && pVCpu->hm.s.vmx.u32Cr4Mask != 0)
     8901    {
     8902        pVCpu->hm.s.vmx.u32Cr4Mask = 0;
    89038903        VMXWriteVmcs32(VMX_VMCS_CTRL_CR4_MASK, 0);
    89048904        Log6(("hmR0VmxRunDebugStateRevert: VMX_VMCS_CTRL_CR4_MASK: 0\n"));
     
    1033410334         * CR0.
    1033510335         */
    10336         uint32_t       fSetCR0 = (uint32_t)(pVM->hm.s.vmx.Msrs.u64Cr0Fixed0 & pVM->hm.s.vmx.Msrs.u64Cr0Fixed1);
    10337         uint32_t const fZapCR0 = (uint32_t)(pVM->hm.s.vmx.Msrs.u64Cr0Fixed0 | pVM->hm.s.vmx.Msrs.u64Cr0Fixed1);
     10336        uint32_t       fSetCr0 = (uint32_t)(pVM->hm.s.vmx.Msrs.u64Cr0Fixed0 & pVM->hm.s.vmx.Msrs.u64Cr0Fixed1);
     10337        uint32_t const fZapCr0 = (uint32_t)(pVM->hm.s.vmx.Msrs.u64Cr0Fixed0 | pVM->hm.s.vmx.Msrs.u64Cr0Fixed1);
    1033810338        /* Exceptions for unrestricted-guests for fixed CR0 bits (PE, PG).
    1033910339           See Intel spec. 26.3.1 "Checks on Guest Control Registers, Debug Registers and MSRs." */
    1034010340        if (fUnrestrictedGuest)
    10341             fSetCR0 &= ~(X86_CR0_PE | X86_CR0_PG);
    10342 
    10343         uint32_t uGuestCR0;
    10344         rc = VMXReadVmcs32(VMX_VMCS_GUEST_CR0, &uGuestCR0);
     10341            fSetCr0 &= ~(X86_CR0_PE | X86_CR0_PG);
     10342
     10343        uint32_t u32GuestCr0;
     10344        rc = VMXReadVmcs32(VMX_VMCS_GUEST_CR0, &u32GuestCr0);
    1034510345        AssertRCBreak(rc);
    10346         HMVMX_CHECK_BREAK((uGuestCR0 & fSetCR0) == fSetCR0, VMX_IGS_CR0_FIXED1);
    10347         HMVMX_CHECK_BREAK(!(uGuestCR0 & ~fZapCR0), VMX_IGS_CR0_FIXED0);
     10346        HMVMX_CHECK_BREAK((u32GuestCr0 & fSetCr0) == fSetCr0, VMX_IGS_CR0_FIXED1);
     10347        HMVMX_CHECK_BREAK(!(u32GuestCr0 & ~fZapCr0), VMX_IGS_CR0_FIXED0);
    1034810348        if (   !fUnrestrictedGuest
    10349             &&  (uGuestCR0 & X86_CR0_PG)
    10350             && !(uGuestCR0 & X86_CR0_PE))
     10349            &&  (u32GuestCr0 & X86_CR0_PG)
     10350            && !(u32GuestCr0 & X86_CR0_PE))
    1035110351        {
    1035210352            HMVMX_ERROR_BREAK(VMX_IGS_CR0_PG_PE_COMBO);
     
    1035610356         * CR4.
    1035710357         */
    10358         uint64_t const fSetCR4 = (pVM->hm.s.vmx.Msrs.u64Cr4Fixed0 & pVM->hm.s.vmx.Msrs.u64Cr4Fixed1);
    10359         uint64_t const fZapCR4 = (pVM->hm.s.vmx.Msrs.u64Cr4Fixed0 | pVM->hm.s.vmx.Msrs.u64Cr4Fixed1);
    10360 
    10361         uint32_t uGuestCR4;
    10362         rc = VMXReadVmcs32(VMX_VMCS_GUEST_CR4, &uGuestCR4);
     10358        uint64_t const fSetCr4 = (pVM->hm.s.vmx.Msrs.u64Cr4Fixed0 & pVM->hm.s.vmx.Msrs.u64Cr4Fixed1);
     10359        uint64_t const fZapCr4 = (pVM->hm.s.vmx.Msrs.u64Cr4Fixed0 | pVM->hm.s.vmx.Msrs.u64Cr4Fixed1);
     10360
     10361        uint32_t u32GuestCr4;
     10362        rc = VMXReadVmcs32(VMX_VMCS_GUEST_CR4, &u32GuestCr4);
    1036310363        AssertRCBreak(rc);
    10364         HMVMX_CHECK_BREAK((uGuestCR4 & fSetCR4) == fSetCR4, VMX_IGS_CR4_FIXED1);
    10365         HMVMX_CHECK_BREAK(!(uGuestCR4 & ~fZapCR4), VMX_IGS_CR4_FIXED0);
     10364        HMVMX_CHECK_BREAK((u32GuestCr4 & fSetCr4) == fSetCr4, VMX_IGS_CR4_FIXED1);
     10365        HMVMX_CHECK_BREAK(!(u32GuestCr4 & ~fZapCr4), VMX_IGS_CR4_FIXED0);
    1036610366
    1036710367        /*
     
    1041910419        if (   fLongModeGuest
    1042010420            || (   fUnrestrictedGuest
    10421                 && !(uGuestCR0 & X86_CR0_PE)))
     10421                && !(u32GuestCr0 & X86_CR0_PE)))
    1042210422        {
    1042310423            HMVMX_CHECK_BREAK(!(u32Eflags & X86_EFL_VM), VMX_IGS_RFLAGS_VM_INVALID);
     
    1043910439        if (fLongModeGuest)
    1044010440        {
    10441             HMVMX_CHECK_BREAK(uGuestCR0 & X86_CR0_PG, VMX_IGS_CR0_PG_LONGMODE);
    10442             HMVMX_CHECK_BREAK(uGuestCR4 & X86_CR4_PAE, VMX_IGS_CR4_PAE_LONGMODE);
     10441            HMVMX_CHECK_BREAK(u32GuestCr0 & X86_CR0_PG, VMX_IGS_CR0_PG_LONGMODE);
     10442            HMVMX_CHECK_BREAK(u32GuestCr4 & X86_CR4_PAE, VMX_IGS_CR4_PAE_LONGMODE);
    1044310443        }
    1044410444
    1044510445        if (   !fLongModeGuest
    10446             && (uGuestCR4 & X86_CR4_PCIDE))
     10446            && (u32GuestCr4 & X86_CR4_PCIDE))
    1044710447        {
    1044810448            HMVMX_ERROR_BREAK(VMX_IGS_CR4_PCIDE);
     
    1051610516                              VMX_IGS_EFER_LMA_GUEST_MODE_MISMATCH);
    1051710517            HMVMX_CHECK_BREAK(   fUnrestrictedGuest
    10518                               || !(uGuestCR0 & X86_CR0_PG)
     10518                              || !(u32GuestCr0 & X86_CR0_PG)
    1051910519                              || RT_BOOL(u64Val & MSR_K6_EFER_LMA) == RT_BOOL(u64Val & MSR_K6_EFER_LME),
    1052010520                              VMX_IGS_EFER_LMA_LME_MISMATCH);
  • trunk/src/VBox/VMM/VMMR3/HM.cpp

    r72805 r72811  
    20232023    pVCpu->hm.s.fCtxChanged |= HM_CHANGED_HOST_CONTEXT | HM_CHANGED_ALL_GUEST;
    20242024
    2025     pVCpu->hm.s.vmx.u32CR0Mask        = 0;
    2026     pVCpu->hm.s.vmx.u32CR4Mask        = 0;
     2025    pVCpu->hm.s.vmx.u32Cr0Mask        = 0;
     2026    pVCpu->hm.s.vmx.u32Cr4Mask        = 0;
    20272027    pVCpu->hm.s.fActive               = false;
    20282028    pVCpu->hm.s.Event.fPending        = false;
  • trunk/src/VBox/VMM/include/HMInternal.h

    r72810 r72811  
    744744
    745745        /** Current CR0 mask. */
    746         uint32_t                    u32CR0Mask;
     746        uint32_t                    u32Cr0Mask;
    747747        /** Current CR4 mask. */
    748         uint32_t                    u32CR4Mask;
     748        uint32_t                    u32Cr4Mask;
    749749        /** Current exception bitmap. */
    750750        uint32_t                    u32XcptBitmap;
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