VirtualBox

Changeset 48570 in vbox for trunk/src/VBox/VMM/VMMR0


Ignore:
Timestamp:
Sep 19, 2013 11:41:35 PM (11 years ago)
Author:
vboxsync
Message:

VMM/HMVMXR0, HMSVMR0: Restore hyper/guest DR7 in accordance with what we load.

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

Legend:

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

    r48565 r48570  
    14291429            pVmcb->guest.u64DR6 = X86_DR6_INIT_VAL;
    14301430            pVmcb->ctrl.u64VmcbCleanBits &= ~HMSVM_VMCB_CLEAN_DRX;
     1431            pVCpu->hm.s.fUsingHyperDR7 = true;
    14311432        }
    14321433
     
    14481449            pVmcb->guest.u64DR6 = pCtx->dr[6];
    14491450            pVmcb->ctrl.u64VmcbCleanBits &= ~HMSVM_VMCB_CLEAN_DRX;
     1451            pVCpu->hm.s.fUsingHyperDR7 = false;
    14501452        }
    14511453
     
    19321934     * Guest Debug registers.
    19331935     */
    1934     /** @todo We need to save DR6, DR7 according to what we did in
    1935      *        hmR0SvmLoadSharedDebugState(). */
    1936     if (!CPUMIsHyperDebugStateActive(pVCpu))
     1936    if (!pVCpu->hm.s.fUsingHyperDR7)
    19371937    {
    19381938        pMixedCtx->dr[6] = pVmcb->guest.u64DR6;
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r48565 r48570  
    34363436        AssertRCReturn(rc, rc);
    34373437
     3438        pVCpu->hm.s.fUsingHyperDR7 = true;
    34383439        fInterceptDB = true;
    34393440        fInterceptMovDRx = true;
     
    34823483        }
    34833484
     3485        /* Update guest DR7. */
    34843486        rc = VMXWriteVmcs32(VMX_VMCS_GUEST_DR7, pMixedCtx->dr[7]);
    34853487        AssertRCReturn(rc, rc);
     3488
     3489        pVCpu->hm.s.fUsingHyperDR7 = false;
    34863490    }
    34873491
     
    57895793    if (!(pVCpu->hm.s.vmx.fUpdatedGuestState & HMVMX_UPDATED_GUEST_DEBUG))
    57905794    {
    5791         /** @todo We need to update DR7 according to what was done in hmR0VmxLoadSharedDebugState(). */
    5792         if (!CPUMIsHyperDebugStateActive(pVCpu))
     5795        if (!pVCpu->hm.s.fUsingHyperDR7)
    57935796        {
    57945797            /* Upper 32-bits are always zero. See Intel spec. 2.7.3 "Loading and Storing Debug Registers". */
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