VirtualBox

Changeset 47243 in vbox for trunk/src


Ignore:
Timestamp:
Jul 19, 2013 12:44:53 AM (12 years ago)
Author:
vboxsync
Message:

hmR0VmxReadSegmentReg: Update on the unused stuff, prepared fix but needs some discussion+testing before enabling.

File:
1 edited

Legend:

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

    r47202 r47243  
    54355435     *
    54365436     * See Intel spec. 27.3.2 "Saving Segment Registers and Descriptor-Table Registers".
     5437     *
     5438     * bird: This isn't quite as simple.  VT-x and VBox(!) requires the DPL for SS to be the the same as CPL.  In 64-bit mode it
     5439     *       is possible (int/trap/xxx injects does this when switching rings) to load SS with a NULL selector and RPL=CPL.
     5440     *       The Attr.u = HMVMX_SEL_UNUSABLE works fine as long as nobody uses ring-1 or ring-2.  VT-x seems to set the DPL
     5441     *       correctly in the attributes even when the unusable bit is set, we need to preseve the DPL or we get invalid guest
     5442     *       state trouble.  Try bs2-cpu-hidden-regs-1.
    54375443     */
    54385444    if (pSelReg->Attr.u & HMVMX_SEL_UNUSABLE)
    54395445    {
    54405446        Assert(idxSel != VMX_VMCS16_GUEST_FIELD_TR);          /* TR is the only selector that can never be unusable. */
     5447        Log(("idxSel=%#x attr=%#x\n", idxSel, pSelReg->Attr.u));
     5448
     5449#if 0 /** @todo Is there any code which will freak out if we do this for all?  Better track it down and fix. */
     5450        pSelReg->Attr.u &= HMVMX_SEL_UNUSABLE | (UINT32_C(3) << 5);
     5451#else
    54415452        pSelReg->Attr.u = HMVMX_SEL_UNUSABLE;
     5453#endif
    54425454    }
    54435455    return VINF_SUCCESS;
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