Changeset 30889 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Jul 17, 2010 1:54:47 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 63735
- Location:
- trunk/src/VBox/VMM/VMMR0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/PGMR0.cpp
r30111 r30889 5 5 6 6 /* 7 * Copyright (C) 2007 Oracle Corporation7 * Copyright (C) 2007-2010 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 30 30 #include <iprt/mem.h> 31 31 32 RT_C_DECLS_BEGIN 32 33 /* 34 * Instantiate the ring-0 header/code templates. 35 */ 33 36 #define PGM_BTH_NAME(name) PGM_BTH_NAME_32BIT_PROT(name) 34 37 #include "PGMR0Bth.h" … … 46 49 #include "PGMR0Bth.h" 47 50 #undef PGM_BTH_NAME 48 49 RT_C_DECLS_END50 51 51 52 … … 162 163 } 163 164 165 164 166 /** 165 167 * Worker function for PGMR3PhysAllocateLargeHandyPage … … 186 188 return rc; 187 189 } 190 188 191 189 192 /** … … 208 211 209 212 /* AMD uses the host's paging mode; Intel has a single mode (EPT). */ 210 AssertMsg(enmShwPagingMode == PGMMODE_32_BIT || enmShwPagingMode == PGMMODE_PAE || enmShwPagingMode == PGMMODE_PAE_NX || enmShwPagingMode == PGMMODE_AMD64 || enmShwPagingMode == PGMMODE_AMD64_NX || enmShwPagingMode == PGMMODE_EPT, ("enmShwPagingMode=%d\n", enmShwPagingMode)); 213 AssertMsg( enmShwPagingMode == PGMMODE_32_BIT || enmShwPagingMode == PGMMODE_PAE || enmShwPagingMode == PGMMODE_PAE_NX 214 || enmShwPagingMode == PGMMODE_AMD64 || enmShwPagingMode == PGMMODE_AMD64_NX || enmShwPagingMode == PGMMODE_EPT, 215 ("enmShwPagingMode=%d\n", enmShwPagingMode)); 211 216 212 217 #ifdef VBOX_WITH_STATISTICS … … 253 258 * Call the worker. 254 259 * 255 * We pretend the guest is in protected mode without paging, so we can use existing code to build the256 * nested page tables.260 * Note! We pretend the guest is in protected mode without paging, so we 261 * can use existing code to build the nested page tables. 257 262 */ 258 263 bool fLockTaken = false; 259 264 switch(enmShwPagingMode) 260 265 { 261 case PGMMODE_32_BIT:262 rc = PGM_BTH_NAME_32BIT_PROT(Trap0eHandler)(pVCpu, uErr, pRegFrame, pvFault, &fLockTaken);263 break;264 case PGMMODE_PAE:265 case PGMMODE_PAE_NX:266 rc = PGM_BTH_NAME_PAE_PROT(Trap0eHandler)(pVCpu, uErr, pRegFrame, pvFault, &fLockTaken);267 break;268 case PGMMODE_AMD64:269 case PGMMODE_AMD64_NX:270 rc = PGM_BTH_NAME_AMD64_PROT(Trap0eHandler)(pVCpu, uErr, pRegFrame, pvFault, &fLockTaken);271 break;272 case PGMMODE_EPT:273 rc = PGM_BTH_NAME_EPT_PROT(Trap0eHandler)(pVCpu, uErr, pRegFrame, pvFault, &fLockTaken);274 break;275 default:276 AssertFailed();277 rc = VERR_INVALID_PARAMETER;278 break;266 case PGMMODE_32_BIT: 267 rc = PGM_BTH_NAME_32BIT_PROT(Trap0eHandler)(pVCpu, uErr, pRegFrame, pvFault, &fLockTaken); 268 break; 269 case PGMMODE_PAE: 270 case PGMMODE_PAE_NX: 271 rc = PGM_BTH_NAME_PAE_PROT(Trap0eHandler)(pVCpu, uErr, pRegFrame, pvFault, &fLockTaken); 272 break; 273 case PGMMODE_AMD64: 274 case PGMMODE_AMD64_NX: 275 rc = PGM_BTH_NAME_AMD64_PROT(Trap0eHandler)(pVCpu, uErr, pRegFrame, pvFault, &fLockTaken); 276 break; 277 case PGMMODE_EPT: 278 rc = PGM_BTH_NAME_EPT_PROT(Trap0eHandler)(pVCpu, uErr, pRegFrame, pvFault, &fLockTaken); 279 break; 280 default: 281 AssertFailed(); 282 rc = VERR_INVALID_PARAMETER; 283 break; 279 284 } 280 285 if (fLockTaken) … … 283 288 pgmUnlock(pVM); 284 289 } 290 285 291 if (rc == VINF_PGM_SYNCPAGE_MODIFIED_PDE) 286 292 rc = VINF_SUCCESS; 287 else288 293 /* Note: hack alert for difficult to reproduce problem. */ 289 if (rc == VERR_PAGE_NOT_PRESENT /* SMP only ; disassembly might fail. */290 ||rc == VERR_PAGE_TABLE_NOT_PRESENT /* seen with UNI & SMP */291 ||rc == VERR_PAGE_DIRECTORY_PTR_NOT_PRESENT /* seen with SMP */292 ||rc == VERR_PAGE_MAP_LEVEL4_NOT_PRESENT) /* precaution */294 else if ( rc == VERR_PAGE_NOT_PRESENT /* SMP only ; disassembly might fail. */ 295 || rc == VERR_PAGE_TABLE_NOT_PRESENT /* seen with UNI & SMP */ 296 || rc == VERR_PAGE_DIRECTORY_PTR_NOT_PRESENT /* seen with SMP */ 297 || rc == VERR_PAGE_MAP_LEVEL4_NOT_PRESENT) /* precaution */ 293 298 { 294 299 Log(("WARNING: Unexpected VERR_PAGE_TABLE_NOT_PRESENT (%d) for page fault at %RGp error code %x (rip=%RGv)\n", rc, pvFault, uErr, pRegFrame->rip)); 295 /* Some kind of inconsistency in the SMP case; it's safe to just execute the instruction again; not sure about single VCPU VMs though. */ 300 /* Some kind of inconsistency in the SMP case; it's safe to just execute the instruction again; not sure about 301 single VCPU VMs though. */ 296 302 rc = VINF_SUCCESS; 297 303 } -
trunk/src/VBox/VMM/VMMR0/VMMR0.cpp
r30660 r30889 1309 1309 } 1310 1310 1311 1312 1311 #ifdef LOG_ENABLED 1312 1313 1313 /** 1314 1314 * Disables flushing of the ring-0 debug log. … … 1335 1335 pVCpu->vmm.s.pR0LoggerR0->fFlushingDisabled = false; 1336 1336 } 1337 #endif 1337 1338 #endif /* LOG_ENABLED */ 1338 1339 1339 1340 /**
Note:
See TracChangeset
for help on using the changeset viewer.