VirtualBox

Changeset 92686 in vbox


Ignore:
Timestamp:
Dec 2, 2021 8:41:22 AM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
148585
Message:

VMM/IEM: Nested VMX: bugref:10092 EPT misconfig bits.

File:
1 edited

Legend:

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

    r92685 r92686  
    764764DECL_FORCE_INLINE(void) iemVmxVmcsSetExitGuestLinearAddr(PVMCPUCC pVCpu, uint64_t uGuestLinearAddr)
    765765{
     766    /* Bits 63:32 of guest-linear address MBZ if the guest isn't in long mode prior to the VM-exit. */
     767    Assert(CPUMIsGuestInLongModeEx(IEM_GET_CTX(pVCpu)) || !(uGuestLinearAddr & UINT64_C(0xffffffff00000000)));
    766768    pVCpu->cpum.GstCtx.hwvirt.vmx.Vmcs.u64RoGuestLinearAddr.u = uGuestLinearAddr;
    767769}
     
    36863688
    36873689/**
     3690 * VMX VM-exit handler for EPT misconfiguration.
     3691 *
     3692 * @param   pVCpu       The cross context virtual CPU structure.
     3693 * @param   GCPhysAddr  The physical address causing the EPT misconfiguration. This
     3694 *                      must be page aligned.
     3695 */
     3696IEM_STATIC VBOXSTRICTRC iemVmxVmexitEptMisconfig(PVMCPUCC pVCpu, RTGCPHYS GCPhysAddr)
     3697{
     3698    Assert(!(GCPhysAddr & PAGE_OFFSET_MASK));
     3699    iemVmxVmcsSetExitGuestPhysAddr(pVCpu, GCPhysAddr);
     3700    return iemVmxVmexit(pVCpu, VMX_EXIT_EPT_MISCONFIG, 0 /* u64ExitQual */);
     3701}
     3702
     3703
     3704/**
    36883705 * VMX VM-exit handler for EPT violation.
    36893706 *
     
    36923709 * @param   fSlatFail           The SLAT failure info, IEM_SLAT_FAIL_XXX.
    36933710 * @param   fEptAccess          The EPT paging structure bits.
    3694  * @param   GCPhysAddr          The physical address causing the EPT violation.
     3711 * @param   GCPhysAddr          The physical address causing the EPT violation. This
     3712 *                              must be page aligned.
    36953713 * @param   fIsLinearAddrValid  Whether translation of a linear address caused this
    36963714 *                              EPT violation. If @c false, GCPtrAddr must be 0.
     
    37073725     */
    37083726    Assert(fLinearAddrValid || GCPtrAddr == 0);
     3727    Assert(!(GCPhysAddr & PAGE_OFFSET_MASK));
    37093728
    37103729    uint64_t const fCaps = pVCpu->cpum.GstCtx.hwvirt.vmx.Msrs.u64EptVpidCaps;
     
    37713790                                        pWalk->GCPtr, cbInstr);
    37723791    }
    3773     else
    3774     {
    3775         Assert(pWalk->fFailed & PGM_WALKFAIL_EPT_MISCONFIG);
    3776         /** @todo Do EPT misconfig. */
    3777         return VERR_NOT_IMPLEMENTED;
    3778     }
     3792
     3793    Assert(pWalk->fFailed & PGM_WALKFAIL_EPT_MISCONFIG);
     3794    return iemVmxVmexitEptMisconfig(pVCpu, pWalk->GCPhysNested);
    37793795}
    37803796
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette