儲存庫 vbox 的更動 65935
- 時間撮記:
- 2017-3-3 下午02:22:21 (8 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp
r65934 r65935 4246 4246 } 4247 4247 4248 4248 4249 /** 4249 4250 * Updates interrupt shadow for the current RIP. … … 4257 4258 } while (0) 4258 4259 4260 4259 4261 /** 4260 4262 * Advances the guest RIP making use of the CPU's NRIP_SAVE feature if … … 4274 4276 if (pVCpu->CTX_SUFF(pVM)->hm.s.svm.u32Features & AMD_CPUID_SVM_FEATURE_EDX_NRIP_SAVE) 4275 4277 { 4276 P SVMVMCB pVmcb = (PSVMVMCB)pVCpu->hm.s.svm.pvVmcb;4278 PCSVMVMCB pVmcb = (PCSVMVMCB)pVCpu->hm.s.svm.pvVmcb; 4277 4279 Assert(pVmcb->ctrl.u64NextRIP); 4278 4280 Assert(pVmcb->ctrl.u64NextRIP - pCtx->rip == cb); … … 4285 4287 } 4286 4288 4289 /* Currently only used by nested hw.virt instructions, so ifdef'd as such, otherwise compilers start whining. */ 4290 #ifdef VBOX_WITH_NESTED_HWVIRT 4291 /** 4292 * Gets the length of the current instruction if the CPU supports the NRIP_SAVE 4293 * feature. Otherwise, returns the value in @a cbLikely. 4294 * 4295 * @param pVCpu The cross context virtual CPU structure. 4296 * @param pCtx Pointer to the guest-CPU context. 4297 * @param cbLikely The likely instruction length. 4298 */ 4299 DECLINLINE(uint8_t) hmR0SvmGetInstrLengthHwAssist(PVMCPU pVCpu, PCPUMCTX pCtx, uint8_t cbLikely) 4300 { 4301 Assert(cbLikely <= 15); /* See Intel spec. 2.3.11 "AVX Instruction Length" */ 4302 if (pVCpu->CTX_SUFF(pVM)->hm.s.svm.u32Features & AMD_CPUID_SVM_FEATURE_EDX_NRIP_SAVE) 4303 { 4304 PCSVMVMCB pVmcb = (PCSVMVMCB)pVCpu->hm.s.svm.pvVmcb; 4305 uint8_t const cbInstr = pVmcb->ctrl.u64NextRIP - pCtx->rip; 4306 Assert(cbInstr == cbLikely); 4307 return cbInstr; 4308 } 4309 return cbLikely; 4310 } 4311 #endif 4287 4312 4288 4313 /** … … 5672 5697 /** @todo Stat. */ 5673 5698 /* STAM_COUNTER_INC(&pVCpu->hm.s.StatExitClgi); */ 5674 /** @todo Decode Assist. */5675 VBOXSTRICTRC rcStrict = IEMExecDecodedClgi(pVCpu, 3);5699 uint8_t const cbInstr = hmR0SvmGetInstrLengthHwAssist(pVCpu, pCtx, 3); 5700 VBOXSTRICTRC rcStrict = IEMExecDecodedClgi(pVCpu, cbInstr); 5676 5701 return VBOXSTRICTRC_VAL(rcStrict); 5677 5702 } … … 5686 5711 /** @todo Stat. */ 5687 5712 /* STAM_COUNTER_INC(&pVCpu->hm.s.StatExitStgi); */ 5688 /** @todo Decode Assist. */5689 VBOXSTRICTRC rcStrict = IEMExecDecodedStgi(pVCpu, 3);5713 uint8_t const cbInstr = hmR0SvmGetInstrLengthHwAssist(pVCpu, pCtx, 3); 5714 VBOXSTRICTRC rcStrict = IEMExecDecodedStgi(pVCpu, cbInstr); 5690 5715 return VBOXSTRICTRC_VAL(rcStrict); 5691 5716 } … … 5700 5725 /** @todo Stat. */ 5701 5726 /* STAM_COUNTER_INC(&pVCpu->hm.s.StatExitVmload); */ 5702 /** @todo Decode Assist. */5703 VBOXSTRICTRC rcStrict = IEMExecDecodedVmload(pVCpu, 3);5727 uint8_t const cbInstr = hmR0SvmGetInstrLengthHwAssist(pVCpu, pCtx, 3); 5728 VBOXSTRICTRC rcStrict = IEMExecDecodedVmload(pVCpu, cbInstr); 5704 5729 return VBOXSTRICTRC_VAL(rcStrict); 5705 5730 } … … 5714 5739 /** @todo Stat. */ 5715 5740 /* STAM_COUNTER_INC(&pVCpu->hm.s.StatExitVmsave); */ 5716 /** @todo Decode Assist. */5717 VBOXSTRICTRC rcStrict = IEMExecDecodedVmsave(pVCpu, 3);5741 uint8_t const cbInstr = hmR0SvmGetInstrLengthHwAssist(pVCpu, pCtx, 3); 5742 VBOXSTRICTRC rcStrict = IEMExecDecodedVmsave(pVCpu, cbInstr); 5718 5743 return VBOXSTRICTRC_VAL(rcStrict); 5719 5744 } … … 5728 5753 /** @todo Stat. */ 5729 5754 /* STAM_COUNTER_INC(&pVCpu->hm.s.StatExitInvlpga); */ 5730 /** @todo Decode Assist. */5731 VBOXSTRICTRC rcStrict = IEMExecDecodedInvlpga(pVCpu, 3);5755 uint8_t const cbInstr = hmR0SvmGetInstrLengthHwAssist(pVCpu, pCtx, 3); 5756 VBOXSTRICTRC rcStrict = IEMExecDecodedInvlpga(pVCpu, cbInstr); 5732 5757 return VBOXSTRICTRC_VAL(rcStrict); 5733 5758 }
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器