VirtualBox

Changeset 93198 in vbox for trunk


Ignore:
Timestamp:
Jan 12, 2022 12:31:58 PM (3 years ago)
Author:
vboxsync
Message:

VMM/IEM: Nested VMX: bugref:10092 Add INVEPT interface.

Location:
trunk
Files:
2 edited

Legend:

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

    r93115 r93198  
    381381VMM_INT_DECL(VBOXSTRICTRC)  IEMExecDecodedVmxoff(PVMCPUCC pVCpu, uint8_t cbInstr);
    382382VMM_INT_DECL(VBOXSTRICTRC)  IEMExecDecodedInvvpid(PVMCPUCC pVCpu, PCVMXVEXITINFO pExitInfo);
     383# ifdef VBOX_WITH_NESTED_HWVIRT_VMX_EPT
     384VMM_INT_DECL(VBOXSTRICTRC)  IEMExecDecodedInvept(PVMCPUCC pVCpu, PCVMXVEXITINFO pExitInfo);
     385# endif
    383386#endif
    384387/** @}  */
  • trunk/src/VBox/VMM/VMMAll/IEMAll.cpp

    r93115 r93198  
    1633416334
    1633516335
     16336# ifdef VBOX_WITH_NESTED_HWVIRT_VMX_EPT
     16337/**
     16338 * Interface for HM and EM to emulate the INVEPT instruction.
     16339 *
     16340 * @returns Strict VBox status code.
     16341 * @param   pVCpu           The cross context virtual CPU structure of the calling EMT.
     16342 * @param   pExitInfo       Pointer to the VM-exit information.
     16343 * @thread  EMT(pVCpu)
     16344 */
     16345VMM_INT_DECL(VBOXSTRICTRC) IEMExecDecodedInvept(PVMCPUCC pVCpu, PCVMXVEXITINFO pExitInfo)
     16346{
     16347    IEMEXEC_ASSERT_INSTR_LEN_RETURN(pExitInfo->cbInstr, 4);
     16348    IEM_CTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_EXEC_DECODED_MEM_MASK | CPUMCTX_EXTRN_INHIBIT_INT | CPUMCTX_EXTRN_INHIBIT_NMI);
     16349    Assert(pExitInfo);
     16350
     16351    iemInitExec(pVCpu, false /*fBypassHandlers*/);
     16352
     16353    uint8_t const  iEffSeg          = pExitInfo->InstrInfo.Inv.iSegReg;
     16354    uint8_t const  cbInstr          = pExitInfo->cbInstr;
     16355    RTGCPTR const  GCPtrInveptDesc  = pExitInfo->GCPtrEffAddr;
     16356    uint64_t const u64InveptType    = pVCpu->iem.s.enmCpuMode == IEMMODE_64BIT
     16357                                    ? iemGRegFetchU64(pVCpu, pExitInfo->InstrInfo.Inv.iReg2)
     16358                                    : iemGRegFetchU32(pVCpu, pExitInfo->InstrInfo.Inv.iReg2);
     16359    VBOXSTRICTRC rcStrict = iemVmxInvept(pVCpu, cbInstr, iEffSeg, GCPtrInveptDesc, u64InveptType, pExitInfo);
     16360    Assert(!pVCpu->iem.s.cActiveMappings);
     16361    return iemUninitExecAndFiddleStatusAndMaybeReenter(pVCpu, rcStrict);
     16362}
     16363# endif /* VBOX_WITH_NESTED_HWVIRT_VMX_EPT */
     16364
     16365
    1633616366/**
    1633716367 * @callback_method_impl{FNPGMPHYSHANDLER, VMX APIC-access page accesses}
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