VirtualBox

Ignore:
Timestamp:
Oct 4, 2018 6:07:20 AM (6 years ago)
Author:
vboxsync
Message:

VMM/IEM, HM: Nested VMX: bugref:9180 VM-exit bits; LMSW intercept. Separated VINF_HM_INTERCEPT_NOT_ACTIVE into VMX and SVM
specific codes. Adjusted IEMExecDecodedLmsw to supply the additional memory operand parameter from the VMCS guest-linear address
field.

File:
1 edited

Legend:

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

    r74545 r74603  
    7878#define HMVMX_READ_EXIT_INTERRUPTION_ERROR_CODE  RT_BIT_32(5)
    7979#define HMVMX_READ_EXIT_INSTR_INFO               RT_BIT_32(6)
     80#define HMVMX_READ_GUEST_LINEAR_ADDR             RT_BIT_32(7)
    8081/** @} */
    8182
     
    263264    /** The VM-exit exit code qualification. */
    264265    uint64_t            uExitQual;
     266    /** The Guest-linear address. */
     267    uint64_t            uGuestLinearAddr;
    265268
    266269    /** The VM-exit interruption-information field. */
     
    724727
    725728/**
    726  * Reads the exit code qualification from the VMCS into the VMX transient
    727  * structure.
     729 * Reads the VM-exit Qualification from the VMCS into the VMX transient structure.
    728730 *
    729731 * @returns VBox status code.
     
    739741        AssertRCReturn(rc, rc);
    740742        pVmxTransient->fVmcsFieldsRead |= HMVMX_READ_EXIT_QUALIFICATION;
     743    }
     744    return VINF_SUCCESS;
     745}
     746
     747
     748/**
     749 * Reads the Guest-linear address from the VMCS into the VMX transient structure.
     750 *
     751 * @returns VBox status code.
     752 * @param   pVCpu           The cross context virtual CPU structure of the
     753 *                          calling EMT. (Required for the VMCS cache case.)
     754 * @param   pVmxTransient   Pointer to the VMX transient structure.
     755 */
     756DECLINLINE(int) hmR0VmxReadGuestLinearAddrVmcs(PVMCPU pVCpu, PVMXTRANSIENT pVmxTransient)
     757{
     758    if (!(pVmxTransient->fVmcsFieldsRead & HMVMX_READ_GUEST_LINEAR_ADDR))
     759    {
     760        int rc = VMXReadVmcsGstN(VMX_VMCS_RO_GUEST_LINEAR_ADDR, &pVmxTransient->uGuestLinearAddr); NOREF(pVCpu);
     761        AssertRCReturn(rc, rc);
     762        pVmxTransient->fVmcsFieldsRead |= HMVMX_READ_GUEST_LINEAR_ADDR;
    741763    }
    742764    return VINF_SUCCESS;
     
    1228212304        {
    1228312305            /* Note! LMSW cannot clear CR0.PE, so no fRealOnV86Active kludge needed here. */
    12284             rcStrict = IEMExecDecodedLmsw(pVCpu, pVmxTransient->cbInstr, VMX_EXIT_QUAL_CRX_LMSW_DATA(uExitQual));
     12306            rc = hmR0VmxReadGuestLinearAddrVmcs(pVCpu, pVmxTransient);
     12307            AssertRCReturn(rc, rc);
     12308            rcStrict = IEMExecDecodedLmsw(pVCpu, pVmxTransient->cbInstr, VMX_EXIT_QUAL_CRX_LMSW_DATA(uExitQual),
     12309                                          pVmxTransient->uGuestLinearAddr);
    1228512310            AssertMsg(   rcStrict == VINF_SUCCESS
    1228612311                      || rcStrict == VINF_IEM_RAISED_XCPT
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