VirtualBox

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


Ignore:
Timestamp:
Feb 4, 2015 4:40:35 PM (10 years ago)
Author:
vboxsync
Message:

VMM/HMVMXR0: Fixed unintentional losing #DB intercepts while loading guest CR0.
Also removed #MF from the real-on-v86 mode exception mask, as it too like #NM is handled separately.
Improved some comments.

File:
1 edited

Legend:

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

    r54065 r54075  
    148148 * Exception bitmap mask for real-mode guests (real-on-v86).
    149149 *
    150  * We need to intercept all exceptions manually (except #PF). #NM is also
    151  * handled separately, see hmR0VmxLoadSharedCR0(). #PF need not be intercepted
    152  * even in real-mode if we have Nested Paging support.
     150 * We need to intercept all exceptions manually except:
     151 * - #NM, #MF handled separately, see hmR0VmxLoadSharedCR0().
     152 * - #PF need not be intercepted even in real-mode if we have Nested Paging
     153 * support.
    153154 */
    154155#define HMVMX_REAL_MODE_XCPT_MASK    (  RT_BIT(X86_XCPT_DE)             | RT_BIT(X86_XCPT_DB)    | RT_BIT(X86_XCPT_NMI)   \
     
    157158                                      | RT_BIT(X86_XCPT_CO_SEG_OVERRUN) | RT_BIT(X86_XCPT_TS)    | RT_BIT(X86_XCPT_NP)    \
    158159                                      | RT_BIT(X86_XCPT_SS)             | RT_BIT(X86_XCPT_GP)   /* RT_BIT(X86_XCPT_PF) */ \
    159                                       | RT_BIT(X86_XCPT_MF)             | RT_BIT(X86_XCPT_AC)    | RT_BIT(X86_XCPT_MC)    \
     160                                     /* RT_BIT(X86_XCPT_MF) */          | RT_BIT(X86_XCPT_AC)    | RT_BIT(X86_XCPT_MC)    \
    160161                                      | RT_BIT(X86_XCPT_XF))
    161162
     
    26212622
    26222623/**
    2623  * Sets up the initial exception bitmap in the VMCS based on static conditions
    2624  * (i.e. conditions that cannot ever change after starting the VM).
     2624 * Sets up the initial exception bitmap in the VMCS based on static conditions.
    26252625 *
    26262626 * @returns VBox status code.
     
    37733773            fInterceptMF = true;
    37743774        }
    3775         else
    3776             pVCpu->hm.s.vmx.u32XcptBitmap &= ~HMVMX_REAL_MODE_XCPT_MASK;
    37773775
    37783776        if (fInterceptNM)
     
    82148212
    82158213/**
    8216  * Loads the guest state into the VMCS guest-state area. The CPU state will be
    8217  * loaded from these fields on every successful VM-entry.
    8218  *
    8219  * Sets up the VM-entry MSR-load and VM-exit MSR-store areas.
    8220  * Sets up the VM-entry controls.
     8214 * Loads the guest state into the VMCS guest-state area.
     8215 *
     8216 * The will typically be done before VM-entry when the guest-CPU state and the
     8217 * VMCS state may potentially be out of sync.
     8218 *
     8219 * Sets up the VM-entry MSR-load and VM-exit MSR-store areas. Sets up the
     8220 * VM-entry controls.
    82218221 * Sets up the appropriate VMX non-root function to execute guest code based on
    82228222 * the guest CPU mode.
     
    1097910979        AssertRCReturn(rc2, rc2);
    1098010980    }
     10981    else if (rc == VINF_PGM_CHANGE_MODE)
     10982    {
     10983        /*
     10984         * Clear the exception-mask here rather than messing with it in hmR0VmxLoadSharedCR0(). Since the fRealOnV86Active
     10985         * state may be changed now. Re-evaluate the necessary intercepts when we return to VT-x execution via
     10986         * hmR0VmxLoadSharedCR0() and hmR0VmxLoadSharedDebugState(), see @bugref{7626}.
     10987         */
     10988        hmR0VmxInitXcptBitmap(pVM, pVCpu);
     10989    }
    1098110990
    1098210991    STAM_PROFILE_ADV_STOP(&pVCpu->hm.s.StatExitMovCRx, y2);
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