Changeset 71069 in vbox for trunk/src/VBox
- Timestamp:
- Feb 20, 2018 10:53:58 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllCImplSvmInstr.cpp.h
r71048 r71069 957 957 { 958 958 /** @todo Nested-guest SVM - figure out fetching op-code bytes from IEM. */ 959 PSVMVMCBCTRL pVmcbCtrl = &pCtx->hwvirt.svm.CTX_SUFF(pVmcb)->ctrl; 959 960 #ifdef IEM_WITH_CODE_TLB 960 AssertReleaseFailedReturn(VERR_IEM_IPE_5); 961 uint8_t const cbCurrent = pVCpu->iem.s.cbInstrBuf; 962 uint8_t const *pbInstrBuf = pVCpu->iem.s.pbInstrBuf; 963 if ( pbInstrBuf 964 && cbCurrent >= SVM_CTRL_GUEST_INSTR_BYTES_MAX) 965 { 966 pVmcbCtrl->cbInstrFetched = SVM_CTRL_GUEST_INSTR_BYTES_MAX; 967 memcpy(&pVmcbCtrl->abInstr[0], pbInstrBuf, SVM_CTRL_GUEST_INSTR_BYTES_MAX); 968 } 969 else 970 { AssertReleaseFailedReturn(VERR_IEM_IPE_5); /** @todo */ } 961 971 #else 962 PSVMVMCBCTRL pVmcbCtrl = &pCtx->hwvirt.svm.CTX_SUFF(pVmcb)->ctrl;963 972 uint8_t const offOpCode = pVCpu->iem.s.offOpcode; 964 uint8_t const cbCurrent = pVCpu->iem.s.cbOpcode - pVCpu->iem.s.offOpcode;973 uint8_t const cbCurrent = pVCpu->iem.s.cbOpcode - offOpCode; 965 974 if (cbCurrent >= SVM_CTRL_GUEST_INSTR_BYTES_MAX) 966 975 { 967 Assert(cbCurrent <= RT_ELEMENTS(pVCpu->iem.s.abOpcode));976 pVmcbCtrl->cbInstrFetched = SVM_CTRL_GUEST_INSTR_BYTES_MAX; 968 977 memcpy(&pVmcbCtrl->abInstr[0], &pVCpu->iem.s.abOpcode[offOpCode], SVM_CTRL_GUEST_INSTR_BYTES_MAX); 969 978 } 970 979 else 971 { 972 /** @todo fetch 15 bytes from CS:RIP and stop fetching on exceptions or CS 973 * limit is exceeded. */ 974 } 980 { AssertReleaseFailedReturn(VERR_IEM_IPE_5); /** @todo */ } 975 981 #endif 976 982 }
Note:
See TracChangeset
for help on using the changeset viewer.