Changeset 95315 in vbox
- Timestamp:
- Jun 21, 2022 4:44:40 AM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 151905
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/cpum.h
r95256 r95315 1647 1647 VMM_INT_DECL(bool) CPUMIsGuestVmxEptPaePagingEnabled(PCVMCPUCC pVCpu); 1648 1648 VMM_INT_DECL(uint64_t) CPUMGetGuestVmxApicAccessPageAddr(PCVMCPUCC pVCpu); 1649 VMM_INT_DECL(bool) CPUMIsGuestVmxApicAccessPageAddr(PCVMCPUCC pVCpu, RTGCPHYS GCPhysPage); 1649 1650 /** @} */ 1650 1651 -
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
r95248 r95315 3087 3087 } 3088 3088 3089 3090 /** 3091 * Returns whether the given page is the active APIC-access page. 3092 * 3093 * @returns @c true if the page is the active APIC-access page, @c false otherwises. 3094 * @param pVCpu The cross context virtual CPU structure. 3095 * @param GCPhysPage The guest-physical address to check. 3096 * 3097 * @remarks This function does not assume the guest is not executing in VMX non-root 3098 * mode or even in VMX root-mode. However, it does assert that the VMCS has 3099 * been initialized and the virtual-APIC access VM-execution control was 3100 * enabled. 3101 * @note This is meant to be used by PGM while syncing the page-table entry for 3102 * the APIC-access page. All other queries for the APIC-access page address 3103 * should almost certainly use CPUMGetGuestVmxApicAccessPageAddr() instead! 3104 */ 3105 VMM_INT_DECL(bool) CPUMIsGuestVmxApicAccessPageAddr(PCVMCPUCC pVCpu, RTGCPHYS GCPhysPage) 3106 { 3107 PCVMXVVMCS pVmcs = &pVCpu->cpum.s.Guest.hwvirt.vmx.Vmcs; 3108 if ( pVCpu->CTX_SUFF(pVM)->cpum.s.GuestFeatures.fVmx /* VMX CPU feature is enabled for the guest. */ 3109 && (pVmcs->u32ProcCtls2 & VMX_PROC_CTLS2_VIRT_APIC_ACCESS)) /* Virtual-APIC access VM-execution control is set. */ 3110 { 3111 Assert(pVmcs->fVmcsState & ( VMX_V_VMCS_LAUNCH_STATE_LAUNCHED 3112 | VMX_V_VMCS_LAUNCH_STATE_CURRENT 3113 | VMX_V_VMCS_LAUNCH_STATE_ACTIVE)); /* VMCS has been initialized. */ 3114 Assert(!(pVmcs->u64AddrApicAccess.u & X86_PAGE_4K_OFFSET_MASK)); /* Intel spec. mandates that this is 4K aligned. */ 3115 Assert(!(GCPhysPage & GUEST_PAGE_OFFSET_MASK)); /* Caller must be passing us an aligned page. */ 3116 return pVmcs->u64AddrApicAccess.u == GCPhysPage; 3117 } 3118 return false; 3119 } 3120
Note:
See TracChangeset
for help on using the changeset viewer.