Changeset 55001 in vbox
- Timestamp:
- Mar 29, 2015 4:59:20 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/csam.h
r53615 r55001 87 87 VMMR3_INT_DECL(int) CSAMR3RemovePage(PVM pVM, RTRCPTR addr); 88 88 VMMR3_INT_DECL(int) CSAMR3CheckCode(PVM pVM, RTRCPTR pInstrGC); 89 VMMR3_INT_DECL(int) CSAMR3CheckCodeEx(PVM pVM, PCPUMCTX CORE pCtxCore, RTRCPTR pInstrGC);89 VMMR3_INT_DECL(int) CSAMR3CheckCodeEx(PVM pVM, PCPUMCTX pCtx, RTRCPTR pInstrGC); 90 90 VMMR3_INT_DECL(int) CSAMR3MarkCode(PVM pVM, RTRCPTR pInstr, uint32_t cbInstr, bool fScanned); 91 91 VMMR3_INT_DECL(int) CSAMR3DoPendingAction(PVM pVM, PVMCPU pVCpu); -
trunk/include/VBox/vmm/patm.h
r55000 r55001 155 155 VMM_INT_DECL(bool) PATMIsInt3Patch(PVM pVM, RTRCPTR pInstrGC, uint32_t *pOpcode, uint32_t *pSize); 156 156 VMM_INT_DECL(bool) PATMAreInterruptsEnabled(PVM pVM); 157 VMM_INT_DECL(bool) PATMAreInterruptsEnabledByCtx Core(PVM pVM, PCPUMCTXCORE pCtxCore);157 VMM_INT_DECL(bool) PATMAreInterruptsEnabledByCtx(PVM pVM, PCPUMCTX pCtx); 158 158 #ifdef PATM_EMULATE_SYSENTER 159 159 VMM_INT_DECL(int) PATMSysCall(PVM pVM, PCPUMCTX pCtx, PDISCPUSTATE pCpu); -
trunk/src/VBox/VMM/VMMAll/PATMAll.cpp
r55000 r55001 398 398 PCPUMCTX pCtx = CPUMQueryGuestCtxPtr(VMMGetCpu(pVM)); 399 399 400 return PATMAreInterruptsEnabledByCtx Core(pVM, CPUMCTX2CORE(pCtx));400 return PATMAreInterruptsEnabledByCtx(pVM, pCtx); 401 401 } 402 402 … … 408 408 * 409 409 * @param pVM Pointer to the VM. 410 * @param pCtx Core CPU context410 * @param pCtx The guest CPU context. 411 411 * @todo CPUM should wrap this, EM.cpp shouldn't call us. 412 412 */ 413 VMM_INT_DECL(bool) PATMAreInterruptsEnabledByCtx Core(PVM pVM, PCPUMCTXCORE pCtxCore)413 VMM_INT_DECL(bool) PATMAreInterruptsEnabledByCtx(PVM pVM, PCPUMCTX pCtx) 414 414 { 415 415 if (PATMIsEnabled(pVM)) 416 416 { 417 417 Assert(!HMIsEnabled(pVM)); 418 if (PATMIsPatchGCAddr(pVM, pCtx Core->eip))418 if (PATMIsPatchGCAddr(pVM, pCtx->eip)) 419 419 return false; 420 420 } 421 return !!(pCtx Core->eflags.u32 & X86_EFL_IF);421 return !!(pCtx->eflags.u32 & X86_EFL_IF); 422 422 } 423 423 -
trunk/src/VBox/VMM/VMMAll/TRPMAll.cpp
r49623 r55001 516 516 int rc; 517 517 518 Assert(PATMAreInterruptsEnabledByCtx Core(pVM, pRegFrame));518 Assert(PATMAreInterruptsEnabledByCtx(pVM, CPUMCTX_FROM_CORE(pRegFrame))); 519 519 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)); 520 520 … … 841 841 STAM_PROFILE_ADV_STOP(&pVM->trpm.s.CTX_SUFF_Z(StatForwardProf), a); 842 842 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 Core(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])); 844 844 #endif 845 845 return VINF_EM_RAW_GUEST_TRAP; -
trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp
r54908 r55001 3704 3704 * @param pVCpu Pointer to the VMCPU. 3705 3705 * @param pCpu Pointer to the disassembler state. 3706 * @param p RegFrame Pointer to the register frame.3707 */ 3708 static int hmR0SvmInterpretInvlPgEx(PVMCPU pVCpu, PDISCPUSTATE pCpu, PCPUMCTX CORE pRegFrame)3706 * @param pCtx The guest CPU context. 3707 */ 3708 static int hmR0SvmInterpretInvlPgEx(PVMCPU pVCpu, PDISCPUSTATE pCpu, PCPUMCTX pCtx) 3709 3709 { 3710 3710 DISQPVPARAMVAL Param1; 3711 3711 RTGCPTR GCPtrPage; 3712 3712 3713 int rc = DISQueryParamVal( pRegFrame, pCpu, &pCpu->Param1, &Param1, DISQPVWHICH_SRC);3713 int rc = DISQueryParamVal(CPUMCTX2CORE(pCtx), pCpu, &pCpu->Param1, &Param1, DISQPVWHICH_SRC); 3714 3714 if (RT_FAILURE(rc)) 3715 3715 return VERR_EM_INTERPRETER; … … 3722 3722 3723 3723 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); 3725 3725 rc = VBOXSTRICTRC_VAL(rc2); 3726 3726 } … … 3744 3744 * 3745 3745 * @param pVM Pointer to the VM. 3746 * @param p RegFrame Pointer to the register frame.3746 * @param pCtx The guest CPU context. 3747 3747 * 3748 3748 * @remarks Updates the RIP if the instruction was executed successfully. 3749 3749 */ 3750 static int hmR0SvmInterpretInvlpg(PVM pVM, PVMCPU pVCpu, PCPUMCTX CORE pRegFrame)3750 static int hmR0SvmInterpretInvlpg(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx) 3751 3751 { 3752 3752 /* Only allow 32 & 64 bit code. */ … … 3758 3758 && pDis->pCurInstr->uOpcode == OP_INVLPG) 3759 3759 { 3760 rc = hmR0SvmInterpretInvlPgEx(pVCpu, pDis, p RegFrame);3760 rc = hmR0SvmInterpretInvlPgEx(pVCpu, pDis, pCtx); 3761 3761 if (RT_SUCCESS(rc)) 3762 p RegFrame->rip += pDis->cbInstr;3762 pCtx->rip += pDis->cbInstr; 3763 3763 return rc; 3764 3764 } … … 4326 4326 4327 4327 /** @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. */ 4329 4329 STAM_COUNTER_INC(&pVCpu->hm.s.StatExitInvlpg); 4330 4330 Assert(rc == VINF_SUCCESS || rc == VERR_EM_INTERPRETER); -
trunk/src/VBox/VMM/VMMR3/CSAM.cpp
r52771 r55001 2328 2328 * @returns VBox status code. 2329 2329 * @param pVM Pointer to the VM. 2330 * @param pCtx Core CPU context2331 * @param pInstrGC Instruction pointer 2332 */ 2333 VMMR3_INT_DECL(int) CSAMR3CheckCodeEx(PVM pVM, PCPUMCTX CORE pCtxCore, RTRCPTR pInstrGC)2330 * @param pCtx Guest CPU context. 2331 * @param pInstrGC Instruction pointer. 2332 */ 2333 VMMR3_INT_DECL(int) CSAMR3CheckCodeEx(PVM pVM, PCPUMCTX pCtx, RTRCPTR pInstrGC) 2334 2334 { 2335 2335 Assert(!HMIsEnabled(pVM)); … … 2345 2345 Assert(CPUMGetGuestCodeBits(VMMGetCpu0(pVM)) == 32); 2346 2346 2347 pInstrGC = SELMToFlat(pVM, DISSELREG_CS, pCtxCore, pInstrGC);2347 pInstrGC = SELMToFlat(pVM, DISSELREG_CS, CPUMCTX2CORE(pCtx), pInstrGC); 2348 2348 return CSAMR3CheckCode(pVM, pInstrGC); 2349 2349 } -
trunk/src/VBox/VMM/VMMR3/EM.cpp
r54829 r55001 1716 1716 Log(("Forced action VMCPU_FF_CSAM_SCAN_PAGE\n")); 1717 1717 1718 CSAMR3CheckCodeEx(pVM, CPUMCTX2CORE(pCtx), pCtx->eip);1718 CSAMR3CheckCodeEx(pVM, pCtx, pCtx->eip); 1719 1719 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_CSAM_SCAN_PAGE); 1720 1720 } -
trunk/src/VBox/VMM/VMMR3/EMRaw.cpp
r55000 r55001 618 618 { 619 619 Assert(!PATMIsPatchGCAddr(pVM, pCtx->eip)); 620 CSAMR3CheckCodeEx(pVM, CPUMCTX2CORE(pCtx), pCtx->eip);620 CSAMR3CheckCodeEx(pVM, pCtx, pCtx->eip); 621 621 } 622 622 … … 1444 1444 { 1445 1445 STAM_PROFILE_ADV_SUSPEND(&pVCpu->em.s.StatRAWEntry, b); 1446 CSAMR3CheckCodeEx(pVM, CPUMCTX2CORE(pCtx), pCtx->eip);1446 CSAMR3CheckCodeEx(pVM, pCtx, pCtx->eip); 1447 1447 STAM_PROFILE_ADV_RESUME(&pVCpu->em.s.StatRAWEntry, b); 1448 1448 if ( VM_FF_IS_PENDING(pVM, VM_FF_HIGH_PRIORITY_PRE_RAW_MASK) -
trunk/src/VBox/VMM/VMMRC/TRPMRCHandlers.cpp
r55000 r55001 246 246 else if ( VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_INTERRUPT_PIC) 247 247 && !VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_INHIBIT_INTERRUPTS) 248 && PATMAreInterruptsEnabledByCtx Core(pVM, pRegFrame)248 && PATMAreInterruptsEnabledByCtx(pVM, CPUMCTX_FROM_CORE(pRegFrame)) 249 249 ) 250 250 {
Note:
See TracChangeset
for help on using the changeset viewer.