Changeset 82531 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Dec 10, 2019 4:32:55 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r82314 r82531 4957 4957 fIntrState |= VMX_VMCS_GUEST_INT_STATE_BLOCK_NMI; 4958 4958 4959 /* 4960 * Validate. 4961 */ 4962 #ifdef VBOX_STRICT 4963 /* We don't support block-by-SMI yet.*/ 4964 Assert(!(fIntrState & VMX_VMCS_GUEST_INT_STATE_BLOCK_SMI)); 4965 4966 /* Block-by-STI must not be set when interrupts are disabled. */ 4967 if (fIntrState & VMX_VMCS_GUEST_INT_STATE_BLOCK_STI) 4968 { 4969 HMVMX_CPUMCTX_ASSERT(pVCpu, CPUMCTX_EXTRN_RFLAGS); 4970 Assert(pVCpu->cpum.GstCtx.eflags.u & X86_EFL_IF); 4971 } 4972 #endif 4973 4959 4974 return fIntrState; 4960 4975 } … … 8569 8584 Assert(!TRPMHasTrap(pVCpu)); 8570 8585 8571 PCPUMCTX pCtx = &pVCpu->cpum.GstCtx; 8586 /* 8587 * Compute/update guest-interruptibility state related FFs. 8588 * The FFs will be used below while evaluating events to be injected. 8589 */ 8590 *pfIntrState = hmR0VmxGetGuestIntrState(pVCpu); 8591 8592 /* 8593 * Evaluate if a new event needs to be injected. 8594 * An event that's already pending has already performed all necessary checks. 8595 */ 8572 8596 PVMXVMCSINFO pVmcsInfo = pVmxTransient->pVmcsInfo; 8573 8597 bool const fIsNestedGuest = pVmxTransient->fIsNestedGuest; 8574 8575 /*8576 * Compute/update guest-interruptibility state related FFs.8577 */8578 /** @todo r=ramshankar: Move this outside this function to the caller. */8579 {8580 /* Get the current interruptibility-state of the guest or nested-guest (this updates FFs). */8581 uint32_t const fIntrState = hmR0VmxGetGuestIntrState(pVCpu);8582 8583 #ifdef VBOX_STRICT8584 /* Validate. */8585 Assert(!(fIntrState & VMX_VMCS_GUEST_INT_STATE_BLOCK_SMI)); /* We don't support block-by-SMI yet.*/8586 if (fIntrState & VMX_VMCS_GUEST_INT_STATE_BLOCK_STI)8587 {8588 /* Block-by-STI must not be set when interrupts are disabled. */8589 HMVMX_CPUMCTX_ASSERT(pVCpu, CPUMCTX_EXTRN_RFLAGS);8590 Assert(pCtx->eflags.Bits.u1IF);8591 }8592 #endif8593 8594 /* Update interruptibility state to the caller. */8595 *pfIntrState = fIntrState;8596 }8597 8598 /*8599 * Evaluate if a new event needs to be injected.8600 * An event that's already pending has already performed all necessary checks.8601 */8602 8598 if ( !pVCpu->hm.s.Event.fPending 8603 8599 && !VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_INHIBIT_INTERRUPTS)) … … 8609 8605 * NMIs take priority over external interrupts. 8610 8606 */ 8607 PCCPUMCTX pCtx = &pVCpu->cpum.GstCtx; 8611 8608 if (VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_INTERRUPT_NMI)) 8612 8609 { … … 10153 10150 * Virtual-APIC page and TPR threshold. 10154 10151 */ 10155 PVMXVMCSINFO pVmcsInfoNstGst = &pVCpu->hm.s.vmx.VmcsInfoNstGst; 10156 RTHCPHYS HCPhysVirtApic; 10157 uint32_t u32TprThreshold; 10152 RTHCPHYS HCPhysVirtApic; 10153 uint32_t u32TprThreshold; 10158 10154 if (u32ProcCtls & VMX_PROC_CTLS_USE_TPR_SHADOW) 10159 10155 { … … 10197 10193 * Validate basic assumptions. 10198 10194 */ 10195 PVMXVMCSINFO pVmcsInfoNstGst = &pVCpu->hm.s.vmx.VmcsInfoNstGst; 10199 10196 Assert(pVM->hm.s.vmx.fAllowUnrestricted); 10200 10197 Assert(pVM->hm.s.vmx.Msrs.ProcCtls.n.allowed1 & VMX_PROC_CTLS_USE_SECONDARY_CTLS);
Note:
See TracChangeset
for help on using the changeset viewer.