VirtualBox

Changeset 10364 in vbox


Ignore:
Timestamp:
Jul 8, 2008 1:09:13 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
33001
Message:

Cleaned up

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp

    r10363 r10364  
    248248{
    249249    Assert(pPage->iMonitoredPrev == NIL_PGMPOOL_IDX);
    250     const unsigned off = GCPhysFault & PAGE_OFFSET_MASK;
    251 
    252     LogFlow(("pgmPoolMonitorChainChanging: %VGv phys=%VGp kind=%d\n", pvAddress, GCPhysFault, pPage->enmKind));
     250    const unsigned off     = GCPhysFault & PAGE_OFFSET_MASK;
     251    const unsigned cbWrite = pgmPoolDisasWriteSize(pCpu);
     252
     253    LogFlow(("pgmPoolMonitorChainChanging: %VGv phys=%VGp kind=%d cbWrite=%d\n", pvAddress, GCPhysFault, pPage->enmKind, cbWrite));
    253254
    254255    for (;;)
     
    322323                if (   pCpu
    323324                    && (off & 7)
    324                     && (off & 7) + pgmPoolDisasWriteSize(pCpu) > sizeof(X86PTEPAE))
     325                    && (off & 7) + cbWrite > sizeof(X86PTEPAE))
    325326                {
    326                     const unsigned iShw2 = (off + pgmPoolDisasWriteSize(pCpu) - 1) / sizeof(X86PTEPAE);
     327                    const unsigned iShw2 = (off + cbWrite - 1) / sizeof(X86PTEPAE);
    327328                    AssertReturnVoid(iShw2 < ELEMENTS(uShw.pPTPae->a));
    328329
     
    352353                else if (   pCpu
    353354                         && (off & 3)
    354                          && (off & 3) + pgmPoolDisasWriteSize(pCpu) > sizeof(X86PTE))
     355                         && (off & 3) + cbWrite > sizeof(X86PTE))
    355356                {
    356                     const unsigned iShw2 = (off + pgmPoolDisasWriteSize(pCpu) - 1) / sizeof(X86PTE);
     357                    const unsigned iShw2 = (off + cbWrite - 1) / sizeof(X86PTE);
    357358                    if (    iShw2 != iShw
    358359                        &&  iShw2 < ELEMENTS(uShw.pPD->a)
     
    393394                    else if (   pCpu
    394395                             && (off & 3)
    395                              && (off & 3) + pgmPoolDisasWriteSize(pCpu) > 4)
     396                             && (off & 3) + cbWrite > 4)
    396397                    {
    397398                        const unsigned iShw2 = iShw + 2;
     
    451452                if (   pCpu
    452453                    && (off & 7)
    453                     && (off & 7) + pgmPoolDisasWriteSize(pCpu) > sizeof(X86PDEPAE))
     454                    && (off & 7) + cbWrite > sizeof(X86PDEPAE))
    454455                {
    455                     const unsigned iShw2 = (off + pgmPoolDisasWriteSize(pCpu) - 1) / sizeof(X86PDEPAE);
     456                    const unsigned iShw2 = (off + cbWrite - 1) / sizeof(X86PDEPAE);
    456457                    AssertReturnVoid(iShw2 < ELEMENTS(uShw.pPDPae->a));
    457458
     
    498499                    else if (   pCpu
    499500                            && (off & 7)
    500                             && (off & 7) + pgmPoolDisasWriteSize(pCpu) > sizeof(X86PDPE))
     501                            && (off & 7) + cbWrite > sizeof(X86PDPE))
    501502                    {
    502                         const unsigned iShw2 = (off + pgmPoolDisasWriteSize(pCpu) - 1) / sizeof(X86PDPE);
     503                        const unsigned iShw2 = (off + cbWrite - 1) / sizeof(X86PDPE);
    503504                        if (    iShw2 != iShw
    504505                            &&  iShw2 < X86_PG_PAE_PDPE_ENTRIES
     
    541542                if (   pCpu
    542543                    && (off & 7)
    543                     && (off & 7) + pgmPoolDisasWriteSize(pCpu) > sizeof(X86PDEPAE))
     544                    && (off & 7) + cbWrite > sizeof(X86PDEPAE))
    544545                {
    545                     const unsigned iShw2 = (off + pgmPoolDisasWriteSize(pCpu) - 1) / sizeof(X86PDEPAE);
     546                    const unsigned iShw2 = (off + cbWrite - 1) / sizeof(X86PDEPAE);
    546547                    AssertReturnVoid(iShw2 < ELEMENTS(uShw.pPDPae->a));
    547548
     
    584585                    if (   pCpu
    585586                        && (off & 7)
    586                         && (off & 7) + pgmPoolDisasWriteSize(pCpu) > sizeof(X86PDPE))
     587                        && (off & 7) + cbWrite > sizeof(X86PDPE))
    587588                    {
    588                         const unsigned iShw2 = (off + pgmPoolDisasWriteSize(pCpu) - 1) / sizeof(X86PDPE);
     589                        const unsigned iShw2 = (off + cbWrite - 1) / sizeof(X86PDPE);
    589590                        if (uShw.pPDPT->a[iShw2].n.u1Present)
    590591                        {
     
    615616                    if (   pCpu
    616617                        && (off & 7)
    617                         && (off & 7) + pgmPoolDisasWriteSize(pCpu) > sizeof(X86PDPE))
     618                        && (off & 7) + cbWrite > sizeof(X86PDPE))
    618619                    {
    619                         const unsigned iShw2 = (off + pgmPoolDisasWriteSize(pCpu) - 1) / sizeof(X86PML4E);
     620                        const unsigned iShw2 = (off + cbWrite - 1) / sizeof(X86PML4E);
    620621                        if (uShw.pPML4->a[iShw2].n.u1Present)
    621622                        {
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette