Changeset 91423 in vbox for trunk/src/VBox
- Timestamp:
- Sep 28, 2021 7:40:05 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h
r91419 r91423 1909 1909 if (RT_SUCCESS(rc)) 1910 1910 { 1911 for (unsigned iPdpte = 0; iPdpte < RT_ELEMENTS(aPdptes); iPdpte++) 1911 uint8_t idxInvalid; 1912 bool const fValid = CPUMArePaePdpesValid(&aPdptes[0], &idxInvalid); 1913 if (fValid) 1914 { /* likely */ } 1915 else 1912 1916 { 1913 if ( !(aPdptes[iPdpte].u & X86_PDPE_P) 1914 || !(aPdptes[iPdpte].u & X86_PDPE_PAE_MBZ_MASK)) 1915 { /* likely */ } 1916 else 1917 { 1918 VMXVDIAG const enmDiag = iemVmxGetDiagVmexitPdpteRsvd(iPdpte); 1919 IEM_VMX_VMEXIT_FAILED_RET(pVCpu, uExitReason, pszFailure, enmDiag); 1920 } 1917 VMXVDIAG const enmDiag = iemVmxGetDiagVmexitPdpteRsvd(idxInvalid); 1918 IEM_VMX_VMEXIT_FAILED_RET(pVCpu, uExitReason, pszFailure, enmDiag); 1921 1919 } 1922 1920 } … … 5646 5644 { 5647 5645 /* Get the PDPTEs. */ 5648 X86PDPE aPdp es[X86_PG_PAE_PDPE_ENTRIES];5646 X86PDPE aPdptes[X86_PG_PAE_PDPE_ENTRIES]; 5649 5647 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX_EPT 5650 5648 if (pVmcs->u32ProcCtls2 & VMX_PROC_CTLS2_EPT) 5651 5649 { 5652 aPdp es[0].u = pVmcs->u64GuestPdpte0.u;5653 aPdp es[1].u = pVmcs->u64GuestPdpte1.u;5654 aPdp es[2].u = pVmcs->u64GuestPdpte2.u;5655 aPdp es[3].u = pVmcs->u64GuestPdpte3.u;5650 aPdptes[0].u = pVmcs->u64GuestPdpte0.u; 5651 aPdptes[1].u = pVmcs->u64GuestPdpte1.u; 5652 aPdptes[2].u = pVmcs->u64GuestPdpte2.u; 5653 aPdptes[3].u = pVmcs->u64GuestPdpte3.u; 5656 5654 } 5657 5655 else … … 5659 5657 { 5660 5658 uint64_t const uGuestCr3 = pVmcs->u64GuestCr3.u & X86_CR3_PAE_PAGE_MASK; 5661 int const rc = PGMPhysSimpleReadGCPhys(pVCpu->CTX_SUFF(pVM), (void *)&aPdp es[0], uGuestCr3, sizeof(aPdpes));5659 int const rc = PGMPhysSimpleReadGCPhys(pVCpu->CTX_SUFF(pVM), (void *)&aPdptes[0], uGuestCr3, sizeof(aPdptes)); 5662 5660 if (RT_FAILURE(rc)) 5663 5661 { … … 5668 5666 5669 5667 /* Check validity of the PDPTEs. */ 5670 for (unsigned idx = 0; idx < RT_ELEMENTS(aPdpes); idx++) 5671 { 5672 if ( !(aPdpes[idx].u & X86_PDPE_P) 5673 || !(aPdpes[idx].u & X86_PDPE_PAE_MBZ_MASK)) 5674 { /* likely */ } 5675 else 5676 { 5677 VMXVDIAG const enmDiag = iemVmxGetDiagVmentryPdpteRsvd(idx); 5678 iemVmxVmcsSetExitQual(pVCpu, VMX_ENTRY_FAIL_QUAL_PDPTE); 5679 IEM_VMX_VMENTRY_FAILED_RET(pVCpu, pszInstr, pszFailure, enmDiag); 5680 } 5668 uint8_t idxInvalid; 5669 bool const fValid = CPUMArePaePdpesValid(&aPdptes[0], &idxInvalid); 5670 if (fValid) 5671 { /* likely */ } 5672 else 5673 { 5674 VMXVDIAG const enmDiag = iemVmxGetDiagVmentryPdpteRsvd(idxInvalid); 5675 iemVmxVmcsSetExitQual(pVCpu, VMX_ENTRY_FAIL_QUAL_PDPTE); 5676 IEM_VMX_VMENTRY_FAILED_RET(pVCpu, pszInstr, pszFailure, enmDiag); 5681 5677 } 5682 5678 }
Note:
See TracChangeset
for help on using the changeset viewer.