Changeset 70781 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Jan 29, 2018 5:24:06 AM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 120554
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp
r70732 r70781 3505 3505 * by the physical CPU. 3506 3506 */ 3507 /** @todo later explore this for performance reasons. Right now the hardware 3508 * takes care of virtual interrupt injection for nested-guest. */ 3507 3509 #if 0 3508 3510 if ( VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_INTERRUPT_NESTED_GUEST) 3509 3511 && (pVmcbNstGstCache->u64InterceptCtrl & SVM_CTRL_INTERCEPT_VINTR) 3510 && CPUMCanSvmNstGstTakeVirtIntr(p Ctx))3512 && CPUMCanSvmNstGstTakeVirtIntr(pVCpu, pCtx)) 3511 3513 { 3512 3514 Log4(("Intercepting virtual interrupt -> #VMEXIT\n")); … … 3641 3643 if (fGif) 3642 3644 { 3645 /* 3646 * For nested-guests we have no way to determine if we're injecting a physical or virtual 3647 * interrupt at this point. Hence the partial verification below. 3648 */ 3643 3649 if (CPUMIsGuestInSvmNestedHwVirtMode(pCtx)) 3644 fAllowInt = CPUMCanSvmNstGstTakePhysIntr(pVCpu, pCtx) ;3650 fAllowInt = CPUMCanSvmNstGstTakePhysIntr(pVCpu, pCtx) || CPUMCanSvmNstGstTakeVirtIntr(pVCpu, pCtx); 3645 3651 else 3646 3652 fAllowInt = RT_BOOL(pCtx->eflags.u32 & X86_EFL_IF); … … 3681 3687 } 3682 3688 else 3683 {3684 #ifdef VBOX_WITH_NESTED_HWVIRT3685 /*3686 * If IEM emulated VMRUN and injected an event, it would not clear the EVENTINJ::Valid bit3687 * as a physical CPU clears it in the VMCB as part of the #VMEXIT (if the AMD spec. is to3688 * believed, real behavior might differ). Regardless, IEM does it only on #VMEXIT for now3689 * and since we are continuing nested-guest execution using hardware-assisted SVM, we need3690 * to clear this field otherwise we will inject the event twice, see @bugref{7243#78}.3691 */3692 if (CPUMIsGuestInSvmNestedHwVirtMode(pCtx))3693 pVmcb->ctrl.EventInject.n.u1Valid = 0;3694 #endif3695 3689 Assert(pVmcb->ctrl.EventInject.n.u1Valid == 0); 3696 }3697 3690 3698 3691 /*
Note:
See TracChangeset
for help on using the changeset viewer.