VirtualBox

Changeset 74861 in vbox for trunk


Ignore:
Timestamp:
Oct 16, 2018 4:40:12 AM (6 years ago)
Author:
vboxsync
Message:

VMM/IEM: Nested VMX: bugref:9180 VM-exit bits; Interrupt-window exit.

Location:
trunk
Files:
3 edited

Legend:

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

    r74834 r74861  
    222222
    223223#ifdef VBOX_WITH_NESTED_HWVIRT_SVM
     224# define IEM_CPUMCTX_EXTRN_VMX_VMEXIT_MASK         CPUMCTX_EXTRN_ABSOLUTELY_ALL
     225# define IEM_CPUMCTX_EXTRN_VMX_VMENTRY_MASK        IEM_CPUMCTX_EXTRN_VMX_VMEXIT_MASK
     226#endif
     227
     228#ifdef VBOX_WITH_NESTED_HWVIRT_SVM
    224229/** The CPUMCTX_EXTRN_XXX mask needed when calling IEMExecSvmVmexit().
    225230 * IEM will ASSUME the caller has ensured these are already present. */
     
    324329#ifdef VBOX_WITH_NESTED_HWVIRT_VMX
    325330VMM_INT_DECL(VBOXSTRICTRC)  IEMExecVmxVmexitExtInt(PVMCPU pVCpu, uint8_t uVector, bool fIntPending);
     331VMM_INT_DECL(VBOXSTRICTRC)  IEMExecVmxVmexitIntWindow(PVMCPU pVCpu);
    326332VMM_INT_DECL(VBOXSTRICTRC)  IEMExecDecodedVmread(PVMCPU pVCpu, PCVMXVEXITINFO pExitInfo);
    327333VMM_INT_DECL(VBOXSTRICTRC)  IEMExecDecodedVmwrite(PVMCPU pVCpu, PCVMXVEXITINFO pExitInfo);
  • trunk/src/VBox/VMM/VMMAll/IEMAll.cpp

    r74834 r74861  
    979979IEM_STATIC VBOXSTRICTRC     iemVmxVmexitTripleFault(PVMCPU pVCpu);
    980980IEM_STATIC VBOXSTRICTRC     iemVmxVmexitExtInt(PVMCPU pVCpu, uint8_t uVector, bool fIntPending);
     981IEM_STATIC VBOXSTRICTRC     iemVmxVmexitIntWindow(PVMCPU pVCpu);
    981982#endif
    982983
     
    1565015651VMM_INT_DECL(VBOXSTRICTRC) IEMExecVmxVmexitExtInt(PVMCPU pVCpu, uint8_t uVector, bool fIntPending)
    1565115652{
    15652     /* IEM_CTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_SVM_VMEXIT_MASK); */ /** @todo NSTVMX: VMX_EXIT_MASK */
     15653    IEM_CTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_VMX_VMEXIT_MASK);
    1565315654    VBOXSTRICTRC rcStrict = iemVmxVmexitExtInt(pVCpu, uVector, fIntPending);
    1565415655    if (pVCpu->iem.s.cActiveMappings)
     
    1565915660
    1566015661/**
     15662 * Interface for HM and EM to emulate VM-exits for interrupt-windows.
     15663 *
     15664 * @returns Strict VBox status code.
     15665 * @param   pVCpu           The cross context virtual CPU structure of the calling EMT.
     15666 * @param   uExitReason     The VM-exit reason.
     15667 * @param   uExitQual       The VM-exit qualification.
     15668 *
     15669 * @thread  EMT(pVCpu)
     15670 */
     15671VMM_INT_DECL(VBOXSTRICTRC) IEMExecVmxVmexitIntWindow(PVMCPU pVCpu)
     15672{
     15673    IEM_CTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_VMX_VMEXIT_MASK);
     15674    VBOXSTRICTRC rcStrict = iemVmxVmexitIntWindow(pVCpu);
     15675    if (pVCpu->iem.s.cActiveMappings)
     15676        iemMemRollback(pVCpu);
     15677    return iemExecStatusCodeFiddling(pVCpu, rcStrict);
     15678}
     15679
     15680
     15681/**
    1566115682 * Interface for HM and EM to emulate the VMREAD instruction.
    1566215683 *
     
    1566915690{
    1567015691    IEMEXEC_ASSERT_INSTR_LEN_RETURN(pExitInfo->cbInstr, 3);
    15671     IEM_CTX_ASSERT(pVCpu, CPUMCTX_EXTRN_HWVIRT);
     15692    IEM_CTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_EXEC_DECODED_MEM_MASK | CPUMCTX_EXTRN_HM_VMX_MASK);
    1567215693    Assert(pExitInfo);
    1567315694
     
    1571415735{
    1571515736    IEMEXEC_ASSERT_INSTR_LEN_RETURN(pExitInfo->cbInstr, 3);
    15716     IEM_CTX_ASSERT(pVCpu, CPUMCTX_EXTRN_HWVIRT);
     15737    IEM_CTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_EXEC_DECODED_MEM_MASK | CPUMCTX_EXTRN_HM_VMX_MASK);
    1571715738    Assert(pExitInfo);
    1571815739
     
    1575515776    Assert(pExitInfo);
    1575615777    IEMEXEC_ASSERT_INSTR_LEN_RETURN(pExitInfo->cbInstr, 3);
    15757     IEM_CTX_ASSERT(pVCpu, CPUMCTX_EXTRN_HWVIRT);
     15778    IEM_CTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_EXEC_DECODED_MEM_MASK | CPUMCTX_EXTRN_HM_VMX_MASK);
    1575815779
    1575915780    iemInitExec(pVCpu, false /*fBypassHandlers*/);
     
    1578115802    Assert(pExitInfo);
    1578215803    IEMEXEC_ASSERT_INSTR_LEN_RETURN(pExitInfo->cbInstr, 3);
    15783     IEM_CTX_ASSERT(pVCpu, CPUMCTX_EXTRN_HWVIRT);
     15804    IEM_CTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_EXEC_DECODED_MEM_MASK | CPUMCTX_EXTRN_HM_VMX_MASK);
    1578415805
    1578515806    iemInitExec(pVCpu, false /*fBypassHandlers*/);
     
    1580715828    Assert(pExitInfo);
    1580815829    IEMEXEC_ASSERT_INSTR_LEN_RETURN(pExitInfo->cbInstr, 3);
    15809     IEM_CTX_ASSERT(pVCpu, CPUMCTX_EXTRN_HWVIRT);
     15830    IEM_CTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_EXEC_DECODED_MEM_MASK | CPUMCTX_EXTRN_HM_VMX_MASK);
    1581015831
    1581115832    iemInitExec(pVCpu, false /*fBypassHandlers*/);
     
    1583315854    Assert(pExitInfo);
    1583415855    IEMEXEC_ASSERT_INSTR_LEN_RETURN(pExitInfo->cbInstr, 3);
    15835     IEM_CTX_ASSERT(pVCpu, CPUMCTX_EXTRN_HWVIRT);
     15856    IEM_CTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_EXEC_DECODED_MEM_MASK | CPUMCTX_EXTRN_HM_VMX_MASK);
    1583615857
    1583715858    iemInitExec(pVCpu, false /*fBypassHandlers*/);
     
    1585815879{
    1585915880    IEMEXEC_ASSERT_INSTR_LEN_RETURN(cbInstr, 3);
     15881    IEM_CTX_ASSERT(pVCpu, CPUMCTX_EXTRN_HM_VMX_MASK);
    1586015882
    1586115883    iemInitExec(pVCpu, false /*fBypassHandlers*/);
  • trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h

    r74836 r74861  
    37343734
    37353735/**
     3736 * VMX VM-exit handler for interrupt-window VM-exits.
     3737 *
     3738 * @returns VBox strict status code.
     3739 * @param   pVCpu           The cross context virtual CPU structure.
     3740 */
     3741IEM_STATIC VBOXSTRICTRC iemVmxVmexitIntWindow(PVMCPU pVCpu)
     3742{
     3743    iemVmxVmcsSetExitQual(pVCpu, 0);
     3744    return iemVmxVmexit(pVCpu, VMX_EXIT_INT_WINDOW);
     3745}
     3746
     3747
     3748/**
    37363749 * VMX VM-exit handler for VM-exits due to delivery of an event.
    37373750 *
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