- Timestamp:
- Apr 20, 2007 2:07:09 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r2274 r2276 2403 2403 LogFlow(("VerifyAccessSyncPage: GCPtrPage=%VGv fPage=%#x uErr=%#x\n", GCPtrPage, fPage, uErr)); 2404 2404 2405 #if PGM_GST_TYPE == PGM_TYPE_32BIT2405 #if (PGM_GST_TYPE == PGM_TYPE_32BIT || PGM_GST_TYPE == PGM_TYPE_REAL || PGM_GST_TYPE == PGM_TYPE_PROT) && PGM_SHW_TYPE != PGM_TYPE_AMD64 2406 2406 2407 2407 # if PGM_SHW_TYPE != PGM_TYPE_32BIT && PGM_SHW_TYPE != PGM_TYPE_PAE … … 2427 2427 int rc = VINF_SUCCESS; 2428 2428 2429 # ifdef PGM_SYNC_DIRTY_BIT 2430 /* 2431 * First check if the page fault was caused by dirty bit tracking 2432 */ 2433 # if PGM_SHW_TYPE == PGM_TYPE_32BIT 2429 /* 2430 * First check if the shadow pd is present. 2431 */ 2432 # if PGM_SHW_TYPE == PGM_TYPE_32BIT 2434 2433 PX86PDE pPdeDst = &pVM->pgm.s.CTXMID(p,32BitPD)->a[GCPtrPage >> X86_PD_SHIFT]; 2435 # 2434 # else 2436 2435 PX86PDEPAE pPdeDst = &pVM->pgm.s.CTXMID(ap,PaePDs)[0]->a[GCPtrPage >> X86_PD_PAE_SHIFT]; 2437 # endif 2436 # endif 2437 if (!pPdeDst->n.u1Present) 2438 { 2439 rc = PGM_BTH_NAME(SyncPT)(pVM, iPDSrc, pPDSrc, GCPtrPage); 2440 AssertRC(rc); 2441 if (rc != VINF_SUCCESS) 2442 return rc; 2443 } 2444 2445 # if PGM_WITH_PAGING(PGM_GST_TYPE) 2446 /* Check for dirty bit fault */ 2438 2447 rc = PGM_BTH_NAME(CheckPageFault)(pVM, uErr, pPdeDst, &pPDSrc->a[iPDSrc], GCPtrPage); 2439 2448 if (rc == VINF_PGM_HANDLED_DIRTY_BIT_FAULT) 2440 2449 Log(("PGMVerifyAccess: success (dirty)\n")); 2441 2450 else 2442 # endif /* PGM_SYNC_DIRTY_BIT */ 2443 { 2451 { 2452 VBOXPDE PdeSrc = pPDSrc->a[iPDSrc]; 2453 #else 2454 { 2455 VBOXPDE PdeSrc; 2456 PdeSrc.au32[0] = 0; /* faked so we don't have to #ifdef everything */ 2457 PdeSrc.n.u1Present = 1; 2458 PdeSrc.n.u1Write = 1; 2459 PdeSrc.n.u1Accessed = 1; 2460 PdeSrc.n.u1User = 1; 2461 2462 #endif /* PGM_WITH_PAGING(PGM_GST_TYPE) */ 2444 2463 Assert(rc != VINF_EM_RAW_GUEST_TRAP); 2445 2464 if (uErr & X86_TRAP_PF_US) … … 2448 2467 STAM_COUNTER_INC(&pVM->pgm.s.StatGCPageOutOfSyncSupervisor); 2449 2468 2450 rc = PGM_BTH_NAME(SyncPage)(pVM, pPDSrc->a[iPDSrc], GCPtrPage, 1, 0);2469 rc = PGM_BTH_NAME(SyncPage)(pVM, PdeSrc, GCPtrPage, 1, 0); 2451 2470 if (VBOX_SUCCESS(rc)) 2452 2471 { … … 2461 2480 } 2462 2481 } 2463 return rc;2464 2465 #elif PGM_GST_TYPE == PGM_TYPE_REAL || PGM_GST_TYPE == PGM_TYPE_PROT2466 2467 VBOXPDE PdeSrc;2468 PdeSrc.au32[0] = 0; /* faked so we don't have to #ifdef everything */2469 PdeSrc.n.u1Present = 1;2470 PdeSrc.n.u1Write = 1;2471 PdeSrc.n.u1Accessed = 1;2472 PdeSrc.n.u1User = 1;2473 2474 int rc = PGM_BTH_NAME(SyncPage)(pVM, PdeSrc, GCPtrPage, 1, 0);2475 AssertRC(rc);2476 2477 /* Everything is allowed */2478 2482 return rc; 2479 2483
Note:
See TracChangeset
for help on using the changeset viewer.