VirtualBox

Changeset 41940 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Jun 28, 2012 12:07:43 AM (12 years ago)
Author:
vboxsync
Message:

CPUMRaw[SG]etEFlags: Drop pCtxCore.

Location:
trunk/src/VBox/VMM/VMMAll
Files:
4 edited

Legend:

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

    r41939 r41940  
    22042204 *
    22052205 * @param   pVCpu       Pointer to the VMCPU.
    2206  * @param   pCtxCore    The context core.
    2207  * @param   eflags      The new EFLAGS value.
    2208  */
    2209 VMMDECL(void) CPUMRawSetEFlags(PVMCPU pVCpu, PCPUMCTXCORE pCtxCore, uint32_t eflags)
    2210 {
    2211     PVM pVM = pVCpu->CTX_SUFF(pVM);
    2212 
     2206 * @param   fEfl        The new EFLAGS value.
     2207 */
     2208VMMDECL(void) CPUMRawSetEFlags(PVMCPU pVCpu, uint32_t fEfl)
     2209{
    22132210    if (!pVCpu->cpum.s.fRawEntered)
    2214     {
    2215         pCtxCore->eflags.u32 = eflags;
    2216         return;
    2217     }
    2218     PATMRawSetEFlags(pVM, pCtxCore, eflags);
     2211        pVCpu->cpum.s.Guest.eflags.u32 = fEfl;
     2212    else
     2213        PATMRawSetEFlags(pVCpu->CTX_SUFF(pVM), CPUMCTX2CORE(&pVCpu->cpum.s.Guest), fEfl);
    22192214}
    22202215#endif /* !IN_RING0 */
     
    22252220 *
    22262221 * @returns The eflags.
    2227  * @param   pVCpu       Pointer to the VMCPU.
    2228  * @param   pCtxCore    The context core.
    2229  */
    2230 VMMDECL(uint32_t) CPUMRawGetEFlags(PVMCPU pVCpu, PCPUMCTXCORE pCtxCore)
     2222 * @param   pVCpu       Pointer to the current virtual CPU.
     2223 */
     2224VMMDECL(uint32_t) CPUMRawGetEFlags(PVMCPU pVCpu)
    22312225{
    22322226#ifdef IN_RING0
    2233     NOREF(pVCpu);
    2234     return pCtxCore->eflags.u32;
     2227    return pVCpu->cpum.s.Guest.eflags.u32;
    22352228#else
    2236     PVM pVM = pVCpu->CTX_SUFF(pVM);
    22372229
    22382230    if (!pVCpu->cpum.s.fRawEntered)
    2239         return pCtxCore->eflags.u32;
    2240     return PATMRawGetEFlags(pVM, pCtxCore);
     2231        return pVCpu->cpum.s.Guest.eflags.u32;
     2232    return PATMRawGetEFlags(pVCpu->CTX_SUFF(pVM), CPUMCTX2CORE(&pVCpu->cpum.s.Guest));
    22412233#endif
    22422234}
     
    22462238 * Sets the specified changed flags (CPUM_CHANGED_*).
    22472239 *
    2248  * @param   pVCpu       Pointer to the VMCPU.
     2240 * @param   pVCpu       Pointer to the current virtual CPU.
    22492241 */
    22502242VMMDECL(void) CPUMSetChangedFlags(PVMCPU pVCpu, uint32_t fChangedFlags)
  • trunk/src/VBox/VMM/VMMAll/EMAll.cpp

    r41939 r41940  
    636636    eflags &= uMask;
    637637
    638     CPUMRawSetEFlags(pVCpu, pRegFrame, eflags);
     638    CPUMRawSetEFlags(pVCpu, eflags);
    639639    Assert((pRegFrame->eflags.u32 & (X86_EFL_IF|X86_EFL_IOPL)) == X86_EFL_IF);
    640640
  • trunk/src/VBox/VMM/VMMAll/IOMAll.cpp

    r41939 r41940  
    853853     * If this isn't ring-0, we have to check for I/O privileges.
    854854     */
    855     uint32_t efl = CPUMRawGetEFlags(pVCpu, pCtxCore);
     855    uint32_t efl = CPUMRawGetEFlags(pVCpu);
    856856    uint32_t cpl = CPUMGetGuestCPL(pVCpu);
    857857
  • trunk/src/VBox/VMM/VMMAll/TRPMAll.cpp

    r41939 r41940  
    406406    /* Retrieve the eflags including the virtualized bits. */
    407407    /* Note: hackish as the cpumctxcore structure doesn't contain the right value */
    408     eflags.u32 = CPUMRawGetEFlags(pVCpu, pRegFrame);
     408    eflags.u32 = CPUMRawGetEFlags(pVCpu);
    409409
    410410    /* VMCPU_FF_INHIBIT_INTERRUPTS should be cleared upfront or don't call this function at all for dispatching hardware interrupts. */
     
    680680                    /* Turn off interrupts for interrupt gates. */
    681681                    if (GuestIdte.Gen.u5Type2 == VBOX_IDTE_TYPE2_INT_32)
    682                         CPUMRawSetEFlags(pVCpu, pRegFrame, eflags.u32 & ~X86_EFL_IF);
     682                        CPUMRawSetEFlags(pVCpu, eflags.u32 & ~X86_EFL_IF);
    683683
    684684                    /* The virtualized bits must be removed again!! */
Note: See TracChangeset for help on using the changeset viewer.

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