VirtualBox

Changeset 13532 in vbox for trunk/src/VBox/VMM/PATM


Ignore:
Timestamp:
Oct 23, 2008 12:39:48 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
38381
Message:

CPUMQueryGuestCtxPtr doesn't need to return a status. It can never fail.

Location:
trunk/src/VBox/VMM/PATM
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PATM/CSAM.cpp

    r13144 r13532  
    24052405                                                       0x2F};      /* OpenBSD 4.0 after install */
    24062406
    2407                 rc = CPUMQueryGuestCtxPtr(pVM, &pCtx);
    2408                 AssertRC(rc);   /* can't fail */
     2407                pCtx = CPUMQueryGuestCtxPtr(pVM);
    24092408
    24102409                for (unsigned i=0;i<RT_ELEMENTS(aOpenBsdPushCSOffset);i++)
  • trunk/src/VBox/VMM/PATM/PATM.cpp

    r13144 r13532  
    419419    {
    420420        PCPUMCTX pCtx;
    421         int      rc;
    422421
    423422        /* Update CPUMCTX guest context pointer. */
     
    428427        RTAvloU32DoWithAll(&pVM->patm.s.PatchLookupTreeHC->PatchTree, true, RelocatePatches, (void *)pVM);
    429428
    430         rc = CPUMQueryGuestCtxPtr(pVM, &pCtx);
    431         AssertRC(rc);
     429        pCtx = CPUMQueryGuestCtxPtr(pVM);
    432430
    433431        /* If we are running patch code right now, then also adjust EIP. */
     
    39933991
    39943992    /* Make sure the code selector is wide open; otherwise refuse. */
    3995     CPUMQueryGuestCtxPtr(pVM, &pCtx);
     3993    pCtx = CPUMQueryGuestCtxPtr(pVM);
    39963994    if (CPUMGetGuestCPL(pVM, CPUMCTX2CORE(pCtx)) == 0)
    39973995    {
     
    61836181            RTRCPTR retaddr;
    61846182            PCPUMCTX pCtx;
    6185             int      rc;
    6186 
    6187             rc = CPUMQueryGuestCtxPtr(pVM, &pCtx);
    6188             AssertRC(rc);
     6183
     6184            pCtx = CPUMQueryGuestCtxPtr(pVM);
    61896185
    61906186            rc = PGMPhysSimpleReadGCPtr(pVM, &retaddr, pCtx->esp, sizeof(retaddr));
  • trunk/src/VBox/VMM/PATM/VMMAll/PATMAll.cpp

    r12989 r13532  
    7171#ifdef PATM_EMULATE_SYSENTER
    7272    PCPUMCTX pCtx;
    73     int      rc;
    7473
    7574    /* Check if the sysenter handler has changed. */
    76     rc = CPUMQueryGuestCtxPtr(pVM, &pCtx);
    77     AssertRC(rc);
    78     if (   rc == VINF_SUCCESS
    79         && pCtx->SysEnter.cs  != 0
     75    pCtx = CPUMQueryGuestCtxPtr(pVM);
     76    if (   pCtx->SysEnter.cs  != 0
    8077        && pCtx->SysEnter.eip != 0
    8178       )
     
    301298VMMDECL(bool) PATMAreInterruptsEnabled(PVM pVM)
    302299{
    303     PCPUMCTX pCtx = 0;
    304     int      rc;
    305 
    306     rc = CPUMQueryGuestCtxPtr(pVM, &pCtx);
    307     AssertRC(rc);
     300    PCPUMCTX pCtx = CPUMQueryGuestCtxPtr(pVM);
    308301
    309302    return PATMAreInterruptsEnabledByCtxCore(pVM, CPUMCTX2CORE(pCtx));
     
    389382VMMDECL(int) PATMSysCall(PVM pVM, PCPUMCTXCORE pRegFrame, PDISCPUSTATE pCpu)
    390383{
    391     PCPUMCTX pCtx;
    392     int      rc;
    393 
    394     rc = CPUMQueryGuestCtxPtr(pVM, &pCtx);
    395     AssertRCReturn(rc, VINF_EM_RAW_RING_SWITCH);
     384    PCPUMCTX pCtx = CPUMQueryGuestCtxPtr(pVM);
    396385
    397386    if (pCpu->pCurInstr->opcode == OP_SYSENTER)
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