VirtualBox

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


Ignore:
Timestamp:
May 2, 2013 11:56:42 PM (12 years ago)
Author:
vboxsync
Message:

VMM/HMVMXR0: A few extra segment selector checks.

File:
1 edited

Legend:

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

    r45885 r45886  
    31733173            AssertMsgFailed(("Invalid CS Type %#x\n", pCtx->cs.Attr.n.u2Dpl));
    31743174        /* SS */
     3175        Assert((pCtx->ss.Sel & X86_SEL_RPL) == (pCtx->cs.Sel & X86_SEL_RPL));
     3176        Assert(pCtx->ss.Attr.n.u2Dpl == (pCtx->ss.Sel & X86_SEL_RPL));
     3177        Assert(!(pVCpu->hm.s.fContextUseFlags & HM_CHANGED_GUEST_CR0));
     3178        if (   !(pCtx->cr0 & X86_CR0_PE)
     3179            || pCtx->cs.Attr.n.u4Type == 3)
     3180        {
     3181            Assert(!pCtx->ss.Attr.n.u2Dpl);
     3182        }
    31753183        if (pCtx->ss.Attr.u && pCtx->ss.Attr.u != HMVMX_SEL_UNUSABLE)
    31763184        {
     
    31853193                   || (pCtx->ss.Attr.n.u1Granularity));
    31863194        }
    3187         Assert(pCtx->ss.Attr.n.u2Dpl == (pCtx->ss.Sel & X86_SEL_RPL));
    3188         Assert(!(pVCpu->hm.s.fContextUseFlags & HM_CHANGED_GUEST_CR0));
    3189         if (!pCtx->cr0 & X86_CR0_PE)
    3190             Assert(!pCtx->ss.Attr.n.u2Dpl);
    31913195        /* DS, ES, FS, GS - only check for usable selectors, see hmR0VmxWriteSegmentReg(). */
    31923196        if (pCtx->ds.Attr.u && pCtx->ds.Attr.u != HMVMX_SEL_UNUSABLE)
     
    51495153    /*
    51505154     * If VT-x marks the segment as unusable, the rest of the attributes are undefined.
    5151      * See Intel spec. 27.3.2 "Saving Segment Registers and Descriptor-Table Registers.
     5155     * See Intel spec. 27.3.2 "Saving Segment Registers and Descriptor-Table Registers".
    51525156     */
    51535157    if (pSelReg->Attr.u & HMVMX_SEL_UNUSABLE)
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