VirtualBox

Changeset 77459 in vbox for trunk/src


Ignore:
Timestamp:
Feb 25, 2019 3:04:16 PM (6 years ago)
Author:
vboxsync
Message:

VMM/IEM: Nested VMX: bugref:9180 Clear IDT-vectoring information field when the VM-exit is not occurring during delivery of an event. Also clear the IDT-vectoring information field for triple-fault VM-exits.

File:
1 edited

Legend:

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

    r77454 r77459  
    28332833
    28342834    /*
     2835     * Clear IDT-vectoring information fields if the VM-exit was not triggered during delivery of an event.
     2836     * See Intel spec. 27.2.3 "Information for VM Exits During Event Delivery".
     2837     */
     2838    {
     2839        uint8_t    uVector;
     2840        uint32_t   fFlags;
     2841        uint32_t   uErrCode;
     2842        bool const fInEventDelivery = IEMGetCurrentXcpt(pVCpu, &uVector, &fFlags,  &uErrCode, NULL /* uCr2 */);
     2843        if (!fInEventDelivery)
     2844            iemVmxVmcsSetIdtVectoringInfo(pVCpu, 0);
     2845        /* else: Caller would have updated IDT-vectoring information already, see iemVmxVmexitEvent(). */
     2846    }
     2847
     2848    /*
    28352849     * Save the guest state back into the VMCS.
    28362850     * We only need to save the state when the VM-entry was successful.
     
    41444158IEM_STATIC VBOXSTRICTRC iemVmxVmexitTripleFault(PVMCPU pVCpu)
    41454159{
     4160    /*
     4161     * A VM-exit is not considered to occur during event delivery when the original
     4162     * event results in a triple-fault.
     4163     *
     4164     * Therefore, we must clear the original event from the IDT-vectoring fields which
     4165     * would've been recorded before causing the VM-exit.
     4166     *
     4167     * 27.2.3 "Information for VM Exits During Event Delivery"
     4168     */
     4169    iemVmxVmcsSetIdtVectoringInfo(pVCpu, 0);
     4170    iemVmxVmcsSetIdtVectoringErrCode(pVCpu, 0);
     4171
    41464172    return iemVmxVmexit(pVCpu, VMX_EXIT_TRIPLE_FAULT);
    41474173}
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