Changeset 31170 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Jul 28, 2010 3:20:02 PM (14 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGMInline.h
r31167 r31170 293 293 * 294 294 * @returns VINF_SUCCESS. Will bail out to ring-3 on failure. 295 * @param p PGM Pointer to the PVM instance data.295 * @param pVCpu The current CPU. 296 296 * @param HCPhys The physical address of the page. 297 297 * @param ppv Where to store the mapping address. 298 298 */ 299 DECLINLINE(int) pgmR0DynMapHCPageInlined(PPGM pPGM, RTHCPHYS HCPhys, void **ppv) 300 { 301 PVM pVM = PGM2VM(pPGM); 302 PPGMCPU pPGMCPU = (PPGMCPU)((uint8_t *)VMMGetCpu(pVM) + pPGM->offVCpuPGM); /* very pretty ;-) */ 303 PPGMMAPSET pSet = &pPGMCPU->AutoSet; 304 305 STAM_PROFILE_START(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapHCPageInl, a); 299 DECLINLINE(int) pgmR0DynMapHCPageInlined(PVMCPU pVCpu, RTHCPHYS HCPhys, void **ppv) 300 { 301 PPGMMAPSET pSet = &pVCpu->pgm.s.AutoSet; 302 303 STAM_PROFILE_START(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapHCPageInl, a); 306 304 Assert(!(HCPhys & PAGE_OFFSET_MASK)); 307 305 Assert(pSet->cEntries <= RT_ELEMENTS(pSet->aEntries)); … … 313 311 { 314 312 *ppv = pSet->aEntries[iEntry].pvPage; 315 STAM_COUNTER_INC(&p PGMCPU->CTX_SUFF(pStats)->StatR0DynMapHCPageInlHits);313 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapHCPageInlHits); 316 314 } 317 315 else 318 316 { 319 STAM_COUNTER_INC(&p PGMCPU->CTX_SUFF(pStats)->StatR0DynMapHCPageInlMisses);320 pgmR0DynMapHCPageCommon(p VM, pSet, HCPhys, ppv);321 } 322 323 STAM_PROFILE_STOP(&p PGMCPU->CTX_SUFF(pStats)->StatR0DynMapHCPageInl, a);317 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapHCPageInlMisses); 318 pgmR0DynMapHCPageCommon(pSet, HCPhys, ppv); 319 } 320 321 STAM_PROFILE_STOP(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapHCPageInl, a); 324 322 return VINF_SUCCESS; 325 323 } … … 331 329 * 332 330 * @returns See PGMDynMapGCPage. 333 * @param p PGM Pointer to the PVM instance data.331 * @param pVCpu The current CPU. 334 332 * @param GCPhys The guest physical address of the page. 335 333 * @param ppv Where to store the mapping address. 336 334 */ 337 DECLINLINE(int) pgmR0DynMapGCPageInlined(PPGM pPGM, RTGCPHYS GCPhys, void **ppv) 338 { 339 PVM pVM = PGM2VM(pPGM); 340 PPGMCPU pPGMCPU = (PPGMCPU)((uint8_t *)VMMGetCpu(pVM) + pPGM->offVCpuPGM); /* very pretty ;-) */ 341 342 STAM_PROFILE_START(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInl, a); 335 DECLINLINE(int) pgmR0DynMapGCPageInlined(PVMCPU pVCpu, RTGCPHYS GCPhys, void **ppv) 336 { 337 STAM_PROFILE_START(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapGCPageInl, a); 343 338 AssertMsg(!(GCPhys & PAGE_OFFSET_MASK), ("%RGp\n", GCPhys)); 344 339 … … 346 341 * Get the ram range. 347 342 */ 348 PPGMRAMRANGE pRam = pPGM->CTX_SUFF(pRamRanges); 349 RTGCPHYS off = GCPhys - pRam->GCPhys; 343 PVM pVM = pVCpu->CTX_SUFF(pVM); 344 PPGMRAMRANGE pRam = pVM->pgm.s.CTX_SUFF(pRamRanges); 345 RTGCPHYS off = GCPhys - pRam->GCPhys; 350 346 if (RT_UNLIKELY(off >= pRam->cb 351 347 /** @todo || page state stuff */)) 352 348 { 353 349 /* This case is not counted into StatR0DynMapGCPageInl. */ 354 STAM_COUNTER_INC(&p PGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInlRamMisses);350 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapGCPageInlRamMisses); 355 351 return PGMDynMapGCPage(pVM, GCPhys, ppv); 356 352 } 357 353 358 354 RTHCPHYS HCPhys = PGM_PAGE_GET_HCPHYS(&pRam->aPages[off >> PAGE_SHIFT]); 359 STAM_COUNTER_INC(&p PGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInlRamHits);355 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapGCPageInlRamHits); 360 356 361 357 /* 362 358 * pgmR0DynMapHCPageInlined with out stats. 363 359 */ 364 PPGMMAPSET pSet = &p PGMCPU->AutoSet;360 PPGMMAPSET pSet = &pVCpu->pgm.s.AutoSet; 365 361 Assert(!(HCPhys & PAGE_OFFSET_MASK)); 366 362 Assert(pSet->cEntries <= RT_ELEMENTS(pSet->aEntries)); … … 372 368 { 373 369 *ppv = pSet->aEntries[iEntry].pvPage; 374 STAM_COUNTER_INC(&p PGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInlHits);370 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapGCPageInlHits); 375 371 } 376 372 else 377 373 { 378 STAM_COUNTER_INC(&p PGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInlMisses);379 pgmR0DynMapHCPageCommon(p VM, pSet, HCPhys, ppv);380 } 381 382 STAM_PROFILE_STOP(&p PGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInl, a);374 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapGCPageInlMisses); 375 pgmR0DynMapHCPageCommon(pSet, HCPhys, ppv); 376 } 377 378 STAM_PROFILE_STOP(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapGCPageInl, a); 383 379 return VINF_SUCCESS; 384 380 } … … 390 386 * 391 387 * @returns See PGMDynMapGCPage. 392 * @param p PGM Pointer to the PVM instance data.388 * @param pVCpu The current CPU. 393 389 * @param HCPhys The physical address of the page. 394 390 * @param ppv Where to store the mapping address. 395 391 */ 396 DECLINLINE(int) pgmR0DynMapGCPageOffInlined(PPGM pPGM, RTGCPHYS GCPhys, void **ppv) 397 { 398 PVM pVM = PGM2VM(pPGM); 399 PPGMCPU pPGMCPU = (PPGMCPU)((uint8_t *)VMMGetCpu(pVM) + pPGM->offVCpuPGM); /* very pretty ;-) */ 400 401 STAM_PROFILE_START(&pPGMCPU->StatR0DynMapGCPageInl, a); 392 DECLINLINE(int) pgmR0DynMapGCPageOffInlined(PVMCPU pVCpu, RTGCPHYS GCPhys, void **ppv) 393 { 394 STAM_PROFILE_START(&pVCpu->pgm.s.StatR0DynMapGCPageInl, a); 402 395 403 396 /* 404 397 * Get the ram range. 405 398 */ 406 PPGMRAMRANGE pRam = pPGM->CTX_SUFF(pRamRanges); 407 RTGCPHYS off = GCPhys - pRam->GCPhys; 399 PVM pVM = pVCpu->CTX_SUFF(pVM); 400 PPGMRAMRANGE pRam = pVM->pgm.s.CTX_SUFF(pRamRanges); 401 RTGCPHYS off = GCPhys - pRam->GCPhys; 408 402 if (RT_UNLIKELY(off >= pRam->cb 409 403 /** @todo || page state stuff */)) 410 404 { 411 405 /* This case is not counted into StatR0DynMapGCPageInl. */ 412 STAM_COUNTER_INC(&p PGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInlRamMisses);406 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapGCPageInlRamMisses); 413 407 return PGMDynMapGCPageOff(pVM, GCPhys, ppv); 414 408 } 415 409 416 410 RTHCPHYS HCPhys = PGM_PAGE_GET_HCPHYS(&pRam->aPages[off >> PAGE_SHIFT]); 417 STAM_COUNTER_INC(&p PGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInlRamHits);411 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapGCPageInlRamHits); 418 412 419 413 /* 420 414 * pgmR0DynMapHCPageInlined with out stats. 421 415 */ 422 PPGMMAPSET pSet = &p PGMCPU->AutoSet;416 PPGMMAPSET pSet = &pVCpu->pgm.s.AutoSet; 423 417 Assert(!(HCPhys & PAGE_OFFSET_MASK)); 424 418 Assert(pSet->cEntries <= RT_ELEMENTS(pSet->aEntries)); … … 430 424 { 431 425 *ppv = (void *)((uintptr_t)pSet->aEntries[iEntry].pvPage | (PAGE_OFFSET_MASK & (uintptr_t)GCPhys)); 432 STAM_COUNTER_INC(&p PGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInlHits);426 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapGCPageInlHits); 433 427 } 434 428 else 435 429 { 436 STAM_COUNTER_INC(&p PGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInlMisses);437 pgmR0DynMapHCPageCommon(p VM, pSet, HCPhys, ppv);430 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapGCPageInlMisses); 431 pgmR0DynMapHCPageCommon(pSet, HCPhys, ppv); 438 432 *ppv = (void *)((uintptr_t)*ppv | (PAGE_OFFSET_MASK & (uintptr_t)GCPhys)); 439 433 } 440 434 441 STAM_PROFILE_STOP(&p PGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInl, a);435 STAM_PROFILE_STOP(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapGCPageInl, a); 442 436 return VINF_SUCCESS; 443 437 } … … 453 447 * @param pPage The page. 454 448 */ 455 DECLINLINE(void *) pgmPoolMapPageInlined(P PGM pPGM, PPGMPOOLPAGE pPage)449 DECLINLINE(void *) pgmPoolMapPageInlined(PVM pVM, PPGMPOOLPAGE pPage) 456 450 { 457 451 if (pPage->idx >= PGMPOOL_IDX_FIRST) 458 452 { 459 Assert(pPage->idx < p PGM->CTX_SUFF(pPool)->cCurPages);453 Assert(pPage->idx < pVM->pgm.s.CTX_SUFF(pPool)->cCurPages); 460 454 void *pv; 461 455 # ifdef VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 462 pgmR0DynMapHCPageInlined( pPGM, pPage->Core.Key, &pv);456 pgmR0DynMapHCPageInlined(VMMGetCpu(pVM), pPage->Core.Key, &pv); 463 457 # else 464 PGMDynMapHCPage( PGM2VM(pPGM), pPage->Core.Key, &pv);458 PGMDynMapHCPage(pVM, pPage->Core.Key, &pv); 465 459 # endif 466 460 return pv; … … 477 471 * 478 472 * @returns The address corresponding to HCPhys. 479 * @param p PGM Pointer to the PVM instance data.473 * @param pVM The VM handle. 480 474 * @param HCPhys HC Physical address of the page. 481 475 */ 482 DECLINLINE(void *) pgmDynMapHCPageOff(P PGM pPGM, RTHCPHYS HCPhys)476 DECLINLINE(void *) pgmDynMapHCPageOff(PVM pVM, RTHCPHYS HCPhys) 483 477 { 484 478 void *pv; 485 479 # ifdef VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 486 pgmR0DynMapHCPageInlined( pPGM, HCPhys & ~(RTHCPHYS)PAGE_OFFSET_MASK, &pv);480 pgmR0DynMapHCPageInlined(VMMGetCpu(pVM), HCPhys & ~(RTHCPHYS)PAGE_OFFSET_MASK, &pv); 487 481 # else 488 PGMDynMapHCPage( PGM2VM(pPGM), HCPhys & ~(RTHCPHYS)PAGE_OFFSET_MASK, &pv);482 PGMDynMapHCPage(pVM, HCPhys & ~(RTHCPHYS)PAGE_OFFSET_MASK, &pv); 489 483 # endif 490 484 pv = (void *)((uintptr_t)pv | ((uintptr_t)HCPhys & PAGE_OFFSET_MASK)); … … 617 611 { 618 612 #ifdef VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 619 int rc = pgmR0DynMapGCPageInlined( &pVCpu->CTX_SUFF(pVM)->pgm.s, pVCpu->pgm.s.GCPhysCR3, (void **)ppPd);613 int rc = pgmR0DynMapGCPageInlined(pVCpu, pVCpu->pgm.s.GCPhysCR3, (void **)ppPd); 620 614 if (RT_FAILURE(rc)) 621 615 { … … 642 636 #ifdef VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 643 637 PX86PD pGuestPD = NULL; 644 int rc = pgmR0DynMapGCPageInlined( &pVCpu->CTX_SUFF(pVM)->pgm.s, pVCpu->pgm.s.GCPhysCR3, (void **)&pGuestPD);638 int rc = pgmR0DynMapGCPageInlined(pVCpu, pVCpu->pgm.s.GCPhysCR3, (void **)&pGuestPD); 645 639 if (RT_FAILURE(rc)) 646 640 { … … 671 665 { 672 666 #ifdef VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 673 int rc = pgmR0DynMapGCPageOffInlined( &pVCpu->CTX_SUFF(pVM)->pgm.s, pVCpu->pgm.s.GCPhysCR3, (void **)ppPdpt);667 int rc = pgmR0DynMapGCPageOffInlined(pVCpu, pVCpu->pgm.s.GCPhysCR3, (void **)ppPdpt); 674 668 if (RT_FAILURE(rc)) 675 669 { … … 715 709 #ifdef VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 716 710 PX86PDPT pGuestPDPT = NULL; 717 int rc = pgmR0DynMapGCPageOffInlined( &pVCpu->CTX_SUFF(pVM)->pgm.s, pVCpu->pgm.s.GCPhysCR3, (void **)&pGuestPDPT);711 int rc = pgmR0DynMapGCPageOffInlined(pVCpu, pVCpu->pgm.s.GCPhysCR3, (void **)&pGuestPDPT); 718 712 AssertRCReturn(rc, NULL); 719 713 #else … … 751 745 #ifdef VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 752 746 PX86PDPAE pGuestPD = NULL; 753 int rc = pgmR0DynMapGCPageInlined( &pVCpu->CTX_SUFF(pVM)->pgm.s,747 int rc = pgmR0DynMapGCPageInlined(pVCpu, 754 748 pGuestPDPT->a[iPdpt].u & X86_PDPE_PG_MASK, 755 749 (void **)&pGuestPD); … … 803 797 #ifdef VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 804 798 PX86PDPAE pGuestPD = NULL; 805 int rc = pgmR0DynMapGCPageInlined( &pVCpu->CTX_SUFF(pVM)->pgm.s,799 int rc = pgmR0DynMapGCPageInlined(pVCpu, 806 800 pGuestPDPT->a[iPdpt].u & X86_PDPE_PG_MASK, 807 801 (void **)&pGuestPD); … … 834 828 { 835 829 #ifdef VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 836 int rc = pgmR0DynMapGCPageInlined( &pVCpu->CTX_SUFF(pVM)->pgm.s, pVCpu->pgm.s.GCPhysCR3, (void **)ppPml4);830 int rc = pgmR0DynMapGCPageInlined(pVCpu, pVCpu->pgm.s.GCPhysCR3, (void **)ppPml4); 837 831 if (RT_FAILURE(rc)) 838 832 { … … 876 870 #ifdef VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 877 871 PX86PML4 pGuestPml4; 878 int rc = pgmR0DynMapGCPageInlined( &pVCpu->CTX_SUFF(pVM)->pgm.s, pVCpu->pgm.s.GCPhysCR3, (void **)&pGuestPml4);872 int rc = pgmR0DynMapGCPageInlined(pVCpu, pVCpu->pgm.s.GCPhysCR3, (void **)&pGuestPml4); 879 873 AssertRCReturn(rc, NULL); 880 874 #else … … 998 992 DECLINLINE(PX86PD) pgmShwGet32BitPDPtr(PVMCPU pVCpu) 999 993 { 1000 return (PX86PD)PGMPOOL_PAGE_2_PTR (pVCpu->CTX_SUFF(pVM), pVCpu->pgm.s.CTX_SUFF(pShwPageCR3));994 return (PX86PD)PGMPOOL_PAGE_2_PTR_V2(pVCpu->CTX_SUFF(pVM), pVCpu, pVCpu->pgm.s.CTX_SUFF(pShwPageCR3)); 1001 995 } 1002 996 … … 1049 1043 DECLINLINE(PX86PDPT) pgmShwGetPaePDPTPtr(PVMCPU pVCpu) 1050 1044 { 1051 return (PX86PDPT)PGMPOOL_PAGE_2_PTR (pVCpu->CTX_SUFF(pVM), pVCpu->pgm.s.CTX_SUFF(pShwPageCR3));1045 return (PX86PDPT)PGMPOOL_PAGE_2_PTR_V2(pVCpu->CTX_SUFF(pVM), pVCpu, pVCpu->pgm.s.CTX_SUFF(pShwPageCR3)); 1052 1046 } 1053 1047 … … 1073 1067 AssertReturn(pShwPde, NULL); 1074 1068 1075 return (PX86PDPAE)PGMPOOL_PAGE_2_PTR (pVM, pShwPde);1069 return (PX86PDPAE)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPde); 1076 1070 } 1077 1071 … … 1096 1090 AssertReturn(pShwPde, NULL); 1097 1091 1098 return (PX86PDPAE)PGMPOOL_PAGE_2_PTR (pVM, pShwPde);1092 return (PX86PDPAE)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPde); 1099 1093 } 1100 1094 … … 1148 1142 DECLINLINE(PX86PML4) pgmShwGetLongModePML4Ptr(PVMCPU pVCpu) 1149 1143 { 1150 return (PX86PML4)PGMPOOL_PAGE_2_PTR (pVCpu->CTX_SUFF(pVM), pVCpu->pgm.s.CTX_SUFF(pShwPageCR3));1144 return (PX86PML4)PGMPOOL_PAGE_2_PTR_V2(pVCpu->CTX_SUFF(pVM), pVCpu, pVCpu->pgm.s.CTX_SUFF(pShwPageCR3)); 1151 1145 } 1152 1146 -
trunk/src/VBox/VMM/PGMInternal.h
r31167 r31170 241 241 #elif defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0) 242 242 # define PGM_HCPHYS_2_PTR(pVM, HCPhys, ppv) \ 243 pgmR0DynMapHCPageInlined( &(pVM)->pgm.s, HCPhys, (void **)(ppv))243 pgmR0DynMapHCPageInlined(VMMGetCpu(pVM), HCPhys, (void **)(ppv)) 244 244 #else 245 245 # define PGM_HCPHYS_2_PTR(pVM, HCPhys, ppv) \ … … 264 264 #elif defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0) 265 265 # define PGM_GCPHYS_2_PTR(pVM, GCPhys, ppv) \ 266 pgmR0DynMapGCPageInlined( &(pVM)->pgm.s, GCPhys, (void **)(ppv))266 pgmR0DynMapGCPageInlined(VMMGetCpu(pVM), GCPhys, (void **)(ppv)) 267 267 #else 268 268 # define PGM_GCPHYS_2_PTR(pVM, GCPhys, ppv) \ … … 284 284 #ifdef VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 285 285 # define PGM_GCPHYS_2_PTR_BY_VMCPU(pVCpu, GCPhys, ppv) \ 286 pgmR0DynMapGCPageInlined( &(pVCpu)->CTX_SUFF(pVM)->pgm.s, GCPhys, (void **)(ppv))286 pgmR0DynMapGCPageInlined(pVCpu, GCPhys, (void **)(ppv)) 287 287 #else 288 288 # define PGM_GCPHYS_2_PTR_BY_VMCPU(pVCpu, GCPhys, ppv) \ 289 289 PGM_GCPHYS_2_PTR((pVCpu)->CTX_SUFF(pVM), GCPhys, ppv) 290 #endif291 292 /** @def PGM_GCPHYS_2_PTR_BY_PGMCPU293 * Maps a GC physical page address to a virtual address.294 *295 * @returns VBox status code.296 * @param pPGM Pointer to the PGM instance data.297 * @param GCPhys The GC physical address to map to a virtual one.298 * @param ppv Where to store the virtual address. No need to cast this.299 *300 * @remark In GC this uses PGMGCDynMapGCPage(), so it will consume of the301 * small page window employeed by that function. Be careful.302 * @remark There is no need to assert on the result.303 */304 #ifdef VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0305 # define PGM_GCPHYS_2_PTR_BY_PGMCPU(pPGM, GCPhys, ppv) \306 pgmR0DynMapGCPageInlined(PGMCPU2PGM(pPGM), GCPhys, (void **)(ppv))307 #else308 # define PGM_GCPHYS_2_PTR_BY_PGMCPU(pPGM, GCPhys, ppv) \309 PGM_GCPHYS_2_PTR(PGMCPU2VM(pPGM), GCPhys, ppv)310 290 #endif 311 291 … … 2160 2140 */ 2161 2141 #if defined(IN_RC) 2162 # define PGMPOOL_PAGE_2_PTR(pVM, pPage) pgmPoolMapPageInlined( &(pVM)->pgm.s, (pPage))2142 # define PGMPOOL_PAGE_2_PTR(pVM, pPage) pgmPoolMapPageInlined((pVM), (pPage)) 2163 2143 #elif defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0) 2164 # define PGMPOOL_PAGE_2_PTR(pVM, pPage) pgmPoolMapPageInlined( &(pVM)->pgm.s, (pPage))2144 # define PGMPOOL_PAGE_2_PTR(pVM, pPage) pgmPoolMapPageInlined((pVM), (pPage)) 2165 2145 #elif defined(VBOX_STRICT) 2166 2146 # define PGMPOOL_PAGE_2_PTR(pVM, pPage) pgmPoolMapPageStrict(pPage) … … 2172 2152 #else 2173 2153 # define PGMPOOL_PAGE_2_PTR(pVM, pPage) ((pPage)->pvPageR3) 2154 #endif 2155 2156 2157 /** @def PGMPOOL_PAGE_2_PTR_V2 2158 * Maps a pool page pool into the current context, taking both VM and VMCPU. 2159 * 2160 * @returns VBox status code. 2161 * @param pVM The VM handle. 2162 * @param pVCpu The current CPU. 2163 * @param pPage The pool page. 2164 * 2165 * @remark In RC this uses PGMGCDynMapHCPage(), so it will consume of the 2166 * small page window employeed by that function. Be careful. 2167 * @remark There is no need to assert on the result. 2168 */ 2169 #if defined(IN_RC) 2170 # define PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pPage) pgmPoolMapPageInlined((pVM), (pPage)) 2171 #elif defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0) 2172 # define PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pPage) pgmPoolMapPageInlined((pVM), (pPage)) 2173 #else 2174 # define PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pPage) PGMPOOL_PAGE_2_PTR((pVM), (pPage)) 2174 2175 #endif 2175 2176 … … 3581 3582 #endif /* IN_RING3 */ 3582 3583 #ifdef VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 3583 int pgmR0DynMapHCPageCommon(P VM pVM, PPGMMAPSET pSet, RTHCPHYS HCPhys, void **ppv);3584 int pgmR0DynMapHCPageCommon(PPGMMAPSET pSet, RTHCPHYS HCPhys, void **ppv); 3584 3585 #endif 3585 3586 int pgmPoolAllocEx(PVM pVM, RTGCPHYS GCPhys, PGMPOOLKIND enmKind, PGMPOOLACCESS enmAccess, uint16_t iUser, uint32_t iUserTable, PPPGMPOOLPAGE ppPage, bool fLockPage = false); -
trunk/src/VBox/VMM/PGMPool.cpp
r30574 r31170 637 637 if (pPage->cPresent) 638 638 { 639 void *pvShw = PGMPOOL_PAGE_2_PTR (pPool->CTX_SUFF(pVM), pPage);639 void *pvShw = PGMPOOL_PAGE_2_PTR_V2(pPool->CTX_SUFF(pVM), pVCpu, pPage); 640 640 STAM_PROFILE_START(&pPool->StatZeroPage, z); 641 641 #if 0 -
trunk/src/VBox/VMM/VMMAll/PGMAll.cpp
r31167 r31170 1001 1001 pgmPoolCacheUsed(pPool, pShwPage); 1002 1002 } 1003 *ppPD = (PX86PDPAE)PGMPOOL_PAGE_2_PTR (pVM, pShwPage);1003 *ppPD = (PX86PDPAE)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPage); 1004 1004 return VINF_SUCCESS; 1005 1005 } … … 1105 1105 1106 1106 const unsigned iPdPt = (GCPtr >> X86_PDPT_SHIFT) & X86_PDPT_MASK_AMD64; 1107 PX86PDPT pPdpt = (PX86PDPT)PGMPOOL_PAGE_2_PTR (pVM, pShwPage);1107 PX86PDPT pPdpt = (PX86PDPT)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPage); 1108 1108 PX86PDPE pPdpe = &pPdpt->a[iPdPt]; 1109 1109 … … 1142 1142 | (uGstPdpe & ~(X86_PDPE_PG_MASK | X86_PDPE_AVL_MASK | X86_PDPE_PCD | X86_PDPE_PWT)); 1143 1143 1144 *ppPD = (PX86PDPAE)PGMPOOL_PAGE_2_PTR (pVM, pShwPage);1144 *ppPD = (PX86PDPAE)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPage); 1145 1145 return VINF_SUCCESS; 1146 1146 } … … 1179 1179 1180 1180 const unsigned iPdPt = (GCPtr >> X86_PDPT_SHIFT) & X86_PDPT_MASK_AMD64; 1181 PCX86PDPT pPdpt = *ppPdpt = (PX86PDPT)PGMPOOL_PAGE_2_PTR (pVM, pShwPage);1181 PCX86PDPT pPdpt = *ppPdpt = (PX86PDPT)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPage); 1182 1182 if (!pPdpt->a[iPdPt].n.u1Present) 1183 1183 return VERR_PAGE_DIRECTORY_PTR_NOT_PRESENT; … … 1186 1186 AssertReturn(pShwPage, VERR_INTERNAL_ERROR); 1187 1187 1188 *ppPD = (PX86PDPAE)PGMPOOL_PAGE_2_PTR (pVM, pShwPage);1188 *ppPD = (PX86PDPAE)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPage); 1189 1189 return VINF_SUCCESS; 1190 1190 } … … 1214 1214 Assert(PGMIsLockOwner(pVM)); 1215 1215 1216 pPml4 = (PEPTPML4)PGMPOOL_PAGE_2_PTR (pVM, pVCpu->pgm.s.CTX_SUFF(pShwPageCR3));1216 pPml4 = (PEPTPML4)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pVCpu->pgm.s.CTX_SUFF(pShwPageCR3)); 1217 1217 Assert(pPml4); 1218 1218 … … 1242 1242 1243 1243 const unsigned iPdPt = (GCPtr >> EPT_PDPT_SHIFT) & EPT_PDPT_MASK; 1244 PEPTPDPT pPdpt = (PEPTPDPT)PGMPOOL_PAGE_2_PTR (pVM, pShwPage);1244 PEPTPDPT pPdpt = (PEPTPDPT)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPage); 1245 1245 PEPTPDPTE pPdpe = &pPdpt->a[iPdPt]; 1246 1246 … … 1270 1270 pPdpe->n.u1Execute = 1; 1271 1271 1272 *ppPD = (PEPTPD)PGMPOOL_PAGE_2_PTR (pVM, pShwPage);1272 *ppPD = (PEPTPD)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPage); 1273 1273 return VINF_SUCCESS; 1274 1274 } … … 2289 2289 //Log(("PGMDynMapGCPage: GCPhys=%RGp pPage=%R[pgmpage]\n", GCPhys, pPage)); 2290 2290 #ifdef VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 2291 rc = pgmR0DynMapHCPageInlined( &pVM->pgm.s, PGM_PAGE_GET_HCPHYS(pPage), ppv);2291 rc = pgmR0DynMapHCPageInlined(VMMGetCpu(pVM), PGM_PAGE_GET_HCPHYS(pPage), ppv); 2292 2292 #else 2293 2293 rc = PGMDynMapHCPage(pVM, PGM_PAGE_GET_HCPHYS(pPage), ppv); -
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r31167 r31170 1095 1095 Assert(pShwPde); 1096 1096 1097 pPDDst = (PX86PDPAE)PGMPOOL_PAGE_2_PTR (pVM, pShwPde);1097 pPDDst = (PX86PDPAE)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPde); 1098 1098 PX86PDEPAE pPdeDst = &pPDDst->a[iPDDst]; 1099 1099 … … 1232 1232 # if 0 /* likely cause of a major performance regression; must be SyncPageWorkerTrackDeref then */ 1233 1233 const unsigned iPTEDst = (GCPtrPage >> SHW_PT_SHIFT) & SHW_PT_MASK; 1234 PSHWPT pPT = (PSHWPT)PGMPOOL_PAGE_2_PTR (pVM, pShwPage);1234 PSHWPT pPT = (PSHWPT)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPage); 1235 1235 if (pPT->a[iPTEDst].n.u1Present) 1236 1236 { … … 1743 1743 Assert(pShwPde); 1744 1744 1745 pPDDst = (PX86PDPAE)PGMPOOL_PAGE_2_PTR (pVM, pShwPde);1745 pPDDst = (PX86PDPAE)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPde); 1746 1746 PX86PDEPAE pPdeDst = &pPDDst->a[iPDDst]; 1747 1747 … … 1820 1820 if (PdeSrc.n.u1Accessed) 1821 1821 { 1822 PSHWPT pPTDst = (PSHWPT)PGMPOOL_PAGE_2_PTR (pVM, pShwPage);1822 PSHWPT pPTDst = (PSHWPT)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPage); 1823 1823 if (!fBigPage) 1824 1824 { … … 2107 2107 2108 2108 PPGMPOOLPAGE pShwPage = pgmPoolGetPage(pPool, PdeDst.u & SHW_PDE_PG_MASK); 2109 PSHWPT pPTDst = (PSHWPT)PGMPOOL_PAGE_2_PTR (pVM, pShwPage);2109 PSHWPT pPTDst = (PSHWPT)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPage); 2110 2110 2111 2111 Assert(cPages == 1 || !(uErr & X86_TRAP_PF_P)); … … 2312 2312 if (pShwPage) 2313 2313 { 2314 PSHWPT pPTDst = (PSHWPT)PGMPOOL_PAGE_2_PTR (pVM, pShwPage);2314 PSHWPT pPTDst = (PSHWPT)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPage); 2315 2315 PSHWPTE pPteDst = &pPTDst->a[(GCPtrPage >> SHW_PT_SHIFT) & SHW_PT_MASK]; 2316 2316 if ( pPteDst->n.u1Present … … 2360 2360 if (pShwPage) 2361 2361 { 2362 PSHWPT pPTDst = (PSHWPT)PGMPOOL_PAGE_2_PTR (pVM, pShwPage);2362 PSHWPT pPTDst = (PSHWPT)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPage); 2363 2363 PSHWPTE pPteDst = &pPTDst->a[(GCPtrPage >> SHW_PT_SHIFT) & SHW_PT_MASK]; 2364 2364 if (pPteDst->n.u1Present) /** @todo Optimize accessed bit emulation? */ … … 2497 2497 Assert(pShwPde); 2498 2498 2499 pPDDst = (PX86PDPAE)PGMPOOL_PAGE_2_PTR (pVM, pShwPde);2499 pPDDst = (PX86PDPAE)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPde); 2500 2500 pPdeDst = &pPDDst->a[iPDDst]; 2501 2501 … … 2612 2612 } 2613 2613 if (rc == VINF_SUCCESS) 2614 pPTDst = (PSHWPT)PGMPOOL_PAGE_2_PTR (pVM, pShwPage);2614 pPTDst = (PSHWPT)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPage); 2615 2615 else if (rc == VINF_PGM_CACHED_PAGE) 2616 2616 { … … 2951 2951 Assert(pShwPde); 2952 2952 2953 pPDDst = (PX86PDPAE)PGMPOOL_PAGE_2_PTR (pVM, pShwPde);2953 pPDDst = (PX86PDPAE)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPde); 2954 2954 pPdeDst = &pPDDst->a[iPDDst]; 2955 2955 … … 3081 3081 if ( rc == VINF_SUCCESS 3082 3082 || rc == VINF_PGM_CACHED_PAGE) 3083 pPTDst = (PSHWPT)PGMPOOL_PAGE_2_PTR (pVM, pShwPage);3083 pPTDst = (PSHWPT)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPage); 3084 3084 else 3085 3085 AssertMsgFailedReturn(("rc=%Rrc\n", rc), VERR_INTERNAL_ERROR); … … 3821 3821 continue; 3822 3822 } 3823 const SHWPT *pPTDst = (const SHWPT *)PGMPOOL_PAGE_2_PTR (pVM, pPoolPage);3823 const SHWPT *pPTDst = (const SHWPT *)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pPoolPage); 3824 3824 3825 3825 if (PdeDst.u & (X86_PDE4M_PWT | X86_PDE4M_PCD)) -
trunk/src/VBox/VMM/VMMAll/PGMAllMap.cpp
r31167 r31170 426 426 case PGMMODE_32_BIT: 427 427 { 428 PX86PD pShw32BitPd = (PX86PD)PGMPOOL_PAGE_2_PTR (pVM, pShwPageCR3);428 PX86PD pShw32BitPd = (PX86PD)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPageCR3); 429 429 AssertFatal(pShw32BitPd); 430 430 … … 439 439 const unsigned iPdpt = iOldPDE / 256; /* iOldPDE * 2 / 512; iOldPDE is in 4 MB pages */ 440 440 unsigned iPaePde = iOldPDE * 2 % 512; 441 PX86PDPT pShwPdpt = (PX86PDPT)PGMPOOL_PAGE_2_PTR (pVM, pShwPageCR3);441 PX86PDPT pShwPdpt = (PX86PDPT)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPageCR3); 442 442 PX86PDPAE pShwPaePd = pgmShwGetPaePDPtr(pVCpu, pShwPdpt, (iPdpt << X86_PDPT_SHIFT)); 443 443 … … 538 538 case PGMMODE_32_BIT: 539 539 { 540 PCX86PD pShw32BitPd = (PCX86PD)PGMPOOL_PAGE_2_PTR (pVM, pShwPageCR3);540 PCX86PD pShw32BitPd = (PCX86PD)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu2, pShwPageCR3); 541 541 AssertFatal(pShw32BitPd); 542 542 … … 553 553 const unsigned iPdpt = iPDE / 256; /* iPDE * 2 / 512; iPDE is in 4 MB pages */ 554 554 unsigned iPaePDE = iPDE * 2 % 512; 555 PX86PDPT pShwPdpt = (PX86PDPT)PGMPOOL_PAGE_2_PTR (pVM, pShwPageCR3);555 PX86PDPT pShwPdpt = (PX86PDPT)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPageCR3); 556 556 PCX86PDPAE pShwPaePd = pgmShwGetPaePDPtr(pVCpu, pShwPdpt, iPdpt << X86_PDPT_SHIFT); 557 557 AssertFatal(pShwPaePd); -
trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp
r31136 r31170 749 749 * Map it by HCPhys. 750 750 */ 751 return pgmR0DynMapHCPageInlined( &pVM->pgm.s, HCPhys, ppv);751 return pgmR0DynMapHCPageInlined(VMMGetCpu(pVM), HCPhys, ppv); 752 752 753 753 #else … … 826 826 Assert(HCPhys != pVM->pgm.s.HCPhysZeroPg); 827 827 # ifdef VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 828 pgmR0DynMapHCPageInlined( &pVM->pgm.s, HCPhys, ppv);828 pgmR0DynMapHCPageInlined(VMMGetCpu(pVM), HCPhys, ppv); 829 829 # else 830 830 PGMDynMapHCPage(pVM, HCPhys, ppv); … … 1163 1163 */ 1164 1164 #if defined(IN_RC) || defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0) 1165 *ppv = pgmDynMapHCPageOff( &pVM->pgm.s, PGM_PAGE_GET_HCPHYS(pPage) | (GCPhys & PAGE_OFFSET_MASK));1165 *ppv = pgmDynMapHCPageOff(pVM, PGM_PAGE_GET_HCPHYS(pPage) | (GCPhys & PAGE_OFFSET_MASK)); 1166 1166 #else 1167 1167 PPGMPAGEMAPTLBE pTlbe; … … 1201 1201 */ 1202 1202 #if defined(IN_RC) || defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0) 1203 *ppv = pgmDynMapHCPageOff( &pVM->pgm.s, PGM_PAGE_GET_HCPHYS(pPage) | (GCPhys & PAGE_OFFSET_MASK)); /** @todo add a read only flag? */1203 *ppv = pgmDynMapHCPageOff(pVM, PGM_PAGE_GET_HCPHYS(pPage) | (GCPhys & PAGE_OFFSET_MASK)); /** @todo add a read only flag? */ 1204 1204 #else 1205 1205 PPGMPAGEMAPTLBE pTlbe; … … 1259 1259 if (RT_SUCCESS(rc)) 1260 1260 { 1261 *ppv = pgmDynMapHCPageOff( &pVM->pgm.s, PGM_PAGE_GET_HCPHYS(pPage) | (GCPhys & PAGE_OFFSET_MASK)); /** @todo add a read only flag? */1261 *ppv = pgmDynMapHCPageOff(pVM, PGM_PAGE_GET_HCPHYS(pPage) | (GCPhys & PAGE_OFFSET_MASK)); /** @todo add a read only flag? */ 1262 1262 # if 0 1263 1263 pLock->pvMap = 0; … … 1370 1370 else 1371 1371 { 1372 *ppv = pgmDynMapHCPageOff( &pVM->pgm.s, PGM_PAGE_GET_HCPHYS(pPage) | (GCPhys & PAGE_OFFSET_MASK)); /** @todo add a read only flag? */1372 *ppv = pgmDynMapHCPageOff(pVM, PGM_PAGE_GET_HCPHYS(pPage) | (GCPhys & PAGE_OFFSET_MASK)); /** @todo add a read only flag? */ 1373 1373 # if 0 1374 1374 pLock->pvMap = 0; -
trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
r31123 r31170 102 102 DECLINLINE(void *) PGMPOOL_PAGE_2_LOCKED_PTR(PVM pVM, PPGMPOOLPAGE pPage) 103 103 { 104 void *pv = pgmPoolMapPageInlined( &pVM->pgm.s, pPage);104 void *pv = pgmPoolMapPageInlined(pVM, pPage); 105 105 106 106 /* Make sure the dynamic mapping will not be reused. */ -
trunk/src/VBox/VMM/VMMR0/PGMR0DynMap.cpp
r31126 r31170 81 81 #endif 82 82 83 /** Converts a PGMCPUM::AutoSet pointer into a PVMCPU. */ 84 #define PGMR0DYNMAP_2_VMCPU(pSet) (RT_FROM_MEMBER(pSet, VMCPU, pgm.s.AutoSet)) 85 86 /** Converts a PGMCPUM::AutoSet pointer into a PVM. */ 87 #define PGMR0DYNMAP_2_VM(pSet) (PGMR0DYNMAP_2_VMCPU(pSet)->CTX_SUFF(pVM)) 88 83 89 84 90 /******************************************************************************* … … 1179 1185 * @param HCPhys The address of the page to be mapped. 1180 1186 * @param iPage The page index pgmR0DynMapPage hashed HCPhys to. 1181 * @param pVM The shared VM structure, for statistics only. 1182 */ 1183 static uint32_t pgmR0DynMapPageSlow(PPGMR0DYNMAP pThis, RTHCPHYS HCPhys, uint32_t iPage, PVM pVM) 1187 */ 1188 static uint32_t pgmR0DynMapPageSlow(PPGMR0DYNMAP pThis, RTHCPHYS HCPhys, uint32_t iPage) 1184 1189 { 1185 1190 #ifdef VBOX_WITH_STATISTICS 1186 PVMCPU pVCpu = VMMGetCpu(pVM);1191 PVMCPU pVCpu = PGMR0DYNMAP_2_VMCPU(pThis); 1187 1192 #endif 1188 1193 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapPageSlow); … … 1280 1285 * @param HCPhys The address of the page to be mapped. 1281 1286 * @param iRealCpu The real cpu set index. (optimization) 1282 * @param pVM The shared VM structure, for statistics only.1283 1287 * @param ppvPage Where to the page address. 1284 1288 */ 1285 DECLINLINE(uint32_t) pgmR0DynMapPage(PPGMR0DYNMAP pThis, RTHCPHYS HCPhys, int32_t iRealCpu, PVM pVM,void **ppvPage)1289 DECLINLINE(uint32_t) pgmR0DynMapPage(PPGMR0DYNMAP pThis, RTHCPHYS HCPhys, int32_t iRealCpu, void **ppvPage) 1286 1290 { 1287 1291 #ifdef VBOX_WITH_STATISTICS 1288 PVMCPU pVCpu = VMMGetCpu(pVM);1292 PVMCPU pVCpu = PGMR0DYNMAP_2_VMCPU(pThis); 1289 1293 #endif 1290 1294 RTSPINLOCKTMP Tmp = RTSPINLOCKTMP_INITIALIZER; … … 1324 1328 else 1325 1329 { 1326 iPage = pgmR0DynMapPageSlow(pThis, HCPhys, iPage , pVM);1330 iPage = pgmR0DynMapPageSlow(pThis, HCPhys, iPage); 1327 1331 if (RT_UNLIKELY(iPage == UINT32_MAX)) 1328 1332 { … … 1829 1833 * 1830 1834 * @returns VINF_SUCCESS, bails out to ring-3 on failure. 1831 * @param pVM The shared VM structure (for statistics).1832 1835 * @param pSet The set. 1833 1836 * @param HCPhys The physical address of the page. … … 1836 1839 * @remarks This is a very hot path. 1837 1840 */ 1838 int pgmR0DynMapHCPageCommon(PVM pVM, PPGMMAPSET pSet, RTHCPHYS HCPhys, void **ppv) 1839 { 1840 LogFlow(("pgmR0DynMapHCPageCommon: pVM=%p pSet=%p HCPhys=%RHp ppv=%p\n", 1841 pVM, pSet, HCPhys, ppv)); 1841 int pgmR0DynMapHCPageCommon(PPGMMAPSET pSet, RTHCPHYS HCPhys, void **ppv) 1842 { 1843 LogFlow(("pgmR0DynMapHCPageCommon: pSet=%p HCPhys=%RHp ppv=%p\n", pSet, HCPhys, ppv)); 1842 1844 #ifdef VBOX_WITH_STATISTICS 1843 PVMCPU pVCpu = VMMGetCpu(pVM);1845 PVMCPU pVCpu = PGMR0DYNMAP_2_VMCPU(pSet); 1844 1846 #endif 1845 1847 AssertMsg(pSet->iCpu == RTMpCpuIdToSetIndex(RTMpCpuId()), ("%d %d(%d) efl=%#x\n", pSet->iCpu, RTMpCpuIdToSetIndex(RTMpCpuId()), RTMpCpuId(), ASMGetFlags())); … … 1849 1851 */ 1850 1852 void *pvPage; 1851 uint32_t const iPage = pgmR0DynMapPage(g_pPGMR0DynMap, HCPhys, pSet->iCpu, pVM,&pvPage);1853 uint32_t const iPage = pgmR0DynMapPage(g_pPGMR0DynMap, HCPhys, pSet->iCpu, &pvPage); 1852 1854 if (RT_UNLIKELY(iPage == UINT32_MAX)) 1853 1855 { … … 1855 1857 g_pPGMR0DynMap->cLoad, g_pPGMR0DynMap->cMaxLoad, g_pPGMR0DynMap->cPages, g_pPGMR0DynMap->cGuardPages); 1856 1858 if (!g_fPGMR0DynMapTestRunning) 1857 VMMRZCallRing3NoCpu( pVM, VMMCALLRING3_VM_R0_ASSERTION, 0);1859 VMMRZCallRing3NoCpu(PGMR0DYNMAP_2_VM(pSet), VMMCALLRING3_VM_R0_ASSERTION, 0); 1858 1860 *ppv = NULL; 1859 1861 return VERR_PGM_DYNMAP_FAILED; … … 1951 1953 RTAssertMsg2Weak("PGMDynMapHCPage: set is full!\n"); 1952 1954 if (!g_fPGMR0DynMapTestRunning) 1953 VMMRZCallRing3NoCpu( pVM, VMMCALLRING3_VM_R0_ASSERTION, 0);1955 VMMRZCallRing3NoCpu(PGMR0DYNMAP_2_VM(pSet), VMMCALLRING3_VM_R0_ASSERTION, 0); 1954 1956 *ppv = NULL; 1955 1957 return VERR_PGM_DYNMAP_FULL_SET; … … 1987 1989 * Call common code. 1988 1990 */ 1989 int rc = pgmR0DynMapHCPageCommon(p VM, pSet, HCPhys, ppv);1991 int rc = pgmR0DynMapHCPageCommon(pSet, HCPhys, ppv); 1990 1992 1991 1993 STAM_PROFILE_STOP(&pVCpu->pgm.s.StatR0DynMapHCPage, a);
Note:
See TracChangeset
for help on using the changeset viewer.