VirtualBox

Changeset 97221 in vbox


Ignore:
Timestamp:
Oct 18, 2022 10:51:49 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
154197
Message:

VMM/IEM: Access CPUMCTX::eflags via the 'u' member when possible in preparation for putting internal info in the reserved bits.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAll.cpp

    r97213 r97221  
    22422242     * Clear the busy bit in current task's TSS descriptor if it's a task switch due to JMP/IRET.
    22432243     */
    2244     uint32_t u32EFlags = pVCpu->cpum.GstCtx.eflags.u32;
     2244    uint32_t fEFlags = pVCpu->cpum.GstCtx.eflags.u;
    22452245    if (   enmTaskSwitch == IEMTASKSWITCH_JUMP
    22462246        || enmTaskSwitch == IEMTASKSWITCH_IRET)
     
    22702270            Assert(   uNewTSSType == X86_SEL_TYPE_SYS_286_TSS_BUSY
    22712271                   || uNewTSSType == X86_SEL_TYPE_SYS_386_TSS_BUSY);
    2272             u32EFlags &= ~X86_EFL_NT;
     2272            fEFlags &= ~X86_EFL_NT;
    22732273        }
    22742274    }
     
    22822282        Log(("iemTaskSwitch: Switching to the same TSS! enmTaskSwitch=%u GCPtr[Cur|New]TSS=%#RGv\n", enmTaskSwitch, GCPtrCurTSS));
    22832283        Log(("uCurCr3=%#x uCurEip=%#x uCurEflags=%#x uCurEax=%#x uCurEsp=%#x uCurEbp=%#x uCurCS=%#04x uCurSS=%#04x uCurLdt=%#x\n",
    2284              pVCpu->cpum.GstCtx.cr3, pVCpu->cpum.GstCtx.eip, pVCpu->cpum.GstCtx.eflags.u32, pVCpu->cpum.GstCtx.eax,
     2284             pVCpu->cpum.GstCtx.cr3, pVCpu->cpum.GstCtx.eip, pVCpu->cpum.GstCtx.eflags.u, pVCpu->cpum.GstCtx.eax,
    22852285             pVCpu->cpum.GstCtx.esp, pVCpu->cpum.GstCtx.ebp, pVCpu->cpum.GstCtx.cs.Sel, pVCpu->cpum.GstCtx.ss.Sel,
    22862286             pVCpu->cpum.GstCtx.ldtr.Sel));
     
    23072307        PX86TSS32 pCurTSS32 = (PX86TSS32)((uintptr_t)pvCurTSS32 - offCurTSS);
    23082308        pCurTSS32->eip    = uNextEip;
    2309         pCurTSS32->eflags = u32EFlags;
     2309        pCurTSS32->eflags = fEFlags;
    23102310        pCurTSS32->eax    = pVCpu->cpum.GstCtx.eax;
    23112311        pCurTSS32->ecx    = pVCpu->cpum.GstCtx.ecx;
     
    23512351        PX86TSS16 pCurTSS16 = (PX86TSS16)((uintptr_t)pvCurTSS16 - offCurTSS);
    23522352        pCurTSS16->ip    = uNextEip;
    2353         pCurTSS16->flags = u32EFlags;
     2353        pCurTSS16->flags = (uint16_t)fEFlags;
    23542354        pCurTSS16->ax    = pVCpu->cpum.GstCtx.ax;
    23552355        pCurTSS16->cx    = pVCpu->cpum.GstCtx.cx;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette