VirtualBox

Changeset 36196 in vbox


Ignore:
Timestamp:
Mar 7, 2011 5:50:27 PM (14 years ago)
Author:
vboxsync
Message:

VMM: don't die hard during PDPTR preloading (VT-x), try guru meditate instead.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pgm.h

    r35361 r36196  
    330330VMMDECL(int)        PGMGstSetPage(PVMCPU pVCpu, RTGCPTR GCPtr, size_t cb, uint64_t fFlags);
    331331VMMDECL(int)        PGMGstModifyPage(PVMCPU pVCpu, RTGCPTR GCPtr, size_t cb, uint64_t fFlags, uint64_t fMask);
    332 VMMDECL(X86PDPE)    PGMGstGetPaePDPtr(PVMCPU pVCpu, unsigned iPdPt);
     332VMMDECL(int)        PGMGstQueryPaePDPtr(PVMCPU pVCpu, unsigned iPdpt, PX86PDPE pPdpe);
    333333
    334334VMMDECL(int)        PGMInvalidatePage(PVMCPU pVCpu, RTGCPTR GCPtrPage);
  • trunk/src/VBox/VMM/VMMAll/PGMAll.cpp

    r36009 r36196  
    16271627 * @param   iPdpt       PDPT index
    16281628 */
    1629 VMMDECL(X86PDPE) PGMGstGetPaePDPtr(PVMCPU pVCpu, unsigned iPdpt)
     1629VMMDECL(int)  PGMGstQueryPaePDPtr(PVMCPU pVCpu, unsigned iPdpt, PX86PDPE pPdpe)
    16301630{
    16311631    Assert(iPdpt <= 3);
    1632     return pgmGstGetPaePDPTPtr(pVCpu)->a[iPdpt & 3];
     1632    PX86PDPT pPdpt;
     1633    int rc = pgmGstGetPaePDPTPtrEx(pVCpu, &pPdpt);
     1634    if (RT_SUCCESS(rc))
     1635        *pPdpe = pPdpt->a[iPdpt & 3];
     1636    return rc;
    16331637}
    16341638
  • trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp

    r35346 r36196  
    12371237 * Prefetch the 4 PDPT pointers (PAE and nested paging only)
    12381238 *
     1239 * @returns VINF_SUCCESS or fatal error.
    12391240 * @param   pVM         The VM to operate on.
    12401241 * @param   pVCpu       The VMCPU to operate on.
    12411242 * @param   pCtx        Guest context
    12421243 */
    1243 static void vmxR0PrefetchPAEPdptrs(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx)
     1244static int vmxR0PrefetchPAEPdptrs(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx)
    12441245{
    12451246    if (CPUMIsGuestInPAEModeEx(pCtx))
    12461247    {
    1247         X86PDPE Pdpe;
    1248 
    12491248        for (unsigned i=0;i<4;i++)
    12501249        {
    1251             Pdpe = PGMGstGetPaePDPtr(pVCpu, i);
    1252             int rc = VMXWriteVMCS64(VMX_VMCS_GUEST_PDPTR0_FULL + i*2, Pdpe.u);
     1250            X86PDPE Pdpe;
     1251            int rc = PGMGstQueryPaePDPtr(pVCpu, i, &Pdpe);
     1252            AssertRCReturn(rc, rc);
     1253
     1254            rc = VMXWriteVMCS64(VMX_VMCS_GUEST_PDPTR0_FULL + i*2, Pdpe.u);
    12531255            AssertRC(rc);
    12541256        }
    12551257    }
     1258    return VINF_SUCCESS;
    12561259}
    12571260
     
    17471750                val = pCtx->cr3;
    17481751                /* Prefetch the four PDPT entries in PAE mode. */
    1749                 vmxR0PrefetchPAEPdptrs(pVM, pVCpu, pCtx);
     1752                rc = vmxR0PrefetchPAEPdptrs(pVM, pVCpu, pCtx);
     1753                AssertRCReturn(rc, rc);
    17501754            }
    17511755        }
     
    20212025        }
    20222026        /* Prefetch the four PDPT entries in PAE mode. */
    2023         vmxR0PrefetchPAEPdptrs(pVM, pVCpu, pCtx);
     2027        rc = vmxR0PrefetchPAEPdptrs(pVM, pVCpu, pCtx);
     2028        AssertRCReturn(rc, rc);
    20242029    }
    20252030
Note: See TracChangeset for help on using the changeset viewer.

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