Changeset 30061 in vbox
- Timestamp:
- Jun 7, 2010 9:34:15 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxGuestLib.h
r30040 r30061 560 560 VBGLR3DECL(int) VbglR3CheckSharedModules(void); 561 561 VBGLR3DECL(bool) VbglR3PageSharingIsEnabled(void); 562 VBGLR3DECL(int) VbglR3PageIsShared(RTGCPTR pPage, bool *pfShared, bool *pfReadWrite);562 VBGLR3DECL(int) VbglR3PageIsShared(RTGCPTR pPage, bool *pfShared, uint64_t *puPageFlags); 563 563 /** @} */ 564 564 -
trunk/include/VBox/VMMDev.h
r30040 r30061 1197 1197 /** Page address. */ 1198 1198 RTGCPTR GCPtrPage; 1199 /** Page flags. */ 1200 uint64_t uPageFlags; 1199 1201 /** Shared flag (out) */ 1200 1202 bool fShared; 1201 /** Read/write flag (out) */1202 bool fReadWrite;1203 1203 /** Alignment */ 1204 bool fAlignment[ 2];1204 bool fAlignment[3]; 1205 1205 } VMMDevPageIsSharedRequest; 1206 1206 -
trunk/include/VBox/pgm.h
r30050 r30061 570 570 VMMR3DECL(int) PGMR3SharedModuleUnregister(PVM pVM, char *pszModuleName, char *pszVersion, RTGCPTR GCBaseAddr, uint32_t cbModule); 571 571 VMMR3DECL(int) PGMR3SharedModuleCheckAll(PVM pVM); 572 VMMR3DECL(int) PGMR3SharedModuleGetPageState(PVM pVM, RTGCPTR GCPtrPage, bool *pfShared, bool *pfReadWrite);572 VMMR3DECL(int) PGMR3SharedModuleGetPageState(PVM pVM, RTGCPTR GCPtrPage, bool *pfShared, uint64_t *puPageFlags); 573 573 /** @} */ 574 574 -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibModule.cpp
r30040 r30061 149 149 * @returns true/false enabled/disabled 150 150 */ 151 VBGLR3DECL(int) VbglR3PageIsShared(RTGCPTR pPage, bool *pfShared, bool *pfReadWrite)151 VBGLR3DECL(int) VbglR3PageIsShared(RTGCPTR pPage, bool *pfShared, uint64_t *puPageFlags) 152 152 { 153 153 #ifdef DEBUG … … 160 160 { 161 161 *pfShared = Req.fShared; 162 *p fReadWrite = Req.fReadWrite;162 *puPageFlags = Req.uPageFlags; 163 163 } 164 164 return rc; -
trunk/src/VBox/Devices/VMMDev/VMMDev.cpp
r30041 r30061 1847 1847 1848 1848 if (pRequestHeader->size != sizeof(VMMDevPageIsSharedRequest)) 1849 pRequestHeader->rc = VERR_INVALID_PARAMETER; 1850 else 1851 pRequestHeader->rc = PGMR3SharedModuleGetPageState(PDMDevHlpGetVM(pDevIns), pReq->GCPtrPage, &pReq->fShared, &pReq->fReadWrite); 1849 { 1850 pRequestHeader->rc = VERR_INVALID_PARAMETER; 1851 } 1852 else 1853 { 1854 pRequestHeader->rc = PGMR3SharedModuleGetPageState(PDMDevHlpGetVM(pDevIns), pReq->GCPtrPage, &pReq->fShared, &pReq->uPageFlags); 1855 } 1852 1856 # else 1853 1857 pRequestHeader->rc = VERR_NOT_IMPLEMENTED; -
trunk/src/VBox/VMM/PGMSharedPage.cpp
r30041 r30061 184 184 * @param GCPtrPage Page address 185 185 * @param pfShared Shared status (out) 186 * @param p fReadWrite Read/write status (out)187 */ 188 VMMR3DECL(int) PGMR3SharedModuleGetPageState(PVM pVM, RTGCPTR GCPtrPage, bool *pfShared, bool *pfReadWrite)186 * @param puPageFlags Page flags (out) 187 */ 188 VMMR3DECL(int) PGMR3SharedModuleGetPageState(PVM pVM, RTGCPTR GCPtrPage, bool *pfShared, uint64_t *puPageFlags) 189 189 { 190 190 #if defined(VBOX_WITH_PAGE_SHARING) && defined(DEBUG) … … 196 196 197 197 int rc = PGMGstGetPage(VMMGetCpu(pVM), GCPtrPage, &fFlags, &GCPhys); 198 if (rc == VINF_SUCCESS) 198 switch (rc) 199 { 200 case VINF_SUCCESS: 199 201 { 200 202 PPGMPAGE pPage = pgmPhysGetPage(&pVM->pgm.s, GCPhys); … … 202 204 { 203 205 *pfShared = PGM_PAGE_IS_SHARED(pPage); 204 *p fReadWrite = !!(fFlags & X86_PTE_RW);206 *puPageFlags = fFlags; 205 207 } 206 208 else 207 209 rc = VERR_PGM_INVALID_GC_PHYSICAL_ADDRESS; 210 break; 211 } 212 case VERR_PAGE_NOT_PRESENT: 213 case VERR_PAGE_TABLE_NOT_PRESENT: 214 case VERR_PAGE_MAP_LEVEL4_NOT_PRESENT: 215 case VERR_PAGE_DIRECTORY_PTR_NOT_PRESENT: 216 *pfShared = false; 217 *puPageFlags = 0; 218 rc = VINF_SUCCESS; 219 break; 220 221 default: 222 break; 208 223 } 209 224
Note:
See TracChangeset
for help on using the changeset viewer.