VirtualBox

Changeset 75671 in vbox for trunk/include


Ignore:
Timestamp:
Nov 22, 2018 3:08:24 PM (6 years ago)
Author:
vboxsync
Message:

VMM: Nested VMX: bugref:9180 Implement NMI-unblocking due to IRET for VM-exits. Implemented restoring blocking of NMI when VM-entry fails while checking/loading guest-state. Fixed loading blocking by NMI during VM-entry.

Location:
trunk/include/VBox/vmm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/cpumctx.h

    r75301 r75671  
    573573                /** 0x306 - Whether the injected events are subjected to event intercepts.  */
    574574                bool                    fInterceptEvents;
    575                 bool                    afPadding0[1];
     575                /** 0x307 - Whether blocking of NMI (or virtual-NMIs) was in effect in VMX non-root
     576                 *  mode before execution of IRET. */
     577                bool                    fNmiUnblockingIret;
    576578                /** 0x308 - Cache of the nested-guest current VMCS - R0 ptr. */
    577579                R0PTRTYPE(PVMXVVMCS)    pVmcsR0;
     
    756758AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.fInVmxNonRootMode,      0x305);
    757759AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.fInterceptEvents,       0x306);
     760AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.fNmiUnblockingIret,     0x307);
    758761AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.pVmcsR0,                0x308);
    759762AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.pVmcsR3,                0x310);
  • trunk/include/VBox/vmm/hm_vmx.h

    r75611 r75671  
    41564156 * Returns whether or not the VM-exit is trap-like or fault-like.
    41574157 *
    4158  * @returns @c true if it's a trap-like VM-exit, @c false otehrwise.
     4158 * @returns @c true if it's a trap-like VM-exit, @c false otherwise.
    41594159 * @param   uExitReason     The VM-exit reason.
    41604160 *
    41614161 * @remarks Warning! This does not validate the VM-exit reason.
    41624162 */
    4163 DECLINLINE(bool) HMVmxIsTrapLikeVmexit(uint32_t uExitReason)
     4163DECLINLINE(bool) HMVmxIsVmexitTrapLike(uint32_t uExitReason)
    41644164{
    41654165    /*
     
    41884188    return false;
    41894189}
     4190
     4191
     4192/**
     4193 * Returns whether the VM-entry is vectoring or not given the VM-entry interruption
     4194 * information field.
     4195 *
     4196 * @returns @c true if the VM-entry is vectoring, @c false otherwise.
     4197 * @param   uEntryIntInfo   The VM-entry interruption information field.
     4198 */
     4199DECLINLINE(bool) HMVmxIsVmentryVectoring(uint32_t uEntryIntInfo)
     4200{
     4201    if (!VMX_ENTRY_INT_INFO_IS_VALID(uEntryIntInfo))
     4202        return false;
     4203    uint8_t const uIntInfoType = VMX_ENTRY_INT_INFO_TYPE(uEntryIntInfo);
     4204    switch (uIntInfoType)
     4205    {
     4206        case VMX_ENTRY_INT_INFO_TYPE_EXT_INT:
     4207        case VMX_ENTRY_INT_INFO_TYPE_NMI:
     4208        case VMX_ENTRY_INT_INFO_TYPE_HW_XCPT:
     4209        case VMX_ENTRY_INT_INFO_TYPE_SW_INT:
     4210        case VMX_ENTRY_INT_INFO_TYPE_PRIV_SW_XCPT:
     4211        case VMX_ENTRY_INT_INFO_TYPE_SW_XCPT:
     4212            return true;
     4213    }
     4214    return false;
     4215}
    41904216/** @} */
    41914217
  • trunk/include/VBox/vmm/vm.h

    r75646 r75671  
    546546/** VMX-preemption timer in effect. */
    547547#define VMCPU_FF_VMX_PREEMPT_TIMER          RT_BIT_64(VMCPU_FF_VMX_PREEMPT_TIMER_BIT)
    548 /** Bit number for VMCPU_FF_VMX_PREEMPT_TIMER. */
    549548#define VMCPU_FF_VMX_PREEMPT_TIMER_BIT      32
    550549/** Pending MTF (Monitor Trap Flag) event.  */
    551550#define VMCPU_FF_VMX_MTF                    RT_BIT_64(VMCPU_FF_VMX_MTF_BIT)
    552 /** The bit number for VMCPU_FF_VMX_MTF. */
    553551#define VMCPU_FF_VMX_MTF_BIT                33
    554552/** VMX APIC-write emulation pending.  */
    555553#define VMCPU_FF_VMX_APIC_WRITE             RT_BIT_64(VMCPU_FF_VMX_APIC_WRITE_BIT)
    556 /** The bit number for VMCPU_FF_VMX_UPDATE_VTPR. */
    557554#define VMCPU_FF_VMX_APIC_WRITE_BIT         34
    558555
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