Changeset 92495 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Nov 18, 2021 2:17:12 PM (3 years ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAll.cpp
r92426 r92495 16026 16026 { 16027 16027 IEMEXEC_ASSERT_INSTR_LEN_RETURN(pExitInfo->cbInstr, 3); 16028 IEM_CTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_EXEC_DECODED_MEM_MASK | CPUMCTX_EXTRN_ HM_VMX_MASK);16028 IEM_CTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_EXEC_DECODED_MEM_MASK | CPUMCTX_EXTRN_INHIBIT_INT | CPUMCTX_EXTRN_INHIBIT_NMI); 16029 16029 Assert(pExitInfo); 16030 16030 … … 16072 16072 { 16073 16073 IEMEXEC_ASSERT_INSTR_LEN_RETURN(pExitInfo->cbInstr, 3); 16074 IEM_CTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_EXEC_DECODED_MEM_MASK | CPUMCTX_EXTRN_ HM_VMX_MASK);16074 IEM_CTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_EXEC_DECODED_MEM_MASK | CPUMCTX_EXTRN_INHIBIT_INT | CPUMCTX_EXTRN_INHIBIT_NMI); 16075 16075 Assert(pExitInfo); 16076 16076 … … 16111 16111 Assert(pExitInfo); 16112 16112 IEMEXEC_ASSERT_INSTR_LEN_RETURN(pExitInfo->cbInstr, 3); 16113 IEM_CTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_EXEC_DECODED_MEM_MASK | CPUMCTX_EXTRN_ HM_VMX_MASK);16113 IEM_CTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_EXEC_DECODED_MEM_MASK | CPUMCTX_EXTRN_INHIBIT_INT | CPUMCTX_EXTRN_INHIBIT_NMI); 16114 16114 16115 16115 iemInitExec(pVCpu, false /*fBypassHandlers*/); … … 16136 16136 Assert(pExitInfo); 16137 16137 IEMEXEC_ASSERT_INSTR_LEN_RETURN(pExitInfo->cbInstr, 3); 16138 IEM_CTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_EXEC_DECODED_MEM_MASK | CPUMCTX_EXTRN_ HM_VMX_MASK);16138 IEM_CTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_EXEC_DECODED_MEM_MASK | CPUMCTX_EXTRN_INHIBIT_INT | CPUMCTX_EXTRN_INHIBIT_NMI); 16139 16139 16140 16140 iemInitExec(pVCpu, false /*fBypassHandlers*/); … … 16161 16161 Assert(pExitInfo); 16162 16162 IEMEXEC_ASSERT_INSTR_LEN_RETURN(pExitInfo->cbInstr, 3); 16163 IEM_CTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_EXEC_DECODED_MEM_MASK | CPUMCTX_EXTRN_ HM_VMX_MASK);16163 IEM_CTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_EXEC_DECODED_MEM_MASK | CPUMCTX_EXTRN_INHIBIT_INT | CPUMCTX_EXTRN_INHIBIT_NMI); 16164 16164 16165 16165 iemInitExec(pVCpu, false /*fBypassHandlers*/); … … 16208 16208 Assert(pExitInfo); 16209 16209 IEMEXEC_ASSERT_INSTR_LEN_RETURN(pExitInfo->cbInstr, 3); 16210 IEM_CTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_EXEC_DECODED_MEM_MASK | CPUMCTX_EXTRN_ HM_VMX_MASK);16210 IEM_CTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_EXEC_DECODED_MEM_MASK | CPUMCTX_EXTRN_INHIBIT_INT | CPUMCTX_EXTRN_INHIBIT_NMI); 16211 16211 16212 16212 iemInitExec(pVCpu, false /*fBypassHandlers*/); … … 16232 16232 { 16233 16233 IEMEXEC_ASSERT_INSTR_LEN_RETURN(cbInstr, 3); 16234 IEM_CTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_EXEC_DECODED_NO_MEM_MASK | CPUMCTX_EXTRN_ HM_VMX_MASK);16234 IEM_CTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_EXEC_DECODED_NO_MEM_MASK | CPUMCTX_EXTRN_INHIBIT_INT | CPUMCTX_EXTRN_INHIBIT_NMI); 16235 16235 16236 16236 iemInitExec(pVCpu, false /*fBypassHandlers*/); … … 16252 16252 { 16253 16253 IEMEXEC_ASSERT_INSTR_LEN_RETURN(pExitInfo->cbInstr, 4); 16254 IEM_CTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_EXEC_DECODED_MEM_MASK | CPUMCTX_EXTRN_ HM_VMX_MASK);16254 IEM_CTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_EXEC_DECODED_MEM_MASK | CPUMCTX_EXTRN_INHIBIT_INT | CPUMCTX_EXTRN_INHIBIT_NMI); 16255 16255 Assert(pExitInfo); 16256 16256 -
trunk/src/VBox/VMM/VMMAll/NEMAllNativeTemplate-win.cpp.h
r92466 r92495 413 413 /* Interruptibility state. This can get a little complicated since we get 414 414 half of the state via HV_X64_VP_EXECUTION_STATE. */ 415 if ( (fWhat & (CPUMCTX_EXTRN_ NEM_WIN_INHIBIT_INT | CPUMCTX_EXTRN_NEM_WIN_INHIBIT_NMI))416 == (CPUMCTX_EXTRN_ NEM_WIN_INHIBIT_INT | CPUMCTX_EXTRN_NEM_WIN_INHIBIT_NMI) )415 if ( (fWhat & (CPUMCTX_EXTRN_INHIBIT_INT | CPUMCTX_EXTRN_INHIBIT_NMI)) 416 == (CPUMCTX_EXTRN_INHIBIT_INT | CPUMCTX_EXTRN_INHIBIT_NMI) ) 417 417 { 418 418 ADD_REG64(WHvRegisterInterruptState, 0); … … 423 423 aValues[iReg - 1].InterruptState.NmiMasked = 1; 424 424 } 425 else if (fWhat & CPUMCTX_EXTRN_ NEM_WIN_INHIBIT_INT)425 else if (fWhat & CPUMCTX_EXTRN_INHIBIT_INT) 426 426 { 427 427 if ( pVCpu->nem.s.fLastInterruptShadow … … 439 439 } 440 440 else 441 Assert(!(fWhat & CPUMCTX_EXTRN_ NEM_WIN_INHIBIT_NMI));441 Assert(!(fWhat & CPUMCTX_EXTRN_INHIBIT_NMI)); 442 442 443 443 /* Interrupt windows. Always set if active as Hyper-V seems to be forgetful. */ … … 700 700 701 701 /* Interruptibility. */ 702 if (fWhat & (CPUMCTX_EXTRN_ NEM_WIN_INHIBIT_INT | CPUMCTX_EXTRN_NEM_WIN_INHIBIT_NMI))702 if (fWhat & (CPUMCTX_EXTRN_INHIBIT_INT | CPUMCTX_EXTRN_INHIBIT_NMI)) 703 703 { 704 704 aenmNames[iReg++] = WHvRegisterInterruptState; … … 1055 1055 1056 1056 /* Interruptibility. */ 1057 if (fWhat & (CPUMCTX_EXTRN_ NEM_WIN_INHIBIT_INT | CPUMCTX_EXTRN_NEM_WIN_INHIBIT_NMI))1057 if (fWhat & (CPUMCTX_EXTRN_INHIBIT_INT | CPUMCTX_EXTRN_INHIBIT_NMI)) 1058 1058 { 1059 1059 Assert(aenmNames[iReg] == WHvRegisterInterruptState); 1060 1060 Assert(aenmNames[iReg + 1] == WHvX64RegisterRip); 1061 1061 1062 if (!(pVCpu->cpum.GstCtx.fExtrn & CPUMCTX_EXTRN_ NEM_WIN_INHIBIT_INT))1062 if (!(pVCpu->cpum.GstCtx.fExtrn & CPUMCTX_EXTRN_INHIBIT_INT)) 1063 1063 { 1064 1064 pVCpu->nem.s.fLastInterruptShadow = aValues[iReg].InterruptState.InterruptShadow; … … 1069 1069 } 1070 1070 1071 if (!(pVCpu->cpum.GstCtx.fExtrn & CPUMCTX_EXTRN_ NEM_WIN_INHIBIT_NMI))1071 if (!(pVCpu->cpum.GstCtx.fExtrn & CPUMCTX_EXTRN_INHIBIT_NMI)) 1072 1072 { 1073 1073 if (aValues[iReg].InterruptState.NmiMasked) … … 1077 1077 } 1078 1078 1079 fWhat |= CPUMCTX_EXTRN_ NEM_WIN_INHIBIT_INT | CPUMCTX_EXTRN_NEM_WIN_INHIBIT_NMI;1079 fWhat |= CPUMCTX_EXTRN_INHIBIT_INT | CPUMCTX_EXTRN_INHIBIT_NMI; 1080 1080 iReg += 2; 1081 1081 } … … 1917 1917 DECLINLINE(void) nemHCWinCopyStateFromX64Header(PVMCPUCC pVCpu, HV_X64_INTERCEPT_MESSAGE_HEADER const *pHdr) 1918 1918 { 1919 Assert( (pVCpu->cpum.GstCtx.fExtrn & (CPUMCTX_EXTRN_RIP | CPUMCTX_EXTRN_RFLAGS | CPUMCTX_EXTRN_CS | CPUMCTX_EXTRN_ NEM_WIN_INHIBIT_INT))1920 == (CPUMCTX_EXTRN_RIP | CPUMCTX_EXTRN_RFLAGS | CPUMCTX_EXTRN_CS | CPUMCTX_EXTRN_ NEM_WIN_INHIBIT_INT));1919 Assert( (pVCpu->cpum.GstCtx.fExtrn & (CPUMCTX_EXTRN_RIP | CPUMCTX_EXTRN_RFLAGS | CPUMCTX_EXTRN_CS | CPUMCTX_EXTRN_INHIBIT_INT)) 1920 == (CPUMCTX_EXTRN_RIP | CPUMCTX_EXTRN_RFLAGS | CPUMCTX_EXTRN_CS | CPUMCTX_EXTRN_INHIBIT_INT)); 1921 1921 NEM_WIN_COPY_BACK_SEG(pVCpu->cpum.GstCtx.cs, pHdr->CsSegment); 1922 1922 pVCpu->cpum.GstCtx.rip = pHdr->Rip; … … 1936 1936 APICSetTpr(pVCpu, pHdr->Cr8 << 4); 1937 1937 1938 pVCpu->cpum.GstCtx.fExtrn &= ~(CPUMCTX_EXTRN_RIP | CPUMCTX_EXTRN_RFLAGS | CPUMCTX_EXTRN_CS | CPUMCTX_EXTRN_ NEM_WIN_INHIBIT_INT | CPUMCTX_EXTRN_APIC_TPR);1938 pVCpu->cpum.GstCtx.fExtrn &= ~(CPUMCTX_EXTRN_RIP | CPUMCTX_EXTRN_RFLAGS | CPUMCTX_EXTRN_CS | CPUMCTX_EXTRN_INHIBIT_INT | CPUMCTX_EXTRN_APIC_TPR); 1939 1939 } 1940 1940 #elif defined(IN_RING3) … … 1950 1950 DECLINLINE(void) nemR3WinCopyStateFromX64Header(PVMCPUCC pVCpu, WHV_VP_EXIT_CONTEXT const *pExitCtx) 1951 1951 { 1952 Assert( (pVCpu->cpum.GstCtx.fExtrn & (CPUMCTX_EXTRN_RIP | CPUMCTX_EXTRN_RFLAGS | CPUMCTX_EXTRN_CS | CPUMCTX_EXTRN_ NEM_WIN_INHIBIT_INT))1953 == (CPUMCTX_EXTRN_RIP | CPUMCTX_EXTRN_RFLAGS | CPUMCTX_EXTRN_CS | CPUMCTX_EXTRN_ NEM_WIN_INHIBIT_INT));1952 Assert( (pVCpu->cpum.GstCtx.fExtrn & (CPUMCTX_EXTRN_RIP | CPUMCTX_EXTRN_RFLAGS | CPUMCTX_EXTRN_CS | CPUMCTX_EXTRN_INHIBIT_INT)) 1953 == (CPUMCTX_EXTRN_RIP | CPUMCTX_EXTRN_RFLAGS | CPUMCTX_EXTRN_CS | CPUMCTX_EXTRN_INHIBIT_INT)); 1954 1954 NEM_WIN_COPY_BACK_SEG(pVCpu->cpum.GstCtx.cs, pExitCtx->Cs); 1955 1955 pVCpu->cpum.GstCtx.rip = pExitCtx->Rip; … … 1969 1969 APICSetTpr(pVCpu, pExitCtx->Cr8 << 4); 1970 1970 1971 pVCpu->cpum.GstCtx.fExtrn &= ~(CPUMCTX_EXTRN_RIP | CPUMCTX_EXTRN_RFLAGS | CPUMCTX_EXTRN_CS | CPUMCTX_EXTRN_ NEM_WIN_INHIBIT_INT | CPUMCTX_EXTRN_APIC_TPR);1971 pVCpu->cpum.GstCtx.fExtrn &= ~(CPUMCTX_EXTRN_RIP | CPUMCTX_EXTRN_RFLAGS | CPUMCTX_EXTRN_CS | CPUMCTX_EXTRN_INHIBIT_INT | CPUMCTX_EXTRN_APIC_TPR); 1972 1972 } 1973 1973 #endif /* IN_RING3 && !NEM_WIN_TEMPLATE_MODE_OWN_RUN_API */ … … 4107 4107 */ 4108 4108 bool const fPendingNmi = VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_INTERRUPT_NMI); 4109 uint64_t fNeedExtrn = CPUMCTX_EXTRN_ NEM_WIN_INHIBIT_INT | CPUMCTX_EXTRN_RIP | CPUMCTX_EXTRN_RFLAGS4110 | (fPendingNmi ? CPUMCTX_EXTRN_ NEM_WIN_INHIBIT_NMI : 0);4109 uint64_t fNeedExtrn = CPUMCTX_EXTRN_INHIBIT_INT | CPUMCTX_EXTRN_RIP | CPUMCTX_EXTRN_RFLAGS 4110 | (fPendingNmi ? CPUMCTX_EXTRN_INHIBIT_NMI : 0); 4111 4111 if (pVCpu->cpum.GstCtx.fExtrn & fNeedExtrn) 4112 4112 { … … 4522 4522 { 4523 4523 /* Try anticipate what we might need. */ 4524 uint64_t fImport = IEM_CPUMCTX_EXTRN_MUST_MASK | CPUMCTX_EXTRN_ NEM_WIN_INHIBIT_INT | CPUMCTX_EXTRN_NEM_WIN_INHIBIT_NMI;4524 uint64_t fImport = IEM_CPUMCTX_EXTRN_MUST_MASK | CPUMCTX_EXTRN_INHIBIT_INT | CPUMCTX_EXTRN_INHIBIT_NMI; 4525 4525 if ( (rcStrict >= VINF_EM_FIRST && rcStrict <= VINF_EM_LAST) 4526 4526 || RT_FAILURE(rcStrict)) … … 4529 4529 else if ( rcStrict == VINF_IOM_R3_IOPORT_COMMIT_WRITE 4530 4530 || rcStrict == VINF_EM_PENDING_R3_IOPORT_WRITE) 4531 fImport = CPUMCTX_EXTRN_RIP | CPUMCTX_EXTRN_CS | CPUMCTX_EXTRN_RFLAGS | CPUMCTX_EXTRN_ NEM_WIN_INHIBIT_INT;4531 fImport = CPUMCTX_EXTRN_RIP | CPUMCTX_EXTRN_CS | CPUMCTX_EXTRN_RFLAGS | CPUMCTX_EXTRN_INHIBIT_INT; 4532 4532 else if (rcStrict == VINF_EM_PENDING_R3_IOPORT_READ) 4533 fImport = CPUMCTX_EXTRN_RAX | CPUMCTX_EXTRN_RIP | CPUMCTX_EXTRN_CS | CPUMCTX_EXTRN_RFLAGS | CPUMCTX_EXTRN_ NEM_WIN_INHIBIT_INT;4533 fImport = CPUMCTX_EXTRN_RAX | CPUMCTX_EXTRN_RIP | CPUMCTX_EXTRN_CS | CPUMCTX_EXTRN_RFLAGS | CPUMCTX_EXTRN_INHIBIT_INT; 4534 4534 # endif 4535 4535 else if (VMCPU_FF_IS_ANY_SET(pVCpu, VMCPU_FF_INTERRUPT_PIC | VMCPU_FF_INTERRUPT_APIC -
trunk/src/VBox/VMM/VMMAll/VMXAllTemplate.cpp.h
r92451 r92495 95 95 | CPUMCTX_EXTRN_DR7 \ 96 96 | CPUMCTX_EXTRN_HWVIRT \ 97 | CPUMCTX_EXTRN_HM_VMX_MASK) 97 | CPUMCTX_EXTRN_INHIBIT_INT \ 98 | CPUMCTX_EXTRN_INHIBIT_NMI) 98 99 99 100 /** … … 5223 5224 vmxHCImportGuestRFlags(pVCpu, pVmcsInfo); 5224 5225 5225 if (fWhat & CPUMCTX_EXTRN_HM_VMX_INT_STATE)5226 if (fWhat & (CPUMCTX_EXTRN_INHIBIT_INT | CPUMCTX_EXTRN_INHIBIT_NMI)) 5226 5227 vmxHCImportGuestIntrState(pVCpu, pVmcsInfo); 5227 5228
Note:
See TracChangeset
for help on using the changeset viewer.