- Timestamp:
- Oct 24, 2022 10:15:44 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 154277
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
r97231 r97286 197 197 VMM_INT_DECL(bool) CPUMAssertGuestRFlagsCookie(PVM pVM, PVMCPU pVCpu) 198 198 { 199 AssertLogRelMsgReturn( (pVCpu->cpum.s.Guest.rflags.uBoth & ~(uint64_t)(X86_EFL_LIVE_MASK | X86_EFL_RA1_MASK)) 199 AssertLogRelMsgReturn( ( pVCpu->cpum.s.Guest.rflags.uBoth 200 & ~(uint64_t)(CPUMX86EFLAGS_HW_MASK_64 | CPUMX86EFLAGS_INT_MASK_64)) 200 201 == pVM->cpum.s.fReservedRFlagsCookie 201 && (pVCpu->cpum.s.Guest.rflags.uBoth & X86_EFL_RA1_MASK) == X86_EFL_RA1_MASK, 202 && (pVCpu->cpum.s.Guest.rflags.uBoth & X86_EFL_RA1_MASK) == X86_EFL_RA1_MASK 203 && (pVCpu->cpum.s.Guest.rflags.uBoth & X86_EFL_RAZ_MASK & CPUMX86EFLAGS_HW_MASK_64) == 0, 202 204 ("rflags=%#RX64 vs fReservedRFlagsCookie=%#RX64\n", 203 205 pVCpu->cpum.s.Guest.rflags.uBoth, pVM->cpum.s.fReservedRFlagsCookie), … … 1951 1953 * or raw-mode). Hence we use the function below which handles the details. 1952 1954 */ 1953 if ( pVCpu->cpum.s.Guest.fInhibit == 01954 || ( !(pVCpu->cpum.s.Guest. fInhibit& CPUMCTX_INHIBIT_NMI)1955 if ( !(pVCpu->cpum.s.Guest.eflags.uBoth & CPUMCTX_INHIBIT_ALL_MASK) 1956 || ( !(pVCpu->cpum.s.Guest.eflags.uBoth & CPUMCTX_INHIBIT_NMI) 1955 1957 && pVCpu->cpum.s.Guest.uRipInhibitInt != pVCpu->cpum.s.Guest.rip)) 1956 1958 { … … 1983 1985 * NONMASKABLE INTERRUPT (NMI)" in SDM 3A seems pretty clear to me. 1984 1986 */ 1985 if (!(pVCpu->cpum.s.Guest. fInhibit& CPUMCTX_INHIBIT_NMI))1987 if (!(pVCpu->cpum.s.Guest.eflags.uBoth & CPUMCTX_INHIBIT_NMI)) 1986 1988 return CPUMINTERRUPTIBILITY_INT_INHIBITED; 1987 1989 return CPUMINTERRUPTIBILITY_NMI_INHIBIT; -
trunk/src/VBox/VMM/VMMAll/IEMAllCImplSvmInstr.cpp
r97222 r97286 324 324 * Restore the subset of the inhibit flags that were preserved. 325 325 */ 326 pVCpu->cpum.GstCtx. fInhibit|= pVCpu->cpum.GstCtx.hwvirt.fSavedInhibit;326 pVCpu->cpum.GstCtx.eflags.uBoth |= pVCpu->cpum.GstCtx.hwvirt.fSavedInhibit; 327 327 328 328 if (rcStrict == VINF_SUCCESS) … … 729 729 * preserve VMCPU_FF_INHIBIT_INTERRUPTS. 730 730 */ 731 pVCpu->cpum.GstCtx.hwvirt.fSavedInhibit = pVCpu->cpum.GstCtx. fInhibit& CPUMCTX_INHIBIT_NMI;732 pVCpu->cpum.GstCtx. fInhibit &=~CPUMCTX_INHIBIT_NMI;731 pVCpu->cpum.GstCtx.hwvirt.fSavedInhibit = pVCpu->cpum.GstCtx.eflags.uBoth & CPUMCTX_INHIBIT_NMI; 732 pVCpu->cpum.GstCtx.eflags.uBoth &= ~CPUMCTX_INHIBIT_NMI; 733 733 734 734 /* -
trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp
r97263 r97286 1243 1243 * the nested-guest. 1244 1244 */ 1245 pVCpu->cpum.GstCtx.hwvirt.fSavedInhibit = pVCpu->cpum.GstCtx. fInhibit& CPUMCTX_INHIBIT_NMI;1245 pVCpu->cpum.GstCtx.hwvirt.fSavedInhibit = pVCpu->cpum.GstCtx.eflags.uBoth & CPUMCTX_INHIBIT_NMI; 1246 1246 } 1247 1247 … … 1257 1257 * If there is some other code doing that already, it would be great 1258 1258 * to point to it here... */ 1259 pVCpu->cpum.GstCtx. fInhibit|= pVCpu->cpum.GstCtx.hwvirt.fSavedInhibit;1259 pVCpu->cpum.GstCtx.eflags.uBoth |= pVCpu->cpum.GstCtx.hwvirt.fSavedInhibit; 1260 1260 pVCpu->cpum.GstCtx.hwvirt.fSavedInhibit = 0; 1261 1261 } -
trunk/src/VBox/VMM/VMMR3/CPUM.cpp
r97265 r97286 162 162 163 163 /** For saved state only: Block injection of non-maskable interrupts to the guest. 164 * @note This flag was moved to CPUMCTX:: fInhibit in v7.0.2. */164 * @note This flag was moved to CPUMCTX::eflags.uBoth in v7.0.4. */ 165 165 #define CPUM_OLD_VMCPU_FF_BLOCK_NMIS RT_BIT_64(25) 166 166 … … 3150 3150 * 3151 3151 * @param pszEFlags Where to write the mnemonics. (Assumes sufficient buffer space.) 3152 * @param efl The EFLAGS value with fInhibit in bits 31:24. 3152 * @param efl The EFLAGS value with both guest hardware and VBox 3153 * internal bits included. 3153 3154 */ 3154 3155 static void cpumR3InfoFormatFlags(char *pszEFlags, uint32_t efl) … … 3177 3178 { "po", "pe", X86_EFL_PF }, 3178 3179 { "cy", "nc", X86_EFL_CF }, 3179 { "inh-ss", NULL, (uint32_t)CPUMCTX_INHIBIT_SHADOW_SS << 24},3180 { "inh-sti", NULL, (uint32_t)CPUMCTX_INHIBIT_SHADOW_STI << 24},3181 { "inh-nmi", NULL, (uint32_t)CPUMCTX_INHIBIT_NMI << 24},3180 { "inh-ss", NULL, CPUMCTX_INHIBIT_SHADOW_SS }, 3181 { "inh-sti", NULL, CPUMCTX_INHIBIT_SHADOW_STI }, 3182 { "inh-nmi", NULL, CPUMCTX_INHIBIT_NMI }, 3182 3183 }; 3183 3184 char *psz = pszEFlags; … … 3212 3213 * Format the EFLAGS. 3213 3214 */ 3214 uint32_t efl = pCtx->eflags.u;3215 3215 char szEFlags[80]; 3216 cpumR3InfoFormatFlags(&szEFlags[0], efl | ((uint32_t)pCtx->fInhibit << 24));3216 cpumR3InfoFormatFlags(&szEFlags[0], pCtx->eflags.uBoth); 3217 3217 3218 3218 /* 3219 3219 * Format the registers. 3220 3220 */ 3221 uint32_t const efl = pCtx->eflags.u; 3221 3222 switch (enmType) 3222 3223 { -
trunk/src/VBox/VMM/include/CPUMInternal.mac
r97213 r97286 190 190 .Guest.eip resq 1 191 191 .Guest.eflags resq 1 192 .Guest. fInhibit resb 1192 .Guest.abPadding resb 8 193 193 alignb 8 194 194 .Guest.uRipInhibitInt resq 1
Note:
See TracChangeset
for help on using the changeset viewer.