Changeset 72802 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Jul 2, 2018 4:49:04 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 123345
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r72798 r72802 41 41 #include "HMVMXR0.h" 42 42 #include "dtrace/VBoxVMM.h" 43 44 #define HMVMX_ALWAYS_SYNC_FULL_GUEST_STATE45 43 46 44 #ifdef DEBUG_ramshankar … … 7632 7630 STAM_COUNTER_INC(&pVCpu->hm.s.paStatInjectedIrqsR0[uVector & MASK_INJECT_IRQ_STAT]); 7633 7631 7634 if (pVCpu->CTX_SUFF(pVM)->hm.s.vmx.fUnrestrictedGuest) 7635 { 7636 /* 7637 * For unrestricted execution enabled CPUs running real-mode guests, we must not set the deliver-error-code bit. 7638 * See Intel spec. 26.2.1.3 "VM-Entry Control Fields". 7639 */ 7640 u32IntInfo &= ~VMX_EXIT_INTERRUPTION_INFO_ERROR_CODE_VALID; 7641 } 7642 else 7643 { 7644 /* We require CR0 to check if the guest is in real-mode. */ 7645 int rc = hmR0VmxImportGuestState(pVCpu, CPUMCTX_EXTRN_CR0); 7646 AssertRCReturn(rc, rc); 7647 7648 /* 7649 * Hardware interrupts & exceptions cannot be delivered through the software interrupt 7650 * redirection bitmap to the real mode task in virtual-8086 mode. We must jump to the 7651 * interrupt handler in the (real-mode) guest. 7652 * 7653 * See Intel spec. 20.3 "Interrupt and Exception handling in Virtual-8086 Mode". 7654 * See Intel spec. 20.1.4 "Interrupt and Exception Handling" for real-mode interrupt handling. 7655 */ 7656 if (CPUMIsGuestInRealModeEx(pMixedCtx)) 7632 /* We require CR0 to check if the guest is in real-mode. */ 7633 /** @todo No we don't, since CR0.PE is always intercepted. */ 7634 int rc = hmR0VmxImportGuestState(pVCpu, CPUMCTX_EXTRN_CR0); 7635 AssertRCReturn(rc, rc); 7636 7637 /* 7638 * Hardware interrupts & exceptions cannot be delivered through the software interrupt 7639 * redirection bitmap to the real mode task in virtual-8086 mode. We must jump to the 7640 * interrupt handler in the (real-mode) guest. 7641 * 7642 * See Intel spec. 20.3 "Interrupt and Exception handling in Virtual-8086 Mode". 7643 * See Intel spec. 20.1.4 "Interrupt and Exception Handling" for real-mode interrupt handling. 7644 */ 7645 if (CPUMIsGuestInRealModeEx(pMixedCtx)) 7646 { 7647 if (pVCpu->CTX_SUFF(pVM)->hm.s.vmx.fUnrestrictedGuest) 7648 { 7649 /* 7650 * For unrestricted execution enabled CPUs running real-mode guests, we must not . 7651 * set the deliver-error-code bit . 7652 * . 7653 * See Intel spec. 26.2.1.3 "VM-Entry Control Fields". 7654 */ 7655 u32IntInfo &= ~VMX_EXIT_INTERRUPTION_INFO_ERROR_CODE_VALID; 7656 } 7657 else 7657 7658 { 7658 7659 PVM pVM = pVCpu->CTX_SUFF(pVM); … … 7762 7763 7763 7764 /* Inject. */ 7764 intrc = VMXWriteVmcs32(VMX_VMCS32_CTRL_ENTRY_INTERRUPTION_INFO, u32IntInfo);7765 rc = VMXWriteVmcs32(VMX_VMCS32_CTRL_ENTRY_INTERRUPTION_INFO, u32IntInfo); 7765 7766 if (VMX_EXIT_INTERRUPTION_INFO_ERROR_CODE_IS_VALID(u32IntInfo)) 7766 7767 rc |= VMXWriteVmcs32(VMX_VMCS32_CTRL_ENTRY_EXCEPTION_ERRCODE, u32ErrCode);
Note:
See TracChangeset
for help on using the changeset viewer.