VirtualBox

Changeset 93582 in vbox for trunk


Ignore:
Timestamp:
Feb 3, 2022 2:15:58 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
149718
Message:

VMM/{VMXAllTemplate.cpp.h,NEMR3Native-darwin.cpp}: Temporarily intercept all CR3 accesses to investigate an issue with 32bit guests where we seem to end up with an invalid page table root address under certain circumstances, bugref:9044

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

Legend:

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

    r93199 r93582  
    20862086            if (VM_IS_VMX_NESTED_PAGING(pVM))
    20872087            {
     2088#ifndef HMVMX_ALAWAYS_INTERCEPT_CR3_ACCESS
    20882089                if (CPUMIsGuestPagingEnabled(pVCpu))
    20892090                {
     
    21022103                if (VM_IS_VMX_UNRESTRICTED_GUEST(pVM))
    21032104                    uProcCtls &= ~VMX_PROC_CTLS_CR3_STORE_EXIT;
     2105#endif
    21042106            }
    21052107            else
     
    80228024             *   - We are executing in the VM debug loop.
    80238025             */
    8024 #ifndef IN_NEM_DARWIN
     8026#ifndef HMVMX_ALAWAYS_INTERCEPT_CR3_ACCESS
     8027# ifndef IN_NEM_DARWIN
    80258028            Assert(   iCrReg != 3
    80268029                   || !VM_IS_VMX_NESTED_PAGING(pVM)
    80278030                   || !CPUMIsGuestPagingEnabledEx(&pVCpu->cpum.GstCtx)
    80288031                   || pVCpu->hmr0.s.fUsingDebugLoop);
    8029 #else
     8032# else
    80308033            Assert(   iCrReg != 3
    80318034                   || !CPUMIsGuestPagingEnabledEx(&pVCpu->cpum.GstCtx));
     8035# endif
    80328036#endif
    80338037
     
    80828086             *   - We are executing in the VM debug loop.
    80838087             */
    8084 #ifndef IN_NEM_DARWIN
     8088#ifndef HMVMX_ALAWAYS_INTERCEPT_CR3_ACCESS
     8089# ifndef IN_NEM_DARWIN
    80858090            Assert(   iCrReg != 3
    80868091                   || !VM_IS_VMX_NESTED_PAGING(pVM)
    80878092                   || !CPUMIsGuestPagingEnabledEx(&pVCpu->cpum.GstCtx)
    80888093                   || pVCpu->hmr0.s.fLeaveDone);
    8089 #else
     8094# else
    80908095            Assert(   iCrReg != 3
    80918096                   || !CPUMIsGuestPagingEnabledEx(&pVCpu->cpum.GstCtx));
     8097# endif
    80928098#endif
    80938099
  • trunk/src/VBox/VMM/VMMR3/NEMR3Native-darwin.cpp

    r93457 r93582  
    13271327//#define HMVMX_ALWAYS_TRAP_ALL_XCPTS
    13281328//#define HMVMX_ALWAYS_SYNC_FULL_GUEST_STATE
     1329#define HMVMX_ALAWAYS_INTERCEPT_CR3_ACCESS /* Temporary to investigate an issue with 32bit guests whete seem to end up with an invalid page table root address. */
    13291330#define VCPU_2_VMXSTATE(a_pVCpu)            (a_pVCpu)->nem.s
    13301331#define VCPU_2_VMXSTATS(a_pVCpu)            (*(a_pVCpu)->nem.s.pVmxStats)
     
    21902191         |  VMX_PROC_CTLS_MWAIT_EXIT;                                 /* MWAIT causes a VM-exit. */
    21912192
     2193#ifdef HMVMX_ALAWAYS_INTERCEPT_CR3_ACCESS
     2194    fVal |= VMX_PROC_CTLS_CR3_LOAD_EXIT
     2195         |  VMX_PROC_CTLS_CR3_STORE_EXIT;
     2196#endif
     2197
    21922198    /* We toggle VMX_PROC_CTLS_MOV_DR_EXIT later, check if it's not -always- needed to be set or clear. */
    21932199    if (   !(g_HmMsrs.u.vmx.ProcCtls.n.allowed1 & VMX_PROC_CTLS_MOV_DR_EXIT)
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