Changeset 15226 in vbox
- Timestamp:
- Dec 10, 2008 4:25:34 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 40640
- Location:
- trunk
- Files:
-
- 2 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 -
trunk/src/VBox/VMM/VMMAll/PGMAll.cpp
r15161 r15226 1964 1964 # endif /* IN_RC */ 1965 1965 1966 1967 /**1968 * Temporarily maps one host page specified by HC physical address, returning1969 * pointer within the page.1970 *1971 * Be WARNED that the dynamic page mapping area is small, 8 pages, thus the space is1972 * reused after 8 mappings (or perhaps a few more if you score with the cache).1973 *1974 * @returns VBox status.1975 * @param pVM VM handle.1976 * @param HCPhys HC Physical address of the page.1977 * @param ppv Where to store the address corresponding to HCPhys.1978 */1979 VMMDECL(int) PGMDynMapHCPageOff(PVM pVM, RTHCPHYS HCPhys, void **ppv)1980 {1981 int rc = PGMDynMapHCPage(pVM, HCPhys & ~(RTHCPHYS)PAGE_OFFSET_MASK, ppv);1982 if (RT_SUCCESS(rc))1983 *ppv = (void *)((uintptr_t)*ppv | (HCPhys & PAGE_OFFSET_MASK));1984 return rc;1985 }1986 1987 1966 #endif /* IN_RC || VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 */ 1988 1967 #ifdef VBOX_STRICT
Note:
See TracChangeset
for help on using the changeset viewer.