VirtualBox

Changeset 45732 in vbox


Ignore:
Timestamp:
Apr 25, 2013 2:39:46 PM (12 years ago)
Author:
vboxsync
Message:

VMM/HMVMXR0: Don't trash CR2 for VM-exits caused due to a #PF delivery when not intercepting #PFs (i.e. Nested Paging).

File:
1 edited

Legend:

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

    r45722 r45732  
    46194619        /* See Intel spec. 30.7.1.1 "Reflecting Exceptions to Guest Software". */
    46204620        VMXREFLECTXCPT enmReflect     = VMXREFLECTXCPT_NONE;
    4621         RTGCUINTPTR GCPtrFaultAddress = 0;
    46224621        if (uIntType == VMX_IDT_VECTORING_INFO_TYPE_HW_XCPT)
    46234622        {
    46244623            enmReflect = VMXREFLECTXCPT_XCPT;
     4624#if 0
    46254625            if (   hmR0VmxIsContributoryXcpt(uIdtVector)
    46264626                && uExitVector == X86_XCPT_PF)
    46274627            {
    4628                 GCPtrFaultAddress = pMixedCtx->cr2;
    46294628                Log(("IDT: Contributory #PF uCR2=%#RGv\n", pMixedCtx->cr2));
    46304629            }
    4631             else if (   uExitVector == X86_XCPT_PF
    4632                      && uIdtVector == X86_XCPT_PF)
     4630            else
     4631#endif
     4632            if (   uExitVector == X86_XCPT_PF
     4633                && uIdtVector == X86_XCPT_PF)
    46334634            {
    46344635                pVmxTransient->fVectoringPF = true;
    4635                 GCPtrFaultAddress = pMixedCtx->cr2;
    46364636                Log(("IDT: Vectoring #PF uCR2=%#RGv\n", pMixedCtx->cr2));
    46374637            }
     
    46684668                    u32ErrCode = pVmxTransient->uIdtVectoringErrorCode;
    46694669                }
     4670
     4671                /* If uExitVector is #PF, CR2 value will be updated from the VMCS if it's a guest #PF. See hmR0VmxExitXcptPF(). */
    46704672                hmR0VmxSetPendingEvent(pVCpu, VMX_ENTRY_INTR_INFO_FROM_EXIT_IDT_INFO(pVmxTransient->uIdtVectoringInfo),
    4671                                        0 /* cbInstr */,  u32ErrCode, GCPtrFaultAddress);
     4673                                       0 /* cbInstr */,  u32ErrCode, pMixedCtx->cr2);
    46724674                rc = VINF_SUCCESS;
    46734675                Log(("IDT: Pending vectoring event %#RX64 Err=%#RX32\n", pVCpu->hm.s.Event.u64IntrInfo, pVCpu->hm.s.Event.u32ErrCode));
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