VirtualBox

Ignore:
Timestamp:
Apr 22, 2019 4:35:20 AM (6 years ago)
Author:
vboxsync
Message:

VMM/IEM: Nested VMX: bugref:9180 Remove some superfluous VM-exit handlers that can be handled by merely passing the VM-exit reason. Preparation of ring-0 VM-exit handling.

File:
1 edited

Legend:

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

    r77898 r78237  
    986986IEM_STATIC VBOXSTRICTRC     iemVmxVmexitNmi(PVMCPU pVCpu);
    987987IEM_STATIC VBOXSTRICTRC     iemVmxVmexitStartupIpi(PVMCPU pVCpu, uint8_t uVector);
    988 IEM_STATIC VBOXSTRICTRC     iemVmxVmexitInitIpi(PVMCPU pVCpu);
    989 IEM_STATIC VBOXSTRICTRC     iemVmxVmexitIntWindow(PVMCPU pVCpu);
    990 IEM_STATIC VBOXSTRICTRC     iemVmxVmexitNmiWindow(PVMCPU pVCpu);
    991 IEM_STATIC VBOXSTRICTRC     iemVmxVmexitMtf(PVMCPU pVCpu);
     988IEM_STATIC VBOXSTRICTRC     iemVmxVmexit(PVMCPU pVCpu, uint32_t uExitReason);
    992989IEM_STATIC VBOXSTRICTRC     iemVmxVirtApicAccessMem(PVMCPU pVCpu, uint16_t offAccess, size_t cbAccess, void *pvData, uint32_t fAccess);
    993990IEM_STATIC VBOXSTRICTRC     iemVmxVmexitApicAccess(PVMCPU pVCpu, uint16_t offAccess, uint32_t fAccess);
     
    1406614063        else if (VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_VMX_MTF))
    1406714064        {
    14068             rcStrict = iemVmxVmexitMtf(pVCpu);
     14065            rcStrict = iemVmxVmexit(pVCpu, VMX_EXIT_MTF);
    1406914066            Assert(!VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_INHIBIT_INTERRUPTS));
    1407014067            Assert(!VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_VMX_MTF));
     
    1408514082        else if (VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_VMX_NMI_WINDOW))
    1408614083        {
    14087             rcStrict = iemVmxVmexitNmiWindow(pVCpu);
     14084            rcStrict = iemVmxVmexit(pVCpu, VMX_EXIT_NMI_WINDOW);
    1408814085            Assert(!VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_VMX_NMI_WINDOW));
    1408914086        }
     
    1591315910
    1591415911/**
    15915  * Interface for HM and EM to emulate VM-exit due to init-IPI (INIT).
     15912 * Interface for HM and EM to emulate a VM-exit.
     15913 *
     15914 * If a specialized version of a VM-exit handler exists, that must be used instead.
    1591615915 *
    1591715916 * @returns Strict VBox status code.
    1591815917 * @param   pVCpu           The cross context virtual CPU structure of the calling EMT.
     15918 * @param   uExitReason     The VM-exit reason.
    1591915919 * @thread  EMT(pVCpu)
    15920  */
    15921 VMM_INT_DECL(VBOXSTRICTRC) IEMExecVmxVmexitInitIpi(PVMCPU pVCpu)
    15922 {
    15923     VBOXSTRICTRC rcStrict = iemVmxVmexitInitIpi(pVCpu);
    15924     if (pVCpu->iem.s.cActiveMappings)
    15925         iemMemRollback(pVCpu);
    15926     return iemExecStatusCodeFiddling(pVCpu, rcStrict);
    15927 }
    15928 
    15929 
    15930 /**
    15931  * Interface for HM and EM to emulate VM-exits for interrupt-windows.
    15932  *
    15933  * @returns Strict VBox status code.
    15934  * @param   pVCpu           The cross context virtual CPU structure of the calling EMT.
    15935  * @thread  EMT(pVCpu)
    15936  */
    15937 VMM_INT_DECL(VBOXSTRICTRC) IEMExecVmxVmexitIntWindow(PVMCPU pVCpu)
    15938 {
    15939     VBOXSTRICTRC rcStrict = iemVmxVmexitIntWindow(pVCpu);
    15940     if (pVCpu->iem.s.cActiveMappings)
    15941         iemMemRollback(pVCpu);
    15942     return iemExecStatusCodeFiddling(pVCpu, rcStrict);
    15943 }
    15944 
    15945 
    15946 /**
    15947  * Interface for HM and EM to emulate VM-exits for NMI-windows.
    15948  *
    15949  * @returns Strict VBox status code.
    15950  * @param   pVCpu           The cross context virtual CPU structure of the calling EMT.
    15951  * @thread  EMT(pVCpu)
    15952  */
    15953 VMM_INT_DECL(VBOXSTRICTRC) IEMExecVmxVmexitNmiWindow(PVMCPU pVCpu)
    15954 {
    15955     VBOXSTRICTRC rcStrict = iemVmxVmexitNmiWindow(pVCpu);
    15956     if (pVCpu->iem.s.cActiveMappings)
    15957         iemMemRollback(pVCpu);
    15958     return iemExecStatusCodeFiddling(pVCpu, rcStrict);
    15959 }
    15960 
    15961 
    15962 /**
    15963  * Interface for HM and EM to emulate VM-exits Monitor-Trap Flag (MTF).
    15964  *
    15965  * @returns Strict VBox status code.
    15966  * @param   pVCpu           The cross context virtual CPU structure of the calling EMT.
    15967  * @thread  EMT(pVCpu)
    15968  */
    15969 VMM_INT_DECL(VBOXSTRICTRC) IEMExecVmxVmexitMtf(PVMCPU pVCpu)
    15970 {
    15971     VBOXSTRICTRC rcStrict = iemVmxVmexitMtf(pVCpu);
     15920 *
     15921 * @remarks It is the responsibility of the caller to ensure VM-exit qualification
     15922 *          is updated prior to calling this function!
     15923 */
     15924VMM_INT_DECL(VBOXSTRICTRC) IEMExecVmxVmexit(PVMCPU pVCpu, uint32_t uExitReason)
     15925{
     15926    VBOXSTRICTRC rcStrict = iemVmxVmexit(pVCpu, uExitReason);
    1597215927    if (pVCpu->iem.s.cActiveMappings)
    1597315928        iemMemRollback(pVCpu);
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