VirtualBox

Changeset 96960 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 1, 2022 8:00:19 AM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
153879
Message:

VMM/IEM: Nested VMX: bugref:10092 Fix for nested VMs without nested EPT until PGM_WITH_NESTED_APIC_ACCESS_PAGE is sorted out.

File:
1 edited

Legend:

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

    r96927 r96960  
    99729972
    99739973            /*
     9974             * WARNING: HACK AHEAD!
     9975             * The below is a the old behavior which composes an incomplete APIC-access VM-exit.
     9976             * This will result in the inner hypervisor emulating the access since it lacks info
     9977             * for a linear read/write accesses. Unfortunately, this is required till the
     9978             * virtual VMX APIC-access page mapping using PGM_WITH_NESTED_APIC_ACCESS_PAGE is
     9979             * fixed properly.
     9980             */
     9981            if (HmExitAux.Vmx.uReason == VMX_EXIT_EPT_MISCONFIG)
     9982            {
     9983                VMXVEXITINFO ExitInfo;
     9984                RT_ZERO(ExitInfo);
     9985                ExitInfo.uReason = VMX_EXIT_APIC_ACCESS;
     9986                ExitInfo.u64Qual = RT_BF_MAKE(VMX_BF_EXIT_QUAL_APIC_ACCESS_OFFSET, offAccess)
     9987                                 | RT_BF_MAKE(VMX_BF_EXIT_QUAL_APIC_ACCESS_TYPE,   VMXAPICACCESS_PHYSICAL_INSTR);
     9988                ExitInfo.cbInstr = 0;
     9989
     9990                VMXVEXITEVENTINFO ExitEventInfo;
     9991                RT_ZERO(ExitEventInfo);
     9992                ExitEventInfo.uIdtVectoringInfo    = HmExitAux.Vmx.uIdtVectoringInfo;
     9993                ExitEventInfo.uIdtVectoringErrCode = HmExitAux.Vmx.uIdtVectoringErrCode;
     9994
     9995                LogFlowFunc(("Raising APIC-access VM-exit as phys access from #PF handler at offset %#x\n", offAccess));
     9996                VBOXSTRICTRC rcStrict = iemVmxVmexitApicAccessWithInfo(pVCpu, &ExitInfo, &ExitEventInfo);
     9997                return iemExecStatusCodeFiddling(pVCpu, rcStrict);
     9998            }
     9999
     10000            /*
    997410001             * Verify the VM-exit reason must be an EPT violation.
    997510002             * Other accesses should go through the other handler (iemVmxApicAccessPageHandler).
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