VirtualBox

Changeset 77717 in vbox


Ignore:
Timestamp:
Mar 15, 2019 9:21:42 AM (6 years ago)
Author:
vboxsync
Message:

VMM/IEM: Nested VMX: bugref:9180 Added IEMExecVmxVmexitNmi. Might need to eventually do a more generic one that covers hardware exceptions as well as software ints. For now this will do.

Location:
trunk
Files:
3 edited

Legend:

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

    r77610 r77717  
    335335VMM_INT_DECL(VBOXSTRICTRC)  IEMExecVmxVmexitPreemptTimer(PVMCPU pVCpu);
    336336VMM_INT_DECL(VBOXSTRICTRC)  IEMExecVmxVmexitExtInt(PVMCPU pVCpu, uint8_t uVector, bool fIntPending);
     337VMM_INT_DECL(VBOXSTRICTRC)  IEMExecVmxVmexitNmi(PVMCPU pVCpu);
    337338VMM_INT_DECL(VBOXSTRICTRC)  IEMExecVmxVmexitStartupIpi(PVMCPU pVCpu, uint8_t uVector);
    338339VMM_INT_DECL(VBOXSTRICTRC)  IEMExecVmxVmexitInitIpi(PVMCPU pVCpu);
  • trunk/src/VBox/VMM/VMMAll/IEMAll.cpp

    r77612 r77717  
    984984IEM_STATIC VBOXSTRICTRC     iemVmxVmexitPreemptTimer(PVMCPU pVCpu);
    985985IEM_STATIC VBOXSTRICTRC     iemVmxVmexitExtInt(PVMCPU pVCpu, uint8_t uVector, bool fIntPending);
     986IEM_STATIC VBOXSTRICTRC     iemVmxVmexitNmi(PVMCPU pVCpu);
    986987IEM_STATIC VBOXSTRICTRC     iemVmxVmexitStartupIpi(PVMCPU pVCpu, uint8_t uVector);
    987988IEM_STATIC VBOXSTRICTRC     iemVmxVmexitInitIpi(PVMCPU pVCpu);
     
    1587415875
    1587515876/**
     15877 * Interface for HM and EM to emulate VM-exit due to NMIs.
     15878 *
     15879 * @returns Strict VBox status code.
     15880 * @param   pVCpu           The cross context virtual CPU structure of the calling EMT.
     15881 * @thread  EMT(pVCpu)
     15882 */
     15883VMM_INT_DECL(VBOXSTRICTRC) IEMExecVmxVmexitNmi(PVMCPU pVCpu)
     15884{
     15885    VBOXSTRICTRC rcStrict = iemVmxVmexitNmi(pVCpu);
     15886    if (pVCpu->iem.s.cActiveMappings)
     15887        iemMemRollback(pVCpu);
     15888    return iemExecStatusCodeFiddling(pVCpu, rcStrict);
     15889}
     15890
     15891
     15892/**
    1587615893 * Interface for HM and EM to emulate VM-exit due to startup-IPI (SIPI).
    1587715894 *
  • trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h

    r77610 r77717  
    39143914
    39153915/**
     3916 * VMX VM-exit handler for VM-exits due to NMIs.
     3917 *
     3918 * @returns VBox strict status code.
     3919 * @param   pVCpu           The cross context virtual CPU structure.
     3920 *
     3921 * @remarks This function might import externally kept DR6 if necessary.
     3922 */
     3923IEM_STATIC VBOXSTRICTRC iemVmxVmexitNmi(PVMCPU pVCpu)
     3924{
     3925    PCVMXVVMCS pVmcs = pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pVmcs);
     3926    Assert(pVmcs);
     3927    Assert(pVmcs->u32PinCtls & VMX_PIN_CTLS_NMI_EXIT);
     3928    Assert(pVCpu->cpum.GstCtx.hwvirt.vmx.fInterceptEvents);
     3929    return iemVmxVmexitEvent(pVCpu, X86_XCPT_NMI, IEM_XCPT_FLAGS_T_CPU_XCPT, 0 /* uErrCode */, 0 /* uCr2 */, 0 /* cbInstr */);
     3930}
     3931
     3932
     3933/**
    39163934 * VMX VM-exit handler for VM-exits due to startup-IPIs (SIPI).
    39173935 *
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