Changeset 30574 in vbox
- Timestamp:
- Jul 2, 2010 12:08:45 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGMPool.cpp
r30326 r30574 849 849 { 850 850 PX86PTPAE pShwPT = (PX86PTPAE)PGMPOOL_PAGE_2_PTR(pPool->CTX_SUFF(pVM), pPage); 851 PX86PTPAE pGstPT;852 int rc = PGM_GCPHYS_2_PTR(pPool->CTX_SUFF(pVM), pPage->GCPhys, &pGstPT); AssertReleaseRC(rc);853 854 /* Check if any PTEs are out of sync. */855 for (unsigned j = 0; j < RT_ELEMENTS(pShwPT->a); j++)856 851 { 857 if (pShwPT->a[j].n.u1Present) 852 PX86PTPAE pGstPT; 853 PGMPAGEMAPLOCK LockPage; 854 int rc = PGMPhysGCPhys2CCPtrReadOnly(pVM, pPage->GCPhys, (const void **)&pGstPT, &LockPage); AssertReleaseRC(rc); 855 856 /* Check if any PTEs are out of sync. */ 857 for (unsigned j = 0; j < RT_ELEMENTS(pShwPT->a); j++) 858 858 { 859 RTHCPHYS HCPhys = NIL_RTHCPHYS; 860 rc = PGMPhysGCPhys2HCPhys(pPool->CTX_SUFF(pVM), pGstPT->a[j].u & X86_PTE_PAE_PG_MASK, &HCPhys); 861 if ( rc != VINF_SUCCESS 862 || (pShwPT->a[j].u & X86_PTE_PAE_PG_MASK) != HCPhys) 859 if (pShwPT->a[j].n.u1Present) 863 860 { 864 if (fFirstMsg) 861 RTHCPHYS HCPhys = NIL_RTHCPHYS; 862 rc = PGMPhysGCPhys2HCPhys(pPool->CTX_SUFF(pVM), pGstPT->a[j].u & X86_PTE_PAE_PG_MASK, &HCPhys); 863 if ( rc != VINF_SUCCESS 864 || (pShwPT->a[j].u & X86_PTE_PAE_PG_MASK) != HCPhys) 865 865 { 866 pCmdHlp->pfnPrintf(pCmdHlp, NULL, "Check pool page %RGp\n", pPage->GCPhys); 867 fFirstMsg = false; 866 if (fFirstMsg) 867 { 868 pCmdHlp->pfnPrintf(pCmdHlp, NULL, "Check pool page %RGp\n", pPage->GCPhys); 869 fFirstMsg = false; 870 } 871 pCmdHlp->pfnPrintf(pCmdHlp, NULL, "Mismatch HCPhys: rc=%d idx=%d guest %RX64 shw=%RX64 vs %RHp\n", rc, j, pGstPT->a[j].u, pShwPT->a[j].u, HCPhys); 868 872 } 869 pCmdHlp->pfnPrintf(pCmdHlp, NULL, "Mismatch HCPhys: rc=%d idx=%d guest %RX64 shw=%RX64 vs %RHp\n", rc, j, pGstPT->a[j].u, pShwPT->a[j].u, HCPhys); 870 } 871 else 872 if ( pShwPT->a[j].n.u1Write 873 && !pGstPT->a[j].n.u1Write) 874 { 875 if (fFirstMsg) 873 else 874 if ( pShwPT->a[j].n.u1Write 875 && !pGstPT->a[j].n.u1Write) 876 876 { 877 pCmdHlp->pfnPrintf(pCmdHlp, NULL, "Check pool page %RGp\n", pPage->GCPhys); 878 fFirstMsg = false; 877 if (fFirstMsg) 878 { 879 pCmdHlp->pfnPrintf(pCmdHlp, NULL, "Check pool page %RGp\n", pPage->GCPhys); 880 fFirstMsg = false; 881 } 882 pCmdHlp->pfnPrintf(pCmdHlp, NULL, "Mismatch r/w gst/shw: idx=%d guest %RX64 shw=%RX64 vs %RHp\n", j, pGstPT->a[j].u, pShwPT->a[j].u, HCPhys); 879 883 } 880 pCmdHlp->pfnPrintf(pCmdHlp, NULL, "Mismatch r/w gst/shw: idx=%d guest %RX64 shw=%RX64 vs %RHp\n", j, pGstPT->a[j].u, pShwPT->a[j].u, HCPhys);881 884 } 882 885 } 886 PGMPhysReleasePageMappingLock(pVM, &LockPage); 883 887 } 884 888 885 889 /* Make sure this page table can't be written to from any shadow mapping. */ 886 890 RTHCPHYS HCPhysPT = NIL_RTHCPHYS; 887 rc = PGMPhysGCPhys2HCPhys(pPool->CTX_SUFF(pVM), pPage->GCPhys, &HCPhysPT);891 int rc = PGMPhysGCPhys2HCPhys(pPool->CTX_SUFF(pVM), pPage->GCPhys, &HCPhysPT); 888 892 AssertMsgRC(rc, ("PGMPhysGCPhys2HCPhys failed with rc=%d for %RGp\n", rc, pPage->GCPhys)); 889 893 if (rc == VINF_SUCCESS)
Note:
See TracChangeset
for help on using the changeset viewer.