Changeset 15226 in vbox for trunk/include
- Timestamp:
- Dec 10, 2008 4:25:34 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/pgm.h
r14969 r15226 37 37 #include <VBox/x86.h> 38 38 #include <VBox/hwacc_vmx.h> 39 #if defined(IN_RC) || defined(VBOX_WITH_2X_4GB_ADDR_SPACE) 40 # include <iprt/err.h> 41 # include <VBox/param.h> 42 #endif 39 43 40 44 __BEGIN_DECLS … … 423 427 #define PGMPHYS_TRANSLATION_FLAG_DEFAULT 0 424 428 /** Indicates that for monitored pages with physical handlers 425 * VERR_PGM_PHYS_PAGE_RESERVED error code should be returned, 426 * so address translation routines must fallback to PGM functions for 429 * VERR_PGM_PHYS_PAGE_RESERVED error code should be returned, 430 * so address translation routines must fallback to PGM functions for 427 431 * access memory. */ 428 432 #define PGMPHYS_TRANSLATION_FLAG_CHECK_PHYS_MONITORED RT_BIT_32(0) 429 433 /** Indicates that for monitored pages with virtual handlers 430 * VERR_PGM_PHYS_PAGE_RESERVED error code should be returned, 431 * so address translation routines must fallback to PGM functions for 434 * VERR_PGM_PHYS_PAGE_RESERVED error code should be returned, 435 * so address translation routines must fallback to PGM functions for 432 436 * access memory. */ 433 437 #define PGMPHYS_TRANSLATION_FLAG_CHECK_VIRT_MONITORED RT_BIT_32(1) … … 458 462 VMMDECL(int) PGMDynMapGCPageOff(PVM pVM, RTGCPHYS GCPhys, void **ppv); 459 463 VMMDECL(int) PGMDynMapHCPage(PVM pVM, RTHCPHYS HCPhys, void **ppv); 460 VMMDECL(int) PGMDynMapHCPageOff(PVM pVM, RTHCPHYS HCPhys, void **ppv);461 464 VMMDECL(void) PGMDynMapStartAutoSet(PVMCPU pVCpu); 462 465 VMMDECL(void) PGMDynMapReleaseAutoSet(PVMCPU pVCpu); 463 466 VMMDECL(void) PGMDynMapMigrateAutoSet(PVMCPU pVCpu); 467 468 /** 469 * Temporarily maps one host page specified by HC physical address, returning 470 * pointer within the page. 471 * 472 * Be WARNED that the dynamic page mapping area is small, 8 pages, thus the space is 473 * reused after 8 mappings (or perhaps a few more if you score with the cache). 474 * 475 * @returns VBox status. 476 * @param pVM VM handle. 477 * @param HCPhys HC Physical address of the page. 478 * @param ppv Where to store the address corresponding to HCPhys. 479 */ 480 DECLINLINE(int) PGMDynMapHCPageOff(PVM pVM, RTHCPHYS HCPhys, void **ppv) 481 { 482 int rc = PGMDynMapHCPage(pVM, HCPhys & ~(RTHCPHYS)PAGE_OFFSET_MASK, ppv); 483 if (RT_SUCCESS(rc)) 484 *ppv = (void *)((uintptr_t)*ppv | (HCPhys & PAGE_OFFSET_MASK)); 485 return rc; 486 } 464 487 #endif 465 488
Note:
See TracChangeset
for help on using the changeset viewer.