- Timestamp:
- Jun 6, 2018 2:24:04 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/em.h
r72327 r72462 177 177 VMMDECL(void) EMSetInhibitInterruptsPC(PVMCPU pVCpu, RTGCUINTPTR PC); 178 178 VMMDECL(RTGCUINTPTR) EMGetInhibitInterruptsPC(PVMCPU pVCpu); 179 VMMDECL(void) EMSetHypercallInstructionsEnabled(PVMCPU pVCpu, bool fEnabled); 180 VMMDECL(bool) EMAreHypercallInstructionsEnabled(PVMCPU pVCpu); 181 179 182 VMM_INT_DECL(int) EMInterpretDisasCurrent(PVM pVM, PVMCPU pVCpu, PDISCPUSTATE pCpu, unsigned *pcbInstr); 180 183 VMM_INT_DECL(int) EMInterpretDisasOneEx(PVM pVM, PVMCPU pVCpu, RTGCUINTPTR GCPtrInstr, PCCPUMCTXCORE pCtxCore, -
trunk/include/VBox/vmm/hm.h
r71529 r72462 150 150 VMM_INT_DECL(int) HMAmdIsSubjectToErratum170(uint32_t *pu32Family, uint32_t *pu32Model, uint32_t *pu32Stepping); 151 151 VMM_INT_DECL(bool) HMSetSingleInstruction(PVM pVM, PVMCPU pVCpu, bool fEnable); 152 VMM_INT_DECL(void) HMHypercallsEnable(PVMCPU pVCpu);153 VMM_INT_DECL(void) HMHypercallsDisable(PVMCPU pVCpu);154 152 /** @} */ 155 153 … … 165 163 uint8_t cAddrSizeBits, uint8_t iEffSeg, bool fRep, bool fStrIo, 166 164 PSVMIOIOEXITINFO pIoExitInfo); 167 VMM_INT_DECL( VBOXSTRICTRC) HMSvmVmmcall(PVMCPU pVCpu, PCPUMCTX pCtx, bool *pfRipUpdated);165 VMM_INT_DECL(int) HMHCSvmMaybeMovTprHypercall(PVMCPU pVCpu, PCPUMCTX pCtx); 168 166 /** @} */ 169 167 -
trunk/include/VBox/vmm/vmm.h
r72300 r72462 287 287 VMM_INT_DECL(void) VMMTrashVolatileXMMRegs(void); 288 288 VMM_INT_DECL(int) VMMPatchHypercall(PVM pVM, void *pvBuf, size_t cbBuf, size_t *pcbWritten); 289 VMM_INT_DECL(void) VMMHypercallsEnable(PVMCPU pVCpu);290 VMM_INT_DECL(void) VMMHypercallsDisable(PVMCPU pVCpu);291 289 292 290 -
trunk/src/VBox/VMM/VMMAll/EMAll.cpp
r72208 r72462 170 170 { 171 171 return pVCpu->em.s.GCPtrInhibitInterrupts; 172 } 173 174 175 /** 176 * Enables / disable hypercall instructions. 177 * 178 * This interface is used by GIM to tell the execution monitors whether the 179 * hypercall instruction (VMMCALL & VMCALL) are allowed or should \#UD. 180 * 181 * @param pVCpu The cross context virtual CPU structure this applies to. 182 * @param fEnabled Whether hypercall instructions are enabled (true) or not. 183 */ 184 VMMDECL(void) EMSetHypercallInstructionsEnabled(PVMCPU pVCpu, bool fEnabled) 185 { 186 pVCpu->em.s.fHypercallEnabled = fEnabled; 187 } 188 189 190 /** 191 * Checks if hypercall instructions (VMMCALL & VMCALL) are enabled or not. 192 * 193 * @returns true if enabled, false if not. 194 * @param pVCpu The cross context virtual CPU structure. 195 * 196 * @note If this call becomes a performance factor, we can make the data 197 * field available thru a read-only view in VMCPU. See VM::cpum.ro. 198 */ 199 VMMDECL(bool) EMAreHypercallInstructionsEnabled(PVMCPU pVCpu) 200 { 201 return pVCpu->em.s.fHypercallEnabled; 172 202 } 173 203 -
trunk/src/VBox/VMM/VMMAll/GIMAllHv.cpp
r72190 r72462 30 30 #include <VBox/vmm/pgm.h> 31 31 #include <VBox/vmm/apic.h> 32 #include <VBox/vmm/em.h> 32 33 #include "GIMHvInternal.h" 33 34 #include "GIMInternal.h" … … 793 794 794 795 /* 795 * Notify VMM that hypercalls are now disabled/enabled.796 * Update EM on hypercall instruction enabled state. 796 797 */ 797 for (VMCPUID i = 0; i < pVM->cCpus; i++) 798 { 799 if (uRawValue) 800 VMMHypercallsEnable(&pVM->aCpus[i]); 801 else 802 VMMHypercallsDisable(&pVM->aCpus[i]); 803 } 798 if (uRawValue) 799 for (VMCPUID i = 0; i < pVM->cCpus; i++) 800 EMSetHypercallInstructionsEnabled(&pVM->aCpus[i], true); 801 else 802 for (VMCPUID i = 0; i < pVM->cCpus; i++) 803 EMSetHypercallInstructionsEnabled(&pVM->aCpus[i], false); 804 804 805 805 return VINF_SUCCESS; -
trunk/src/VBox/VMM/VMMAll/HMAll.cpp
r72343 r72462 516 516 517 517 /** 518 * Notifies HM that paravirtualized hypercalls are now enabled.519 *520 * @param pVCpu The cross context virtual CPU structure.521 */522 VMM_INT_DECL(void) HMHypercallsEnable(PVMCPU pVCpu)523 {524 pVCpu->hm.s.fHypercallsEnabled = true;525 }526 527 528 /**529 * Notifies HM that paravirtualized hypercalls are now disabled.530 *531 * @param pVCpu The cross context virtual CPU structure.532 */533 VMM_INT_DECL(void) HMHypercallsDisable(PVMCPU pVCpu)534 {535 pVCpu->hm.s.fHypercallsEnabled = false;536 }537 538 539 /**540 518 * Notifies HM that GIM provider wants to trap \#UD. 541 519 * -
trunk/src/VBox/VMM/VMMAll/HMSVMAll.cpp
r72079 r72462 32 32 33 33 #ifndef IN_RC 34 34 35 /** 35 36 * Emulates a simple MOV TPR (CR8) instruction. … … 43 44 * 44 45 * @returns VBox status code. 45 * @retval VINF_SUCCESS if the access was handled successfully .46 * @retval VINF_SUCCESS if the access was handled successfully, RIP + RFLAGS updated. 46 47 * @retval VERR_NOT_FOUND if no patch record for this RIP could be found. 47 48 * @retval VERR_SVM_UNEXPECTED_PATCH_TYPE if the found patch type is invalid. … … 49 50 * @param pVCpu The cross context virtual CPU structure. 50 51 * @param pCtx Pointer to the guest-CPU context. 51 * @param pfUpdateRipAndRF Whether the guest RIP/EIP has been updated as 52 * part of the TPR patch operation. 53 */ 54 static int hmSvmEmulateMovTpr(PVMCPU pVCpu, PCPUMCTX pCtx, bool *pfUpdateRipAndRF) 52 */ 53 int hmSvmEmulateMovTpr(PVMCPU pVCpu, PCPUMCTX pCtx) 55 54 { 56 55 Log4(("Emulated VMMCall TPR access replacement at RIP=%RGv\n", pCtx->rip)); … … 60 59 * and the new RIP may be a patched instruction which needs emulation as well. 61 60 */ 62 bool fUpdateRipAndRF = false; 63 bool fPatchFound = false; 61 bool fPatchFound = false; 64 62 PVM pVM = pVCpu->CTX_SUFF(pVM); 65 63 for (;;) 66 64 { 67 bool fPending;68 uint8_t u8Tpr;69 70 65 PHMTPRPATCH pPatch = (PHMTPRPATCH)RTAvloU32Get(&pVM->hm.s.PatchTree, (AVLOU32KEY)pCtx->eip); 71 66 if (!pPatch) 72 67 break; 73 74 68 fPatchFound = true; 69 70 uint8_t u8Tpr; 75 71 switch (pPatch->enmType) 76 72 { 77 73 case HMTPRINSTR_READ: 78 74 { 79 int rc = APICGetTpr(pVCpu, &u8Tpr, &fPending, NULL /* pu8PendingIrq */); 75 bool fPending; 76 int rc = APICGetTpr(pVCpu, &u8Tpr, &fPending, NULL /* pu8PendingIrq */); 80 77 AssertRC(rc); 81 78 … … 84 81 pCtx->rip += pPatch->cbOp; 85 82 pCtx->eflags.Bits.u1RF = 0; 86 fUpdateRipAndRF = true;87 83 break; 88 84 } … … 107 103 pCtx->rip += pPatch->cbOp; 108 104 pCtx->eflags.Bits.u1RF = 0; 109 fUpdateRipAndRF = true;110 105 break; 111 106 } … … 115 110 AssertMsgFailed(("Unexpected patch type %d\n", pPatch->enmType)); 116 111 pVCpu->hm.s.u32HMError = pPatch->enmType; 117 *pfUpdateRipAndRF = fUpdateRipAndRF;118 112 return VERR_SVM_UNEXPECTED_PATCH_TYPE; 119 113 } … … 121 115 } 122 116 123 *pfUpdateRipAndRF = fUpdateRipAndRF; 124 if (fPatchFound) 125 return VINF_SUCCESS; 126 return VERR_NOT_FOUND; 117 return fPatchFound ? VINF_SUCCESS : VERR_NOT_FOUND; 127 118 } 128 119 … … 224 215 return uTicks + pVmcbNstGstCache->u64TSCOffset; 225 216 } 226 #endif /* !IN_RC */ 227 228 229 /** 230 * Performs the operations necessary that are part of the vmmcall instruction 231 * execution in the guest. 232 * 233 * @returns Strict VBox status code (i.e. informational status codes too). 234 * @retval VINF_SUCCESS on successful handling, no \#UD needs to be thrown, 235 * update RIP and eflags.RF depending on @a pfUpdatedRipAndRF and 236 * continue guest execution. 237 * @retval VINF_GIM_HYPERCALL_CONTINUING continue hypercall without updating 238 * RIP. 239 * @retval VINF_GIM_R3_HYPERCALL re-start the hypercall from ring-3. 217 218 219 /** 220 * Interface used by IEM to handle patched TPR accesses. 221 * 222 * @returns VBox status code 223 * @retval VINF_SUCCESS if hypercall was handled, RIP + RFLAGS all dealt with. 224 * @retval VERR_NOT_FOUND if hypercall was _not_ handled. 225 * @retval VERR_SVM_UNEXPECTED_PATCH_TYPE on IPE. 240 226 * 241 227 * @param pVCpu The cross context virtual CPU structure. 242 228 * @param pCtx Pointer to the guest-CPU context. 243 * @param pfUpdatedRipAndRF Whether the guest RIP/EIP has been updated as 244 * part of handling the VMMCALL operation. 245 */ 246 VMM_INT_DECL(VBOXSTRICTRC) HMSvmVmmcall(PVMCPU pVCpu, PCPUMCTX pCtx, bool *pfUpdatedRipAndRF) 247 { 248 #ifndef IN_RC 249 /* 250 * TPR patched instruction emulation for 32-bit guests. 251 */ 229 */ 230 VMM_INT_DECL(int) HMHCSvmMaybeMovTprHypercall(PVMCPU pVCpu, PCPUMCTX pCtx) 231 { 252 232 PVM pVM = pVCpu->CTX_SUFF(pVM); 253 233 if (pVM->hm.s.fTprPatchingAllowed) 254 234 { 255 int rc = hmSvmEmulateMovTpr(pVCpu, pCtx , pfUpdatedRipAndRF);235 int rc = hmSvmEmulateMovTpr(pVCpu, pCtx); 256 236 if (RT_SUCCESS(rc)) 257 237 return VINF_SUCCESS; 258 259 if (rc != VERR_NOT_FOUND) 260 { 261 Log(("hmSvmExitVmmCall: hmSvmEmulateMovTpr returns %Rrc\n", rc)); 262 return rc; 263 } 264 } 265 #endif 266 267 /* 268 * Paravirtualized hypercalls. 269 */ 270 *pfUpdatedRipAndRF = false; 271 if (pVCpu->hm.s.fHypercallsEnabled) 272 return GIMHypercall(pVCpu, pCtx); 273 274 return VERR_NOT_AVAILABLE; 275 } 276 238 return rc; 239 } 240 return VERR_NOT_FOUND; 241 } 242 243 #endif /* !IN_RC */ 277 244 278 245 /** -
trunk/src/VBox/VMM/VMMAll/IEMAllCImplSvmInstr.cpp.h
r72451 r72462 1090 1090 1091 1091 /** 1092 * Common code for iemCImpl_vmmcall and iemCImpl_vmcall (latter in IEMAllCImplVmxInstr.cpp.h). 1093 */ 1094 IEM_CIMPL_DEF_0(iemCImpl_Hypercall) 1095 { 1096 if (EMAreHypercallInstructionsEnabled(pVCpu)) 1097 { 1098 VBOXSTRICTRC rcStrict = GIMHypercall(pVCpu, IEM_GET_CTX(pVCpu)); 1099 if (RT_SUCCESS(rcStrict)) 1100 { 1101 if (rcStrict == VINF_SUCCESS) 1102 iemRegAddToRipAndClearRF(pVCpu, cbInstr); 1103 if ( rcStrict == VINF_SUCCESS 1104 || rcStrict == VINF_GIM_HYPERCALL_CONTINUING) 1105 return VINF_SUCCESS; 1106 AssertMsgReturn(rcStrict == VINF_GIM_R3_HYPERCALL, ("%Rrc\n", VBOXSTRICTRC_VAL(rcStrict)), VERR_IEM_IPE_4); 1107 return rcStrict; 1108 } 1109 AssertMsgReturn( rcStrict == VERR_GIM_HYPERCALL_ACCESS_DENIED 1110 || rcStrict == VERR_GIM_HYPERCALLS_NOT_AVAILABLE 1111 || rcStrict == VERR_GIM_NOT_ENABLED 1112 || rcStrict == VERR_GIM_HYPERCALL_MEMORY_READ_FAILED 1113 || rcStrict == VERR_GIM_HYPERCALL_MEMORY_WRITE_FAILED, 1114 ("%Rrc\n", VBOXSTRICTRC_VAL(rcStrict)), VERR_IEM_IPE_4); 1115 1116 /* Raise #UD on all failures. */ 1117 } 1118 return iemRaiseUndefinedOpcode(pVCpu); 1119 } 1120 1121 /** 1092 1122 * Implements 'VMMCALL'. 1093 1123 */ 1094 1124 IEM_CIMPL_DEF_0(iemCImpl_vmmcall) 1095 1125 { 1096 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu);1097 1126 if (IEM_IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_VMMCALL)) 1098 1127 { … … 1101 1130 } 1102 1131 1103 bool fUpdatedRipAndRF; 1104 VBOXSTRICTRC rcStrict = HMSvmVmmcall(pVCpu, pCtx, &fUpdatedRipAndRF); 1105 if (RT_SUCCESS(rcStrict)) 1106 { 1107 if (!fUpdatedRipAndRF) 1108 iemRegAddToRipAndClearRF(pVCpu, cbInstr); 1109 return rcStrict; 1110 } 1111 1112 return iemRaiseUndefinedOpcode(pVCpu); 1132 #ifndef IN_RC 1133 /* This is a little bit more complicated than the VT-x version because HM/SVM may 1134 patch MOV CR8 instructions too speed up APIC.TPR access for 32-bit windows guests. */ 1135 if (VM_IS_HM_ENABLED(pVCpu->CTX_SUFF(pVM))) 1136 { 1137 int rc = HMHCSvmMaybeMovTprHypercall(pVCpu, IEM_GET_CTX(pVCpu)); 1138 if (RT_SUCCESS(rc)) 1139 { 1140 Log(("vmmcall: MovTrp\n")); 1141 return VINF_SUCCESS; 1142 } 1143 } 1144 #endif 1145 1146 /* Join forces with vmcall. */ 1147 return IEM_CIMPL_CALL_0(iemCImpl_Hypercall); 1113 1148 } 1114 1149 -
trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h
r72453 r72462 22 22 IEM_CIMPL_DEF_0(iemCImpl_vmcall) 23 23 { 24 if (true /*EMAreHypercallsEnabled(pVCpu)*/) 25 { 26 VBOXSTRICTRC rcStrict = GIMHypercall(pVCpu, IEM_GET_CTX(pVCpu)); 27 if (RT_SUCCESS(rcStrict)) 28 { 29 if (rcStrict == VINF_SUCCESS) 30 iemRegAddToRipAndClearRF(pVCpu, cbInstr); 31 if ( rcStrict == VINF_SUCCESS 32 || rcStrict == VINF_GIM_HYPERCALL_CONTINUING) 33 return VINF_SUCCESS; 34 AssertMsgReturn(rcStrict == VINF_GIM_R3_HYPERCALL, ("%Rrc\n", VBOXSTRICTRC_VAL(rcStrict)), VERR_IEM_IPE_4); 35 return rcStrict; 36 } 37 AssertMsgReturn( rcStrict == VERR_GIM_HYPERCALL_ACCESS_DENIED 38 || rcStrict == VERR_GIM_HYPERCALLS_NOT_AVAILABLE 39 || rcStrict == VERR_GIM_NOT_ENABLED 40 || rcStrict == VERR_GIM_HYPERCALL_MEMORY_READ_FAILED 41 || rcStrict == VERR_GIM_HYPERCALL_MEMORY_WRITE_FAILED, 42 ("%Rrc\n", VBOXSTRICTRC_VAL(rcStrict)), VERR_IEM_IPE_4); 24 /** @todo intercept. */ 43 25 44 /* Raise #UD on all failures. */ 45 } 46 return iemRaiseUndefinedOpcode(pVCpu); 26 /* Join forces with vmmcall. */ 27 return IEM_CIMPL_CALL_0(iemCImpl_Hypercall); 47 28 } 48 29 -
trunk/src/VBox/VMM/VMMAll/VMMAll.cpp
r70948 r72462 448 448 } 449 449 450 451 /**452 * Notifies VMM that paravirtualized hypercalls are now enabled.453 *454 * @param pVCpu The cross context virtual CPU structure.455 */456 VMM_INT_DECL(void) VMMHypercallsEnable(PVMCPU pVCpu)457 {458 /* If there is anything to do for raw-mode, do it here. */459 /** @todo NEM: Hypercalls. */460 #ifndef IN_RC461 if (HMIsEnabled(pVCpu->CTX_SUFF(pVM)))462 HMHypercallsEnable(pVCpu);463 #else464 RT_NOREF_PV(pVCpu);465 #endif466 }467 468 469 /**470 * Notifies VMM that paravirtualized hypercalls are now disabled.471 *472 * @param pVCpu The cross context virtual CPU structure.473 */474 VMM_INT_DECL(void) VMMHypercallsDisable(PVMCPU pVCpu)475 {476 /* If there is anything to do for raw-mode, do it here. */477 /** @todo NEM: Hypercalls. */478 #ifndef IN_RC479 if (HMIsEnabled(pVCpu->CTX_SUFF(pVM)))480 HMHypercallsDisable(pVCpu);481 #else482 RT_NOREF_PV(pVCpu);483 #endif484 }485 -
trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp
r72440 r72462 7169 7169 } 7170 7170 7171 /** 7172 * Performs the operations necessary that are part of the vmmcall instruction 7173 * execution in the guest. 7174 * 7175 * @returns Strict VBox status code (i.e. informational status codes too). 7176 * @retval VINF_SUCCESS on successful handling, no \#UD needs to be thrown, 7177 * update RIP and eflags.RF depending on @a pfUpdatedRipAndRF and 7178 * continue guest execution. 7179 * @retval VINF_GIM_HYPERCALL_CONTINUING continue hypercall without updating 7180 * RIP. 7181 * @retval VINF_GIM_R3_HYPERCALL re-start the hypercall from ring-3. 7182 * 7183 * @param pVCpu The cross context virtual CPU structure. 7184 * @param pCtx Pointer to the guest-CPU context. 7185 * @param pfUpdatedRipAndRF Whether the guest RIP/EIP has been updated as 7186 * part of handling the VMMCALL operation. 7187 * 7188 * @todo r=bird: merge this with hmR0SvmExitVmmCall and fix todos. 7189 */ 7190 static VBOXSTRICTRC hmR0SvmVmmcall(PVMCPU pVCpu, PCPUMCTX pCtx, bool *pfUpdatedRipAndRF) 7191 { 7192 /* 7193 * TPR patched instruction emulation for 32-bit guests. 7194 */ 7195 PVM pVM = pVCpu->CTX_SUFF(pVM); 7196 if (pVM->hm.s.fTprPatchingAllowed) 7197 { 7198 int rc = hmSvmEmulateMovTpr(pVCpu, pCtx); 7199 if (RT_SUCCESS(rc)) 7200 { 7201 *pfUpdatedRipAndRF = true; 7202 return VINF_SUCCESS; 7203 } 7204 7205 if (rc != VERR_NOT_FOUND) 7206 { 7207 Log(("hmSvmExitVmmCall: hmSvmEmulateMovTpr returns %Rrc\n", rc)); 7208 *pfUpdatedRipAndRF = false; 7209 return rc; 7210 } 7211 } 7212 7213 /* 7214 * Paravirtualized hypercalls. 7215 */ 7216 *pfUpdatedRipAndRF = false; /** @todo r=bird: This is misleading/wrong, see GIMHypercall returncode docs. */ 7217 if (EMAreHypercallInstructionsEnabled(pVCpu)) 7218 return GIMHypercall(pVCpu, pCtx); 7219 7220 return VERR_NOT_AVAILABLE; 7221 } 7222 7223 7171 7224 7172 7225 /** … … 7179 7232 7180 7233 bool fRipUpdated; 7181 VBOXSTRICTRC rcStrict = HMSvmVmmcall(pVCpu, pCtx, &fRipUpdated);7234 VBOXSTRICTRC rcStrict = hmR0SvmVmmcall(pVCpu, pCtx, &fRipUpdated); 7182 7235 if (RT_SUCCESS(rcStrict)) 7183 7236 { -
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r72390 r72462 11958 11958 11959 11959 VBOXSTRICTRC rcStrict = VERR_VMX_IPE_3; 11960 if ( pVCpu->hm.s.fHypercallsEnabled)11960 if (EMAreHypercallInstructionsEnabled(pVCpu)) 11961 11961 { 11962 11962 #if 0 … … 11980 11980 Assert( rcStrict == VINF_GIM_R3_HYPERCALL 11981 11981 || rcStrict == VINF_GIM_HYPERCALL_CONTINUING 11982 || RT_FAILURE( VBOXSTRICTRC_VAL(rcStrict)));11982 || RT_FAILURE(rcStrict)); 11983 11983 11984 11984 /* If the hypercall changes anything other than guest's general-purpose registers, … … 11989 11989 11990 11990 /* If hypercalls are disabled or the hypercall failed for some reason, raise #UD and continue. */ 11991 if (RT_FAILURE( VBOXSTRICTRC_VAL(rcStrict)))11991 if (RT_FAILURE(rcStrict)) 11992 11992 { 11993 11993 hmR0VmxSetPendingXcptUD(pVCpu, pMixedCtx); -
trunk/src/VBox/VMM/VMMR3/GIMHv.cpp
r72460 r72462 28 28 #include <VBox/vmm/hm.h> 29 29 #include <VBox/vmm/pdmapi.h> 30 #include <VBox/vmm/em.h> 30 31 #include "GIMInternal.h" 31 32 #include <VBox/vmm/vm.h> … … 1044 1045 if (pVM->gim.s.u.Hv.u64GuestOsIdMsr) 1045 1046 for (VMCPUID i = 0; i < pVM->cCpus; i++) 1046 VMMHypercallsEnable(&pVM->aCpus[i]);1047 EMSetHypercallInstructionsEnabled(&pVM->aCpus[i], true); 1047 1048 else 1048 1049 for (VMCPUID i = 0; i < pVM->cCpus; i++) 1049 VMMHypercallsDisable(&pVM->aCpus[i]);1050 EMSetHypercallInstructionsEnabled(&pVM->aCpus[i], false); 1050 1051 } 1051 1052 return VINF_SUCCESS; -
trunk/src/VBox/VMM/VMMR3/GIMKvm.cpp
r71800 r72462 26 26 #include <VBox/vmm/pdmapi.h> 27 27 #include <VBox/vmm/ssm.h> 28 #include <VBox/vmm/em.h> 28 29 #include "GIMInternal.h" 29 30 #include <VBox/vmm/vm.h> … … 159 160 */ 160 161 for (VMCPUID i = 0; i < pVM->cCpus; i++) 161 VMMHypercallsEnable(&pVM->aCpus[i]);162 EMSetHypercallInstructionsEnabled(&pVM->aCpus[i], true); 162 163 163 164 if (ASMIsAmdCpu()) -
trunk/src/VBox/VMM/include/EMInternal.h
r70979 r72462 345 345 bool fForceRAW; 346 346 347 uint8_t u8Padding[3]; 347 /** Set if hypercall instruction VMMCALL (AMD) & VMCALL (Intel) are enabled. 348 * GIM sets this and the execution managers queries it. Not saved, as GIM 349 * takes care of that bit too. */ 350 bool fHypercallEnabled; 351 352 /** Explicit padding. */ 353 uint8_t abPadding[2]; 348 354 349 355 /** The number of instructions we've executed in IEM since switching to the -
trunk/src/VBox/VMM/include/HMInternal.h
r72343 r72462 727 727 /** Whether \#UD needs to be intercepted (required by certain GIM providers). */ 728 728 bool fGIMTrapXcptUD; 729 /** Whether paravirt. hypercalls are enabled. */ 730 bool fHypercallsEnabled; 731 uint8_t u8Alignment0[2]; 729 uint8_t u8Alignment0[3]; 732 730 733 731 /** World switch exit counter. */ … … 1157 1155 #endif /* IN_RING0 */ 1158 1156 1157 int hmSvmEmulateMovTpr(PVMCPU pVCpu, PCPUMCTX pCtx); 1158 1159 1159 /** @} */ 1160 1160 -
trunk/src/VBox/VMM/include/HMInternal.mac
r69111 r72462 79 79 80 80 .fGIMTrapXcptUD resb 1 81 .fHypercallsEnabled resb 182 81 alignb 8 83 82
Note:
See TracChangeset
for help on using the changeset viewer.