VirtualBox

Changeset 76738 in vbox for trunk


Ignore:
Timestamp:
Jan 9, 2019 1:45:27 PM (6 years ago)
Author:
vboxsync
Message:

VMM/IEM: Nested VMX: bugref:9180 Fix typo while fetching the host segment register from the VMCS during VM-exit. Fix assertion that checks that high bits are all clear (only makes sense when the VM-exit succeeded, as failed VM-exits sets bit 31)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h

    r76735 r76738  
    743743    RTSEL HostSel;
    744744    uint8_t  const  uWidth     = VMX_VMCS_ENC_WIDTH_16BIT;
    745     uint8_t  const  uType      = VMX_VMCS_ENC_TYPE_GUEST_STATE;
     745    uint8_t  const  uType      = VMX_VMCS_ENC_TYPE_HOST_STATE;
    746746    uint8_t  const  uWidthType = (uWidth << 2) | uType;
    747747    uint8_t  const  uIndex     = (iSegReg << 1) + RT_BF_GET(VMX_VMCS16_GUEST_ES_SEL, VMX_BF_VMCS_ENC_INDEX);
     
    21502150    for (unsigned iSegReg = 0; iSegReg < X86_SREG_COUNT; iSegReg++)
    21512151    {
    2152         RTSEL const HostSel  = iemVmxVmcsGetHostSelReg(pVmcs, iSegReg);
     2152        RTSEL const HostSel   = iemVmxVmcsGetHostSelReg(pVmcs, iSegReg);
    21532153        bool const  fUnusable = RT_BOOL(HostSel == 0);
    21542154
     
    28492849    if (!fVmentryFailed)
    28502850    {
     2851        /*
     2852         * The rest of the high bits of the VM-exit reason are only relevant when the VM-exit
     2853         * occurs in enclave mode/SMM which we don't support yet.
     2854         *
     2855         * If we ever add support for it, we can pass just the lower bits, till then an assert
     2856         * should suffice.
     2857         */
     2858        Assert(!RT_HI_U16(uExitReason));
     2859
    28512860        iemVmxVmexitSaveGuestState(pVCpu, uExitReason);
    28522861        int rc = iemVmxVmexitSaveGuestAutoMsrs(pVCpu, uExitReason);
     
    28642873        iemVmxVmexitRestoreForceFlags(pVCpu);
    28652874    }
    2866 
    2867     /*
    2868      * The high bits of the VM-exit reason are only relevant when the VM-exit occurs in
    2869      * enclave mode/SMM which we don't support yet. If we ever add support for it, we can
    2870      * pass just the lower bits, till then an assert should suffice.
    2871      */
    2872     Assert(!RT_HI_U16(uExitReason));
    28732875
    28742876    VBOXSTRICTRC rcStrict = iemVmxVmexitLoadHostState(pVCpu, uExitReason);
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