Changeset 70780 in vbox for trunk/src/VBox/VMM/include
- Timestamp:
- Jan 29, 2018 5:20:06 AM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 120553
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/include/EMHandleRCTmpl.h
r69111 r70780 237 237 case VINF_GIM_R3_HYPERCALL: 238 238 { 239 /* Currently hypercall instruction (vmcall/vmmcall) emulation is compiled 240 only when Nested Hw. virt feature is enabled in IEM (for easier IEM backports). */ 239 /* 240 * Currently hypercall instruction (vmmcall) emulation is compiled and 241 * implemented only when nested hw. virt feature is enabled in IEM. 242 * 243 * On Intel or when nested hardware virtualization support isn't compiled 244 * we still need to implement hypercalls rather than throw a #UD. 245 */ 241 246 #ifdef VBOX_WITH_NESTED_HWVIRT 242 rc = emR3ExecuteInstruction(pVM, pVCpu, "Hypercall"); 243 break; 244 #else 245 /** @todo IEM/REM need to handle VMCALL/VMMCALL, see 246 * @bugref{7270#c168}. */ 247 uint8_t cbInstr = 0; 248 VBOXSTRICTRC rcStrict = GIMExecHypercallInstr(pVCpu, pCtx, &cbInstr); 249 if (rcStrict == VINF_SUCCESS) 247 if (pVM->cpum.ro.GuestFeatures.fSvm) 250 248 { 251 Assert(cbInstr); 252 pCtx->rip += cbInstr; 253 /* Update interrupt inhibition. */ 254 if ( VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_INHIBIT_INTERRUPTS) 255 && pCtx->rip != EMGetInhibitInterruptsPC(pVCpu)) 256 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_INHIBIT_INTERRUPTS); 257 rc = VINF_SUCCESS; 249 rc = emR3ExecuteInstruction(pVM, pVCpu, "Hypercall"); 250 break; 258 251 } 259 else if (rcStrict == VINF_GIM_HYPERCALL_CONTINUING)260 rc = VINF_SUCCESS;261 252 else 253 #endif 262 254 { 263 Assert(rcStrict != VINF_GIM_R3_HYPERCALL); 264 rc = VBOXSTRICTRC_VAL(rcStrict); 255 /** @todo IEM/REM need to handle VMCALL/VMMCALL, see 256 * @bugref{7270#c168}. */ 257 uint8_t cbInstr = 0; 258 VBOXSTRICTRC rcStrict = GIMExecHypercallInstr(pVCpu, pCtx, &cbInstr); 259 if (rcStrict == VINF_SUCCESS) 260 { 261 Assert(cbInstr); 262 pCtx->rip += cbInstr; 263 /* Update interrupt inhibition. */ 264 if ( VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_INHIBIT_INTERRUPTS) 265 && pCtx->rip != EMGetInhibitInterruptsPC(pVCpu)) 266 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_INHIBIT_INTERRUPTS); 267 rc = VINF_SUCCESS; 268 } 269 else if (rcStrict == VINF_GIM_HYPERCALL_CONTINUING) 270 rc = VINF_SUCCESS; 271 else 272 { 273 Assert(rcStrict != VINF_GIM_R3_HYPERCALL); 274 rc = VBOXSTRICTRC_VAL(rcStrict); 275 } 276 break; 265 277 } 266 break;267 #endif268 278 } 269 279
Note:
See TracChangeset
for help on using the changeset viewer.