Changeset 25245 in vbox for trunk/src/VBox
- Timestamp:
- Dec 8, 2009 1:53:59 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r24978 r25245 538 538 { 539 539 /* Check by physical address. */ 540 PPGMVIRTHANDLER pCur;541 540 unsigned iPage; 542 541 rc = pgmHandlerVirtualFindByPhysAddr(pVM, GCPhys + (pvFault & PAGE_OFFSET_MASK), … … 682 681 683 682 # if defined(LOG_ENABLED) && !defined(IN_RING0) 684 RTGCPHYS GCPhys ;685 uint64_t fPageGst ;686 PGMGstGetPage(pVCpu, pvFault, &fPageGst , &GCPhys);687 Log(("Page out of sync: %RGv eip=%08x PdeSrc.n.u1User=%d fPageGst =%08llx GCPhys=%RGp scan=%d\n",688 pvFault, pRegFrame->eip, PdeSrc.n.u1User, fPageGst , GCPhys, CSAMDoesPageNeedScanning(pVM, (RTRCPTR)pRegFrame->eip)));683 RTGCPHYS GCPhys2; 684 uint64_t fPageGst2; 685 PGMGstGetPage(pVCpu, pvFault, &fPageGst2, &GCPhys2); 686 Log(("Page out of sync: %RGv eip=%08x PdeSrc.n.u1User=%d fPageGst2=%08llx GCPhys2=%RGp scan=%d\n", 687 pvFault, pRegFrame->eip, PdeSrc.n.u1User, fPageGst2, GCPhys2, CSAMDoesPageNeedScanning(pVM, (RTRCPTR)pRegFrame->eip))); 689 688 # endif /* LOG_ENABLED */ 690 689 … … 845 844 # endif 846 845 # ifdef VBOX_STRICT 847 RTGCPHYS GCPhys ;846 RTGCPHYS GCPhys2; 848 847 uint64_t fPageGst; 849 848 if (!HWACCMIsNestedPagingActive(pVM)) 850 849 { 851 rc = PGMGstGetPage(pVCpu, pvFault, &fPageGst, &GCPhys );850 rc = PGMGstGetPage(pVCpu, pvFault, &fPageGst, &GCPhys2); 852 851 AssertMsg(RT_SUCCESS(rc) && (fPageGst & X86_PTE_RW), ("rc=%d fPageGst=%RX64\n")); 853 LogFlow(("Obsolete physical monitor page out of sync %RGv - phys %RGp flags=%08llx\n", pvFault, GCPhys , (uint64_t)fPageGst));852 LogFlow(("Obsolete physical monitor page out of sync %RGv - phys %RGp flags=%08llx\n", pvFault, GCPhys2, (uint64_t)fPageGst)); 854 853 } 855 854 uint64_t fPageShw; … … 1717 1716 1718 1717 /* Fetch the pgm pool shadow descriptor. */ 1719 int rc = pgmShwGetPaePoolPagePD(&pVCpu->pgm.s, GCPtrPage, &pShwPde);1720 AssertRCSuccessReturn(rc , rc);1718 int rc2 = pgmShwGetPaePoolPagePD(&pVCpu->pgm.s, GCPtrPage, &pShwPde); 1719 AssertRCSuccessReturn(rc2, rc2); 1721 1720 Assert(pShwPde); 1722 1721 … … 1730 1729 PX86PDPT pPdptDst = NULL; /* initialized to shut up gcc */ 1731 1730 1732 int rc = pgmShwGetLongModePDPtr(pVCpu, GCPtrPage, NULL, &pPdptDst, &pPDDst);1733 AssertRCSuccessReturn(rc , rc);1731 int rc2 = pgmShwGetLongModePDPtr(pVCpu, GCPtrPage, NULL, &pPdptDst, &pPDDst); 1732 AssertRCSuccessReturn(rc2, rc2); 1734 1733 Assert(pPDDst && pPdptDst); 1735 1734 PX86PDEPAE pPdeDst = &pPDDst->a[iPDDst]; … … 1771 1770 # if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT 1772 1771 /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. */ 1773 GCPhys |= (iPDDst & 1) * (PAGE_SIZE /2);1772 GCPhys |= (iPDDst & 1) * (PAGE_SIZE / 2); 1774 1773 # endif 1775 1774 } … … 1894 1893 */ 1895 1894 /* Calculate the GC physical address of this 4KB shadow page. */ 1896 RTGCPHYSGCPhys = GST_GET_PDE_BIG_PG_GCPHYS(PdeSrc) | (GCPtrPage & GST_BIG_PAGE_OFFSET_MASK);1895 GCPhys = GST_GET_PDE_BIG_PG_GCPHYS(PdeSrc) | (GCPtrPage & GST_BIG_PAGE_OFFSET_MASK); 1897 1896 /* Find ram range. */ 1898 1897 PPGMPAGE pPage; … … 2500 2499 * Map the guest page table. 2501 2500 */ 2502 PGSTPT pPTSrc ;2503 rc = PGM_GCPHYS_2_PTR(pVM, pPdeSrc->u & GST_PDE_PG_MASK, &pPTSrc );2501 PGSTPT pPTSrc2; 2502 rc = PGM_GCPHYS_2_PTR(pVM, pPdeSrc->u & GST_PDE_PG_MASK, &pPTSrc2); 2504 2503 if (RT_SUCCESS(rc)) 2505 2504 { 2506 PGSTPTE pPteSrc = &pPTSrc ->a[(GCPtrPage >> GST_PT_SHIFT) & GST_PT_MASK];2505 PGSTPTE pPteSrc = &pPTSrc2->a[(GCPtrPage >> GST_PT_SHIFT) & GST_PT_MASK]; 2507 2506 const GSTPTE PteSrc = *pPteSrc; 2508 2507 if (pPteSrc->n.u1Present) … … 2612 2611 Assert(pMapping); 2613 2612 # if PGM_GST_TYPE == PGM_TYPE_32BIT 2614 intrc = pgmR3SyncPTResolveConflict(pVM, pMapping, pPDSrc, GCPtrPage & (GST_PD_MASK << GST_PD_SHIFT));2613 rc = pgmR3SyncPTResolveConflict(pVM, pMapping, pPDSrc, GCPtrPage & (GST_PD_MASK << GST_PD_SHIFT)); 2615 2614 # elif PGM_GST_TYPE == PGM_TYPE_PAE 2616 intrc = pgmR3SyncPTResolveConflictPAE(pVM, pMapping, GCPtrPage & (GST_PD_MASK << GST_PD_SHIFT));2615 rc = pgmR3SyncPTResolveConflictPAE(pVM, pMapping, GCPtrPage & (GST_PD_MASK << GST_PD_SHIFT)); 2617 2616 # else 2618 2617 AssertFailed(); /* can't happen for amd64 */ … … 3129 3128 * PD and PDE in the processes. 3130 3129 */ 3131 int rc 3130 int rc = VINF_SUCCESS; 3132 3131 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) 3133 3132 # if PGM_GST_TYPE == PGM_TYPE_32BIT … … 3178 3177 PdpeSrc.u = X86_PDPE_P; /* rw/us are reserved for PAE pdpte's; accessed bit causes invalid VT-x guest state errors */ 3179 3178 # endif 3180 intrc = pgmShwSyncPaePDPtr(pVCpu, GCPtrPage, &PdpeSrc, &pPDDst);3179 rc = pgmShwSyncPaePDPtr(pVCpu, GCPtrPage, &PdpeSrc, &pPDDst); 3181 3180 if (rc != VINF_SUCCESS) 3182 3181 { … … 3204 3203 # endif 3205 3204 3206 intrc = pgmShwSyncLongModePDPtr(pVCpu, GCPtrPage, pPml4eSrc, &PdpeSrc, &pPDDst);3205 rc = pgmShwSyncLongModePDPtr(pVCpu, GCPtrPage, pPml4eSrc, &PdpeSrc, &pPDDst); 3207 3206 if (rc != VINF_SUCCESS) 3208 3207 { … … 3703 3702 PX86PDPT pPdptDst = pgmShwGetPaePDPTPtr(&pVCpu->pgm.s); 3704 3703 # else 3705 PX86PML4E pPml4eSrc ;3704 PX86PML4E pPml4eSrcIgn; 3706 3705 X86PDPE PdpeSrc; 3707 3706 PX86PDPT pPdptDst; 3708 3707 PX86PDPAE pPDDst; 3709 PGSTPD pPDSrc = pgmGstGetLongModePDPtr(&pVCpu->pgm.s, GCPtr, &pPml4eSrc , &PdpeSrc, &iPDSrc);3708 PGSTPD pPDSrc = pgmGstGetLongModePDPtr(&pVCpu->pgm.s, GCPtr, &pPml4eSrcIgn, &PdpeSrc, &iPDSrc); 3710 3709 3711 3710 rc = pgmShwGetLongModePDPtr(pVCpu, GCPtr, NULL, &pPdptDst, &pPDDst); … … 4326 4325 RTHCPHYS HCPhysGuestCR3; 4327 4326 pgmLock(pVM); 4328 PPGMPAGE pPage = pgmPhysGetPage(&pVM->pgm.s, GCPhysCR3);4329 AssertReturn(pPage , VERR_INTERNAL_ERROR_2);4330 HCPhysGuestCR3 = PGM_PAGE_GET_HCPHYS(pPage );4327 PPGMPAGE pPageCR3 = pgmPhysGetPage(&pVM->pgm.s, GCPhysCR3); 4328 AssertReturn(pPageCR3, VERR_INTERNAL_ERROR_2); 4329 HCPhysGuestCR3 = PGM_PAGE_GET_HCPHYS(pPageCR3); 4331 4330 /** @todo this needs some reworking wrt. locking. */ 4332 4331 # if defined(IN_RC) || defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0) … … 4334 4333 int rc = VINF_SUCCESS; 4335 4334 # else 4336 int rc = pgmPhysGCPhys2CCPtrInternal(pVM, pPage , GCPhysCR3 & GST_CR3_PAGE_MASK, (void **)&HCPtrGuestCR3); /** @todo r=bird: This GCPhysCR3 masking isn't necessary. */4335 int rc = pgmPhysGCPhys2CCPtrInternal(pVM, pPageCR3, GCPhysCR3 & GST_CR3_PAGE_MASK, (void **)&HCPtrGuestCR3); /** @todo r=bird: This GCPhysCR3 masking isn't necessary. */ 4337 4336 # endif 4338 4337 pgmUnlock(pVM);
Note:
See TracChangeset
for help on using the changeset viewer.