Changeset 104548 in vbox
- Timestamp:
- May 8, 2024 12:26:12 PM (7 months ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAll.cpp
r103417 r104548 1907 1907 * Gets effective Guest OS page information. 1908 1908 * 1909 * When GCPtr is in a big page, the function will return as if it was a normal1910 * 4KB page. If the need for distinguishing between big and normal page becomes1911 * necessary at a later point, a PGMGstGetPage() will be created for that1912 * purpose.1913 *1914 1909 * @returns VBox status code. 1915 1910 * @param pVCpu The cross context virtual CPU structure of the calling EMT. 1916 1911 * @param GCPtr Guest Context virtual address of the page. 1917 1912 * @param pWalk Where to store the page walk information. 1913 * @thread EMT(pVCpu) 1918 1914 */ 1919 1915 VMMDECL(int) PGMGstGetPage(PVMCPUCC pVCpu, RTGCPTR GCPtr, PPGMPTWALK pWalk) -
trunk/src/VBox/VMM/VMMAll/PGMAllGst.h
r98103 r104548 128 128 int rc; 129 129 130 # ifdef VBOX_WITH_NESTED_HWVIRT_VMX_EPT130 # ifdef VBOX_WITH_NESTED_HWVIRT_VMX_EPT 131 131 /** @def PGM_GST_SLAT_WALK 132 132 * Macro to perform guest second-level address translation (EPT or Nested). … … 139 139 * @param a_GCPhysOut Where to store the guest-physical address (result). 140 140 */ 141 # define PGM_GST_SLAT_WALK(a_pVCpu, a_GCPtrNested, a_GCPhysNested, a_GCPhysOut, a_pWalk) \141 # define PGM_GST_SLAT_WALK(a_pVCpu, a_GCPtrNested, a_GCPhysNested, a_GCPhysOut, a_pWalk) \ 142 142 do { \ 143 143 if ((a_pVCpu)->pgm.s.enmGuestSlatMode == PGMSLAT_EPT) \ … … 156 156 } \ 157 157 } while (0) 158 # endif158 # endif 159 159 160 160 /* … … 203 203 */ 204 204 RTGCPHYS GCPhysPdpt = Pml4e.u & X86_PML4E_PG_MASK; 205 # ifdef VBOX_WITH_NESTED_HWVIRT_VMX_EPT205 # ifdef VBOX_WITH_NESTED_HWVIRT_VMX_EPT 206 206 PGM_GST_SLAT_WALK(pVCpu, GCPtr, GCPhysPdpt, GCPhysPdpt, pWalk); 207 # endif207 # endif 208 208 rc = PGM_GCPHYS_2_PTR_BY_VMCPU(pVCpu, GCPhysPdpt, &pGstWalk->pPdpt); 209 209 if (RT_SUCCESS(rc)) { /* probable */ } … … 214 214 if (RT_SUCCESS(rc)) { /* probable */ } 215 215 else return PGM_GST_NAME(WalkReturnBadPhysAddr)(pVCpu, pWalk, 8, rc); 216 # endif216 # endif 217 217 } 218 218 { … … 229 229 else return PGM_GST_NAME(WalkReturnRsvdError)(pVCpu, pWalk, 3); 230 230 231 # if PGM_GST_TYPE == PGM_TYPE_AMD64231 # if PGM_GST_TYPE == PGM_TYPE_AMD64 232 232 fEffective &= (Pdpe.u & ( X86_PDPE_P | X86_PDPE_RW | X86_PDPE_US 233 233 | X86_PDPE_PWT | X86_PDPE_PCD | X86_PDPE_A)); 234 234 fEffective |= Pdpe.u & X86_PDPE_LM_NX; 235 # else235 # else 236 236 /* 237 237 * NX in the legacy-mode PAE PDPE is reserved. The valid check above ensures the NX bit is not set. … … 241 241 fEffective = X86_PDPE_P | X86_PDPE_RW | X86_PDPE_US | X86_PDPE_A 242 242 | (Pdpe.u & (X86_PDPE_PWT | X86_PDPE_PCD)); 243 # endif243 # endif 244 244 pWalk->fEffective = fEffective; 245 245 … … 248 248 */ 249 249 RTGCPHYS GCPhysPd = Pdpe.u & X86_PDPE_PG_MASK; 250 # ifdef VBOX_WITH_NESTED_HWVIRT_VMX_EPT250 # ifdef VBOX_WITH_NESTED_HWVIRT_VMX_EPT 251 251 PGM_GST_SLAT_WALK(pVCpu, GCPtr, GCPhysPd, GCPhysPd, pWalk); 252 # endif252 # endif 253 253 rc = PGM_GCPHYS_2_PTR_BY_VMCPU(pVCpu, GCPhysPd, &pGstWalk->pPd); 254 254 if (RT_SUCCESS(rc)) { /* probable */ } … … 394 394 return rc; 395 395 } 396 # 396 # endif 397 397 398 398 /* -
trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp
r104256 r104548 2125 2125 * @remark Avoid calling this API from within critical sections (other than 2126 2126 * the PGM one) because of the deadlock risk. 2127 * @thread EMT 2127 * @thread EMT(pVCpu) 2128 2128 */ 2129 2129 VMM_INT_DECL(int) PGMPhysGCPtr2CCPtrReadOnly(PVMCPUCC pVCpu, RTGCPTR GCPtr, void const **ppv, PPGMPAGEMAPLOCK pLock) … … 2377 2377 * @param GCPtr The guest pointer to convert. 2378 2378 * @param pGCPhys Where to store the GC physical address. 2379 * @thread EMT(pVCpu) 2379 2380 */ 2380 2381 VMMDECL(int) PGMPhysGCPtr2GCPhys(PVMCPUCC pVCpu, RTGCPTR GCPtr, PRTGCPHYS pGCPhys) 2381 2382 { 2383 VM_ASSERT_EMT(pVCpu->CTX_SUFF(pVM)); 2382 2384 PGMPTWALK Walk; 2383 2385 int rc = PGMGstGetPage(pVCpu, (RTGCUINTPTR)GCPtr, &Walk); … … 2397 2399 * @param GCPtr The guest pointer to convert. 2398 2400 * @param pHCPhys Where to store the HC physical address. 2401 * @thread EMT(pVCpu) 2399 2402 */ 2400 2403 VMM_INT_DECL(int) PGMPhysGCPtr2HCPhys(PVMCPUCC pVCpu, RTGCPTR GCPtr, PRTHCPHYS pHCPhys) 2401 2404 { 2405 VM_ASSERT_EMT(pVCpu->CTX_SUFF(pVM)); 2402 2406 PVMCC pVM = pVCpu->CTX_SUFF(pVM); 2403 2407 PGMPTWALK Walk;
Note:
See TracChangeset
for help on using the changeset viewer.