VirtualBox

Changeset 55001 in vbox


Ignore:
Timestamp:
Mar 29, 2015 4:59:20 PM (10 years ago)
Author:
vboxsync
Message:

CPUMCTXCORE elimination.

Location:
trunk
Files:
9 edited

Legend:

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

    r53615 r55001  
    8787VMMR3_INT_DECL(int)     CSAMR3RemovePage(PVM pVM, RTRCPTR addr);
    8888VMMR3_INT_DECL(int)     CSAMR3CheckCode(PVM pVM, RTRCPTR pInstrGC);
    89 VMMR3_INT_DECL(int)     CSAMR3CheckCodeEx(PVM pVM, PCPUMCTXCORE pCtxCore, RTRCPTR pInstrGC);
     89VMMR3_INT_DECL(int)     CSAMR3CheckCodeEx(PVM pVM, PCPUMCTX pCtx, RTRCPTR pInstrGC);
    9090VMMR3_INT_DECL(int)     CSAMR3MarkCode(PVM pVM, RTRCPTR pInstr, uint32_t cbInstr, bool fScanned);
    9191VMMR3_INT_DECL(int)     CSAMR3DoPendingAction(PVM pVM, PVMCPU pVCpu);
  • trunk/include/VBox/vmm/patm.h

    r55000 r55001  
    155155VMM_INT_DECL(bool)      PATMIsInt3Patch(PVM pVM, RTRCPTR pInstrGC, uint32_t *pOpcode, uint32_t *pSize);
    156156VMM_INT_DECL(bool)      PATMAreInterruptsEnabled(PVM pVM);
    157 VMM_INT_DECL(bool)      PATMAreInterruptsEnabledByCtxCore(PVM pVM, PCPUMCTXCORE pCtxCore);
     157VMM_INT_DECL(bool)      PATMAreInterruptsEnabledByCtx(PVM pVM, PCPUMCTX pCtx);
    158158#ifdef PATM_EMULATE_SYSENTER
    159159VMM_INT_DECL(int)       PATMSysCall(PVM pVM, PCPUMCTX pCtx, PDISCPUSTATE pCpu);
  • trunk/src/VBox/VMM/VMMAll/PATMAll.cpp

    r55000 r55001  
    398398    PCPUMCTX pCtx = CPUMQueryGuestCtxPtr(VMMGetCpu(pVM));
    399399
    400     return PATMAreInterruptsEnabledByCtxCore(pVM, CPUMCTX2CORE(pCtx));
     400    return PATMAreInterruptsEnabledByCtx(pVM, pCtx);
    401401}
    402402
     
    408408 *
    409409 * @param   pVM         Pointer to the VM.
    410  * @param   pCtxCore    CPU context
     410 * @param   pCtx        The guest CPU context.
    411411 * @todo CPUM should wrap this, EM.cpp shouldn't call us.
    412412 */
    413 VMM_INT_DECL(bool) PATMAreInterruptsEnabledByCtxCore(PVM pVM, PCPUMCTXCORE pCtxCore)
     413VMM_INT_DECL(bool) PATMAreInterruptsEnabledByCtx(PVM pVM, PCPUMCTX pCtx)
    414414{
    415415    if (PATMIsEnabled(pVM))
    416416    {
    417417        Assert(!HMIsEnabled(pVM));
    418         if (PATMIsPatchGCAddr(pVM, pCtxCore->eip))
     418        if (PATMIsPatchGCAddr(pVM, pCtx->eip))
    419419            return false;
    420420    }
    421     return !!(pCtxCore->eflags.u32 & X86_EFL_IF);
     421    return !!(pCtx->eflags.u32 & X86_EFL_IF);
    422422}
    423423
  • trunk/src/VBox/VMM/VMMAll/TRPMAll.cpp

    r49623 r55001  
    516516        int         rc;
    517517
    518         Assert(PATMAreInterruptsEnabledByCtxCore(pVM, pRegFrame));
     518        Assert(PATMAreInterruptsEnabledByCtx(pVM, CPUMCTX_FROM_CORE(pRegFrame)));
    519519        Assert(!VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_SELM_SYNC_GDT | VMCPU_FF_SELM_SYNC_LDT | VMCPU_FF_TRPM_SYNC_IDT | VMCPU_FF_SELM_SYNC_TSS));
    520520
     
    841841    STAM_PROFILE_ADV_STOP(&pVM->trpm.s.CTX_SUFF_Z(StatForwardProf), a);
    842842
    843     Log(("TRAP%02X: forwarding to REM (ss rpl=%d eflags=%08X VMIF=%d handler=%08X\n", iGate, pRegFrame->ss.Sel & X86_SEL_RPL, pRegFrame->eflags.u32, PATMAreInterruptsEnabledByCtxCore(pVM, pRegFrame), pVM->trpm.s.aGuestTrapHandler[iGate]));
     843    Log(("TRAP%02X: forwarding to REM (ss rpl=%d eflags=%08X VMIF=%d handler=%08X\n", iGate, pRegFrame->ss.Sel & X86_SEL_RPL, pRegFrame->eflags.u32, PATMAreInterruptsEnabledByCtx(pVM, CPUMCTX_FROM_CORE(pRegFrame)), pVM->trpm.s.aGuestTrapHandler[iGate]));
    844844#endif
    845845    return VINF_EM_RAW_GUEST_TRAP;
  • trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp

    r54908 r55001  
    37043704 * @param   pVCpu           Pointer to the VMCPU.
    37053705 * @param   pCpu            Pointer to the disassembler state.
    3706  * @param   pRegFrame       Pointer to the register frame.
    3707  */
    3708 static int hmR0SvmInterpretInvlPgEx(PVMCPU pVCpu, PDISCPUSTATE pCpu, PCPUMCTXCORE pRegFrame)
     3706 * @param   pCtx            The guest CPU context.
     3707 */
     3708static int hmR0SvmInterpretInvlPgEx(PVMCPU pVCpu, PDISCPUSTATE pCpu, PCPUMCTX pCtx)
    37093709{
    37103710    DISQPVPARAMVAL Param1;
    37113711    RTGCPTR        GCPtrPage;
    37123712
    3713     int rc = DISQueryParamVal(pRegFrame, pCpu, &pCpu->Param1, &Param1, DISQPVWHICH_SRC);
     3713    int rc = DISQueryParamVal(CPUMCTX2CORE(pCtx), pCpu, &pCpu->Param1, &Param1, DISQPVWHICH_SRC);
    37143714    if (RT_FAILURE(rc))
    37153715        return VERR_EM_INTERPRETER;
     
    37223722
    37233723        GCPtrPage = Param1.val.val64;
    3724         VBOXSTRICTRC rc2 = EMInterpretInvlpg(pVCpu->CTX_SUFF(pVM), pVCpu, pRegFrame, GCPtrPage);
     3724        VBOXSTRICTRC rc2 = EMInterpretInvlpg(pVCpu->CTX_SUFF(pVM), pVCpu, CPUMCTX2CORE(pCtx), GCPtrPage);
    37253725        rc = VBOXSTRICTRC_VAL(rc2);
    37263726    }
     
    37443744 *
    37453745 * @param   pVM         Pointer to the VM.
    3746  * @param   pRegFrame   Pointer to the register frame.
     3746 * @param   pCtx        The guest CPU context.
    37473747 *
    37483748 * @remarks Updates the RIP if the instruction was executed successfully.
    37493749 */
    3750 static int hmR0SvmInterpretInvlpg(PVM pVM, PVMCPU pVCpu, PCPUMCTXCORE pRegFrame)
     3750static int hmR0SvmInterpretInvlpg(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx)
    37513751{
    37523752    /* Only allow 32 & 64 bit code. */
     
    37583758            && pDis->pCurInstr->uOpcode == OP_INVLPG)
    37593759        {
    3760             rc = hmR0SvmInterpretInvlPgEx(pVCpu, pDis, pRegFrame);
     3760            rc = hmR0SvmInterpretInvlPgEx(pVCpu, pDis, pCtx);
    37613761            if (RT_SUCCESS(rc))
    3762                 pRegFrame->rip += pDis->cbInstr;
     3762                pCtx->rip += pDis->cbInstr;
    37633763            return rc;
    37643764        }
     
    43264326
    43274327    /** @todo Decode Assist. */
    4328     int rc = hmR0SvmInterpretInvlpg(pVM, pVCpu, CPUMCTX2CORE(pCtx));    /* Updates RIP if successful. */
     4328    int rc = hmR0SvmInterpretInvlpg(pVM, pVCpu, pCtx);    /* Updates RIP if successful. */
    43294329    STAM_COUNTER_INC(&pVCpu->hm.s.StatExitInvlpg);
    43304330    Assert(rc == VINF_SUCCESS || rc == VERR_EM_INTERPRETER);
  • trunk/src/VBox/VMM/VMMR3/CSAM.cpp

    r52771 r55001  
    23282328 * @returns VBox status code.
    23292329 * @param   pVM         Pointer to the VM.
    2330  * @param   pCtxCore    CPU context
    2331  * @param   pInstrGC    Instruction pointer
    2332  */
    2333 VMMR3_INT_DECL(int) CSAMR3CheckCodeEx(PVM pVM, PCPUMCTXCORE pCtxCore, RTRCPTR pInstrGC)
     2330 * @param   pCtx        Guest CPU context.
     2331 * @param   pInstrGC    Instruction pointer.
     2332 */
     2333VMMR3_INT_DECL(int) CSAMR3CheckCodeEx(PVM pVM, PCPUMCTX pCtx, RTRCPTR pInstrGC)
    23342334{
    23352335    Assert(!HMIsEnabled(pVM));
     
    23452345        Assert(CPUMGetGuestCodeBits(VMMGetCpu0(pVM)) == 32);
    23462346
    2347         pInstrGC = SELMToFlat(pVM, DISSELREG_CS, pCtxCore, pInstrGC);
     2347        pInstrGC = SELMToFlat(pVM, DISSELREG_CS, CPUMCTX2CORE(pCtx), pInstrGC);
    23482348        return CSAMR3CheckCode(pVM, pInstrGC);
    23492349    }
  • trunk/src/VBox/VMM/VMMR3/EM.cpp

    r54829 r55001  
    17161716            Log(("Forced action VMCPU_FF_CSAM_SCAN_PAGE\n"));
    17171717
    1718             CSAMR3CheckCodeEx(pVM, CPUMCTX2CORE(pCtx), pCtx->eip);
     1718            CSAMR3CheckCodeEx(pVM, pCtx, pCtx->eip);
    17191719            VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_CSAM_SCAN_PAGE);
    17201720        }
  • trunk/src/VBox/VMM/VMMR3/EMRaw.cpp

    r55000 r55001  
    618618    {
    619619        Assert(!PATMIsPatchGCAddr(pVM, pCtx->eip));
    620         CSAMR3CheckCodeEx(pVM, CPUMCTX2CORE(pCtx), pCtx->eip);
     620        CSAMR3CheckCodeEx(pVM, pCtx, pCtx->eip);
    621621    }
    622622
     
    14441444        {
    14451445            STAM_PROFILE_ADV_SUSPEND(&pVCpu->em.s.StatRAWEntry, b);
    1446             CSAMR3CheckCodeEx(pVM, CPUMCTX2CORE(pCtx), pCtx->eip);
     1446            CSAMR3CheckCodeEx(pVM, pCtx, pCtx->eip);
    14471447            STAM_PROFILE_ADV_RESUME(&pVCpu->em.s.StatRAWEntry, b);
    14481448            if (    VM_FF_IS_PENDING(pVM, VM_FF_HIGH_PRIORITY_PRE_RAW_MASK)
  • trunk/src/VBox/VMM/VMMRC/TRPMRCHandlers.cpp

    r55000 r55001  
    246246        else if (    VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_INTERRUPT_PIC)
    247247                 && !VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_INHIBIT_INTERRUPTS)
    248                  &&  PATMAreInterruptsEnabledByCtxCore(pVM, pRegFrame)
     248                 &&  PATMAreInterruptsEnabledByCtx(pVM, CPUMCTX_FROM_CORE(pRegFrame))
    249249           )
    250250        {
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