Changeset 91580 in vbox for trunk/include
- Timestamp:
- Oct 6, 2021 7:22:04 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 147289
- Location:
- trunk/include/VBox
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/err.h ¶
r90638 r91580 651 651 /** Shadow mode 'none' internal error. */ 652 652 #define VERR_PGM_SHW_NONE_IPE (-1687) 653 /** One or more PAE PDPEs are invalid due to reserved bits being set. */ 654 #define VERR_PGM_PAE_PDPE_RSVD (-1688) 653 655 /** @} */ 654 656 -
trunk/include/VBox/vmm/cpum.h ¶
r91424 r91580 1539 1539 VMM_INT_DECL(uint64_t) CPUMGetGuestCR4ValidMask(PVM pVM); 1540 1540 VMM_INT_DECL(void) CPUMSetGuestPaePdpes(PVMCPU pVCpu, PCX86PDPE paPaePdpes); 1541 VMM_INT_DECL(void) CPUMGetGuestPaePdpes(PVMCPU pVCpu, PX86PDPE paPaePdpes); 1541 1542 /** @} */ 1542 1543 … … 1750 1751 1751 1752 /** 1752 * Tests if the guest is running in PAE mode or not. 1753 * 1754 * @returns true if in PAE mode, otherwise false. 1755 * @param pCtx Current CPU context. 1756 */ 1757 DECLINLINE(bool) CPUMIsGuestInPAEModeEx(PCCPUMCTX pCtx) 1753 * Tests if PAE paging is enabled given the relevant control registers. 1754 * 1755 * @returns @c true if in PAE mode, @c false otherwise. 1756 * @param uCr0 The CR0 value. 1757 * @param uCr4 The CR4 value. 1758 * @param uEferMsr The EFER value. 1759 */ 1760 DECLINLINE(bool) CPUMIsPaePagingEnabled(uint64_t uCr0, uint64_t uCr4, uint64_t uEferMsr) 1758 1761 { 1759 1762 /* Intel mentions EFER.LMA and EFER.LME in different parts of their spec. We shall use EFER.LMA rather 1760 1763 than EFER.LME as it reflects if the CPU has entered paging with EFER.LME set. */ 1761 return ( (pCtx->cr4 & X86_CR4_PAE) 1762 && CPUMIsGuestPagingEnabledEx(pCtx) 1763 && !(pCtx->msrEFER & MSR_K6_EFER_LMA)); 1764 } 1765 1766 1767 /** 1768 * Tests if PAE PDPE ("PDPTE" in Intel nomenclature) entries are valid. 1769 * 1770 * @returns @c true if all PDPEs are valid, @c false otherwise. 1771 * @param paPdpes Pointer to the 4 PAE PDPEs. 1772 * @param pidxInvalid Where to store the index of the first invalid PDPE. 1773 * Optional, can be NULL. Mainly used for diagnostics. 1774 */ 1775 DECLINLINE(bool) CPUMArePaePdpesValid(PCX86PDPE paPdpes, uint8_t *pidxInvalid) 1776 { 1777 for (uint8_t idx = 0; idx < X86_PG_PAE_PDPE_ENTRIES; idx++) 1778 { 1779 if ( !(paPdpes[idx].u & X86_PDPE_P) 1780 || !(paPdpes[idx].u & X86_PDPE_PAE_MBZ_MASK)) 1781 { /* likely */ } 1782 else 1783 { 1784 if (pidxInvalid) 1785 *pidxInvalid = idx; 1786 return false; 1787 } 1788 } 1789 return true; 1790 } 1791 1764 return ( (uCr4 & X86_CR4_PAE) 1765 && (uCr0 & X86_CR0_PG) 1766 && !(uEferMsr & MSR_K6_EFER_LMA)); 1767 } 1768 1769 /** 1770 * Tests if the guest is running in PAE mode or not. 1771 * 1772 * @returns @c true if in PAE mode, @c false otherwise. 1773 * @param pCtx Current CPU context. 1774 */ 1775 DECLINLINE(bool) CPUMIsGuestInPAEModeEx(PCCPUMCTX pCtx) 1776 { 1777 return CPUMIsPaePagingEnabled(pCtx->cr0, pCtx->cr4, pCtx->msrEFER); 1778 } 1792 1779 1793 1780 /** -
trunk/include/VBox/vmm/hm_vmx.h ¶
r91377 r91580 4201 4201 kVmxVDiag_Vmentry_GuestPatMsr, 4202 4202 kVmxVDiag_Vmentry_GuestPcide, 4203 kVmxVDiag_Vmentry_GuestPdpteCr3ReadPhys, 4204 kVmxVDiag_Vmentry_GuestPdpte0Rsvd, 4205 kVmxVDiag_Vmentry_GuestPdpte1Rsvd, 4206 kVmxVDiag_Vmentry_GuestPdpte2Rsvd, 4207 kVmxVDiag_Vmentry_GuestPdpte3Rsvd, 4203 kVmxVDiag_Vmentry_GuestPdpte, 4208 4204 kVmxVDiag_Vmentry_GuestPndDbgXcptBsNoTf, 4209 4205 kVmxVDiag_Vmentry_GuestPndDbgXcptBsTf, … … 4358 4354 kVmxVDiag_Vmentry_VmxRoot, 4359 4355 kVmxVDiag_Vmentry_Vpid, 4360 kVmxVDiag_Vmexit_HostPdpteCr3ReadPhys, 4361 kVmxVDiag_Vmexit_HostPdpte0Rsvd, 4362 kVmxVDiag_Vmexit_HostPdpte1Rsvd, 4363 kVmxVDiag_Vmexit_HostPdpte2Rsvd, 4364 kVmxVDiag_Vmexit_HostPdpte3Rsvd, 4356 kVmxVDiag_Vmexit_HostPdpte, 4365 4357 kVmxVDiag_Vmexit_MsrLoad, 4366 4358 kVmxVDiag_Vmexit_MsrLoadCount, -
trunk/include/VBox/vmm/pgm.h ¶
r91345 r91580 354 354 VMMDECL(int) PGMGstSetPage(PVMCPUCC pVCpu, RTGCPTR GCPtr, size_t cb, uint64_t fFlags); 355 355 VMMDECL(int) PGMGstModifyPage(PVMCPUCC pVCpu, RTGCPTR GCPtr, size_t cb, uint64_t fFlags, uint64_t fMask); 356 VMM_INT_DECL(bool) PGMGstArePaePdpesValid(PVMCPUCC pVCpu, PCX86PDPE paPaePdpes); 357 VMM_INT_DECL(int) PGMGstMapPaePdpes(PVMCPUCC pVCpu, PCX86PDPE paPaePdpes); 358 VMM_INT_DECL(int) PGMGstMapPaePdpesAtCr3(PVMCPUCC pVCpu, uint64_t cr3); 356 359 357 360 VMMDECL(int) PGMInvalidatePage(PVMCPUCC pVCpu, RTGCPTR GCPtrPage); 358 VMMDECL(int) PGMFlushTLB(PVMCPUCC pVCpu, uint64_t cr3, bool fGlobal );361 VMMDECL(int) PGMFlushTLB(PVMCPUCC pVCpu, uint64_t cr3, bool fGlobal, bool fPdpesMapped); 359 362 VMMDECL(int) PGMSyncCR3(PVMCPUCC pVCpu, uint64_t cr0, uint64_t cr3, uint64_t cr4, bool fGlobal); 360 VMMDECL(int) PGMUpdateCR3(PVMCPUCC pVCpu, uint64_t cr3 );363 VMMDECL(int) PGMUpdateCR3(PVMCPUCC pVCpu, uint64_t cr3, bool fPdpesMapped); 361 364 VMMDECL(int) PGMChangeMode(PVMCPUCC pVCpu, uint64_t cr0, uint64_t cr4, uint64_t efer); 362 365 VMM_INT_DECL(int) PGMHCChangeMode(PVMCC pVM, PVMCPUCC pVCpu, PGMMODE enmGuestMode); -
trunk/include/VBox/vmm/vm.h ¶
r91345 r91580 483 483 #define VMCPU_FF_INTERRUPT_NESTED_GUEST RT_BIT_64(VMCPU_FF_INTERRUPT_NESTED_GUEST_BIT) 484 484 #define VMCPU_FF_INTERRUPT_NESTED_GUEST_BIT 11 485 /** This action forces PGM to update changes to CR3 when the guest was in HM mode 486 * (when using nested paging). */ 485 487 #define VMCPU_FF_HM_UPDATE_CR3 RT_BIT_64(VMCPU_FF_HM_UPDATE_CR3_BIT) 486 488 #define VMCPU_FF_HM_UPDATE_CR3_BIT 12
Note:
See TracChangeset
for help on using the changeset viewer.