- Timestamp:
- Nov 23, 2018 11:08:15 AM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 126878
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAll.cpp
r75631 r75683 983 983 IEM_STATIC VBOXSTRICTRC iemVmxVmexitInitIpi(PVMCPU pVCpu); 984 984 IEM_STATIC VBOXSTRICTRC iemVmxVmexitIntWindow(PVMCPU pVCpu); 985 IEM_STATIC VBOXSTRICTRC iemVmxVmexitMtf(PVMCPU pVCpu); 985 986 IEM_STATIC VBOXSTRICTRC iemVmxVirtApicAccessMem(PVMCPU pVCpu, uint16_t offAccess, size_t cbAccess, void *pvData, uint32_t fAccess); 986 987 IEM_STATIC VBOXSTRICTRC iemVmxVmexitApicAccess(PVMCPU pVCpu, uint16_t offAccess, uint32_t fAccess); … … 15809 15810 * @returns Strict VBox status code. 15810 15811 * @param pVCpu The cross context virtual CPU structure of the calling EMT. 15811 * @param uExitReason The VM-exit reason.15812 * @param uExitQual The VM-exit qualification.15813 *15814 15812 * @thread EMT(pVCpu) 15815 15813 */ … … 15818 15816 IEM_CTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_VMX_VMEXIT_MASK); 15819 15817 VBOXSTRICTRC rcStrict = iemVmxVmexitIntWindow(pVCpu); 15818 if (pVCpu->iem.s.cActiveMappings) 15819 iemMemRollback(pVCpu); 15820 return iemExecStatusCodeFiddling(pVCpu, rcStrict); 15821 } 15822 15823 15824 /** 15825 * Interface for HM and EM to emulate VM-exits Monitor-Trap Flag (MTF). 15826 * 15827 * @returns Strict VBox status code. 15828 * @param pVCpu The cross context virtual CPU structure of the calling EMT. 15829 * @thread EMT(pVCpu) 15830 */ 15831 VMM_INT_DECL(VBOXSTRICTRC) IEMExecVmxVmexitMtf(PVMCPU pVCpu) 15832 { 15833 IEM_CTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_VMX_VMEXIT_MASK); 15834 VBOXSTRICTRC rcStrict = iemVmxVmexitMtf(pVCpu); 15820 15835 if (pVCpu->iem.s.cActiveMappings) 15821 15836 iemMemRollback(pVCpu); -
trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h
r75671 r75683 1748 1748 PVMXVVMCS pVmcs = pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pVmcs); 1749 1749 1750 /* Activity-state: VM-exits occur before changing the activity state, nothing further to do */ 1750 /* 1751 * Activity state. 1752 * Most VM-exits will occur in the active state. However, if the first instruction 1753 * following the VM-entry is a HLT instruction, and the MTF VM-execution control is set, 1754 * the VM-exit will be from the HLT activity state. 1755 * 1756 * See Intel spec. 25.5.2 "Monitor Trap Flag". 1757 */ 1758 /** @todo NSTVMX: Does triple-fault VM-exit reflect a shutdown activity state or 1759 * not? */ 1760 EMSTATE enmActivityState = EMGetState(pVCpu); 1761 switch (enmActivityState) 1762 { 1763 case EMSTATE_HALTED: pVmcs->u32GuestActivityState = VMX_VMCS_GUEST_ACTIVITY_HLT; break; 1764 default: pVmcs->u32GuestActivityState = VMX_VMCS_GUEST_ACTIVITY_ACTIVE; break; 1765 } 1751 1766 1752 1767 /* Interruptibility-state. */ … … 3002 3017 3003 3018 /** 3019 * VMX VM-exit handler for VM-exits due to Monitor-Trap Flag (MTF). 3020 * 3021 * @returns Strict VBox status code. 3022 * @param pVCpu The cross context virtual CPU structure. 3023 */ 3024 IEM_STATIC VBOXSTRICTRC iemVmxVmexitMtf(PVMCPU pVCpu) 3025 { 3026 /* 3027 * The MTF VM-exit can occur even when the MTF VM-execution control is 3028 * not set (e.g. when VM-entry injects an MTF pending event), so do not 3029 * check for it here. 3030 */ 3031 iemVmxVmcsSetExitQual(pVCpu, 0); 3032 return iemVmxVmexit(pVCpu, VMX_EXIT_MTF); 3033 } 3034 3035 3036 /** 3004 3037 * VMX VM-exit handler for VM-exits due to INVLPG. 3005 3038 * 3039 * @returns Strict VBox status code. 3006 3040 * @param pVCpu The cross context virtual CPU structure. 3007 3041 * @param GCPtrPage The guest-linear address of the page being invalidated. -
trunk/src/VBox/VMM/VMMR3/EM.cpp
r75681 r75683 2261 2261 2262 2262 /* 2263 * VMX Nested-guest monitor-trap flag (MTF) VM-exit. 2264 */ 2265 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX 2266 if (VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_VMX_MTF)) 2267 { 2268 rc2 = VBOXSTRICTRC_VAL(IEMExecVmxVmexitMtf(pVCpu)); 2269 UPDATE_RC(); 2270 } 2271 #endif 2272 2273 /* 2263 2274 * Allocate handy pages. 2264 2275 */ … … 2363 2374 /* check that we got them all */ 2364 2375 AssertCompile(VM_FF_HIGH_PRIORITY_PRE_MASK == (VM_FF_TM_VIRTUAL_SYNC | VM_FF_DBGF | VM_FF_CHECK_VM_STATE | VM_FF_DEBUG_SUSPEND | VM_FF_PGM_NEED_HANDY_PAGES | VM_FF_PGM_NO_MEMORY | VM_FF_EMT_RENDEZVOUS)); 2365 AssertCompile(VMCPU_FF_HIGH_PRIORITY_PRE_MASK == (VMCPU_FF_TIMER | VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_UPDATE_APIC | VMCPU_FF_INTERRUPT_PIC | VMCPU_FF_PGM_SYNC_CR3 | VMCPU_FF_PGM_SYNC_CR3_NON_GLOBAL | VMCPU_FF_INHIBIT_INTERRUPTS | VMCPU_FF_DBGF | VMCPU_FF_INTERRUPT_NESTED_GUEST | VM _WHEN_RAW_MODE(VMCPU_FF_SELM_SYNC_TSS | VMCPU_FF_TRPM_SYNC_IDT | VMCPU_FF_SELM_SYNC_GDT | VMCPU_FF_SELM_SYNC_LDT, 0)));2376 AssertCompile(VMCPU_FF_HIGH_PRIORITY_PRE_MASK == (VMCPU_FF_TIMER | VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_UPDATE_APIC | VMCPU_FF_INTERRUPT_PIC | VMCPU_FF_PGM_SYNC_CR3 | VMCPU_FF_PGM_SYNC_CR3_NON_GLOBAL | VMCPU_FF_INHIBIT_INTERRUPTS | VMCPU_FF_DBGF | VMCPU_FF_INTERRUPT_NESTED_GUEST | VMCPU_FF_VMX_MTF | VM_WHEN_RAW_MODE(VMCPU_FF_SELM_SYNC_TSS | VMCPU_FF_TRPM_SYNC_IDT | VMCPU_FF_SELM_SYNC_GDT | VMCPU_FF_SELM_SYNC_LDT, 0))); 2366 2377 } 2367 2378
Note:
See TracChangeset
for help on using the changeset viewer.