Changeset 46827 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Jun 27, 2013 11:18:49 AM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 86773
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp
r46808 r46827 670 670 pVmcb->ctrl.IntCtrl.n.u1VIrqMasking = 1; 671 671 672 /* Ignore the priority in the TPR; we take into account the guest TPR anyway while delivering interrupts. */ 672 /* Ignore the priority in the TPR. This is necessary for delivering PIC style (ExtInt) interrupts and we currently 673 deliver both PIC and APIC interrupts alike. See hmR0SvmInjectPendingEvent() */ 673 674 pVmcb->ctrl.IntCtrl.n.u1IgnoreTPR = 1; 674 675 … … 680 681 pVmcb->ctrl.u64LBRVirt = 0; 681 682 682 /* Initially set all VMCB clean bits to 0 indicating that everything should be loaded from memory. */683 /* Initially set all VMCB clean bits to 0 indicating that everything should be loaded from the VMCB in memory. */ 683 684 pVmcb->ctrl.u64VmcbCleanBits = 0; 684 685 685 /* The guest ASID MBNZ, set it to 1. The host uses 0. */686 /* The host ASID MBZ, for the guest start with 1. */ 686 687 pVmcb->ctrl.TLBCtrl.n.u32ASID = 1; 687 688 … … 2155 2156 pVmcb->ctrl.u64VmcbCleanBits &= ~(HMSVM_VMCB_CLEAN_INTERCEPTS | HMSVM_VMCB_CLEAN_TPR); 2156 2157 2157 Log4(("Setting virtual interrupt intercept\n"));2158 Log4(("Setting virtual interrupt pending intercept\n")); 2158 2159 } 2159 2160 } … … 2172 2173 2173 2174 const bool fIntShadow = !!hmR0SvmGetGuestIntrShadow(pVCpu, pCtx); 2175 const bool fBlockInt = !(pCtx->eflags.u32 & X86_EFL_IF); 2174 2176 PSVMVMCB pVmcb = (PSVMVMCB)pVCpu->hm.s.svm.pvVmcb; 2175 2177 … … 2181 2183 Assert(Event.n.u1Valid); 2182 2184 bool fInject = true; 2183 if ( fIntShadow 2184 && ( Event.n.u3Type == SVM_EVENT_EXTERNAL_IRQ 2185 || Event.n.u3Type == SVM_EVENT_NMI)) 2185 if ( Event.n.u3Type == SVM_EVENT_EXTERNAL_IRQ 2186 && ( fBlockInt 2187 || fIntShadow)) 2188 { 2189 fInject = false; 2190 } 2191 else if ( Event.n.u3Type == SVM_EVENT_NMI 2192 && fIntShadow) 2186 2193 { 2187 2194 fInject = false; … … 2195 2202 else 2196 2203 hmR0SvmSetVirtIntrIntercept(pVmcb); 2197 } /** @todo SMI. SMIs take priority over NMIs. */2204 } /** @todo SMI. SMIs take priority over NMIs. */ 2198 2205 else if (VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_INTERRUPT_NMI)) /* NMI. NMIs take priority over regular interrupts . */ 2199 2206 { … … 2215 2222 { 2216 2223 /* Check if there are guest external interrupts (PIC/APIC) pending and inject them, if the guest can receive them. */ 2217 const bool fBlockInt = !(pCtx->eflags.u32 & X86_EFL_IF);2218 2224 if ( !fBlockInt 2219 2225 && !fIntShadow) … … 2591 2597 || HMR0GetCurrentCpu()->idCpu != pVCpu->hm.s.idLastCpu) 2592 2598 { 2599 hmR0SvmUpdateTscOffsetting(pVCpu); 2593 2600 pSvmTransient->fUpdateTscOffsetting = false; 2594 hmR0SvmUpdateTscOffsetting(pVCpu);2595 2601 } 2596 2602
Note:
See TracChangeset
for help on using the changeset viewer.