VirtualBox

Ignore:
Timestamp:
Mar 2, 2022 5:00:49 AM (3 years ago)
Author:
vboxsync
Message:

VMM/IEM: Nested VMX: bugref:10092 Let the instruction specify the number of bytes it accesses in the VMX APIC-access page.

File:
1 edited

Legend:

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

    r93922 r94051  
    181181 *  VMX_EXIT_MONITOR (APIC access VM-exit caused by MONITOR pending)
    182182 *  VMX_EXIT_ERR_MACHINE_CHECK (we never need to raise this?)
    183  *  VMX_EXIT_INVEPT
    184183 *  VMX_EXIT_RDRAND
    185184 *  VMX_EXIT_VMFUNC
     
    24652464    pVmcs->u64RoExitQual.u = u64ExitQual;
    24662465
    2467     Log3(("vmexit: reason=%#RX32 qual=%#RX64 cs:rip=%04x:%#RX64 cr0=%#RX64 cr3=%#RX64 cr4=%#RX64\n", uExitReason,
    2468           pVmcs->u64RoExitQual.u, pVCpu->cpum.GstCtx.cs.Sel, pVCpu->cpum.GstCtx.rip, pVCpu->cpum.GstCtx.cr0,
    2469           pVCpu->cpum.GstCtx.cr3, pVCpu->cpum.GstCtx.cr4));
     2466    LogFlow(("vmexit: reason=%#RX32 qual=%#RX64 cs:rip=%04x:%#RX64 cr0=%#RX64 cr3=%#RX64 cr4=%#RX64\n", uExitReason,
     2467             pVmcs->u64RoExitQual.u, pVCpu->cpum.GstCtx.cs.Sel, pVCpu->cpum.GstCtx.rip, pVCpu->cpum.GstCtx.cr0,
     2468             pVCpu->cpum.GstCtx.cr3, pVCpu->cpum.GstCtx.cr4));
    24702469
    24712470    /*
     
    43024301
    43034302/**
    4304  * Virtualizes a memory-based APIC access where the address is not used to access
    4305  * memory.
     4303 * Virtualizes a memory-based APIC access by certain instructions even though they
     4304 * do not use the address to access memory.
    43064305 *
    43074306 * This is for instructions like MONITOR, CLFLUSH, CLFLUSHOPT, ENTER which may cause
     
    43104309 * @param   pVCpu           The cross context virtual CPU structure.
    43114310 * @param   pGCPhysAccess   Pointer to the guest-physical address accessed.
     4311 * @param   cbAccess        The size of the access in bytes.
    43124312 * @param   fAccess         The type of access, see IEM_ACCESS_XXX.
    43134313 */
    4314 IEM_STATIC VBOXSTRICTRC iemVmxVirtApicAccessUnused(PVMCPUCC pVCpu, PRTGCPHYS pGCPhysAccess, uint32_t fAccess)
     4314IEM_STATIC VBOXSTRICTRC iemVmxVirtApicAccessUnused(PVMCPUCC pVCpu, PRTGCPHYS pGCPhysAccess, size_t cbAccess,
     4315                                                   uint32_t fAccess)
    43154316{
    43164317    Assert(pVCpu->cpum.GstCtx.hwvirt.vmx.Vmcs.u32ProcCtls2 & VMX_PROC_CTLS2_VIRT_APIC_ACCESS);
     
    43244325    {
    43254326        uint16_t const offAccess = *pGCPhysAccess & GUEST_PAGE_OFFSET_MASK;
    4326         uint16_t const cbAccess  = 1;
    43274327        bool const fIntercept = iemVmxVirtApicIsMemAccessIntercepted(pVCpu, offAccess, cbAccess, fAccess);
    43284328        if (fIntercept)
     
    76417641# if defined(VBOX_WITH_NESTED_HWVIRT_ONLY_IN_IEM) && defined(IN_RING3)
    76427642                        /* Reschedule to IEM-only execution of the nested-guest. */
    7643                         Log(("%s: Enabling IEM-only EM execution policy!\n", pszInstr));
     7643                        LogFlow(("%s: Enabling IEM-only EM execution policy!\n", pszInstr));
    76447644                        int rcSched = EMR3SetExecutionPolicy(pVCpu->CTX_SUFF(pVM)->pUVM, EMEXECPOLICY_IEM_ALL, true);
    76457645                        if (rcSched != VINF_SUCCESS)
     
    76487648
    76497649                        /* Finally, done. */
    7650                         Log3(("%s: cs:rip=%#04x:%#RX64 cr0=%#RX64 (%#RX64) cr4=%#RX64 (%#RX64) efer=%#RX64\n",
    7651                               pszInstr, pVCpu->cpum.GstCtx.cs.Sel, pVCpu->cpum.GstCtx.rip, pVCpu->cpum.GstCtx.cr0,
    7652                               pVmcs->u64Cr0ReadShadow.u, pVCpu->cpum.GstCtx.cr4, pVmcs->u64Cr4ReadShadow.u,
    7653                               pVCpu->cpum.GstCtx.msrEFER));
     7650                        LogFlow(("%s: cs:rip=%#04x:%#RX64 cr0=%#RX64 (%#RX64) cr4=%#RX64 (%#RX64) efer=%#RX64 (%#RX64)\n",
     7651                                 pszInstr, pVCpu->cpum.GstCtx.cs.Sel, pVCpu->cpum.GstCtx.rip, pVCpu->cpum.GstCtx.cr0,
     7652                                 pVmcs->u64Cr0ReadShadow.u, pVCpu->cpum.GstCtx.cr4, pVmcs->u64Cr4ReadShadow.u,
     7653                                 pVCpu->cpum.GstCtx.msrEFER, pVmcs->u64GuestEferMsr.u));
    76547654                        return VINF_SUCCESS;
    76557655                    }
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