VirtualBox

Changeset 87349 in vbox for trunk/src/VBox/VMM/VMMR3


Ignore:
Timestamp:
Jan 21, 2021 12:11:34 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
142325
Message:

VMM/CPUM: Kicked out CPUMR3RemEnter & CPUMR3RemLeave. bugref:9576

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/CPUM.cpp

    r87347 r87349  
    44774477
    44784478/**
    4479  * Enters REM, gets and resets the changed flags (CPUM_CHANGED_*).
    4480  *
    4481  * Only REM should ever call this function!
    4482  *
    4483  * @returns The changed flags.
    4484  * @param   pVCpu       The cross context virtual CPU structure.
    4485  * @param   puCpl       Where to return the current privilege level (CPL).
    4486  */
    4487 VMMR3DECL(uint32_t) CPUMR3RemEnter(PVMCPU pVCpu, uint32_t *puCpl)
    4488 {
    4489     Assert(!pVCpu->cpum.s.fRemEntered);
    4490 
    4491     /*
    4492      * Get the CPL first.
    4493      */
    4494     *puCpl = CPUMGetGuestCPL(pVCpu);
    4495 
    4496     /*
    4497      * Get and reset the flags.
    4498      */
    4499     uint32_t fFlags = pVCpu->cpum.s.fChanged;
    4500     pVCpu->cpum.s.fChanged = 0;
    4501 
    4502     /** @todo change the switcher to use the fChanged flags. */
    4503     if (pVCpu->cpum.s.fUseFlags & CPUM_USED_FPU_SINCE_REM)
    4504     {
    4505         fFlags |= CPUM_CHANGED_FPU_REM;
    4506         pVCpu->cpum.s.fUseFlags &= ~CPUM_USED_FPU_SINCE_REM;
    4507     }
    4508 
    4509     pVCpu->cpum.s.fRemEntered = true;
    4510     return fFlags;
    4511 }
    4512 
    4513 
    4514 /**
    4515  * Leaves REM.
    4516  *
    4517  * @param   pVCpu               The cross context virtual CPU structure.
    4518  * @param   fNoOutOfSyncSels    This is @c false if there are out of sync
    4519  *                              registers.
    4520  */
    4521 VMMR3DECL(void) CPUMR3RemLeave(PVMCPU pVCpu, bool fNoOutOfSyncSels)
    4522 {
    4523     Assert(pVCpu->cpum.s.fRemEntered);
    4524 
    4525     RT_NOREF_PV(fNoOutOfSyncSels);
    4526 
    4527     pVCpu->cpum.s.fRemEntered = false;
    4528 }
    4529 
    4530 
    4531 /**
    45324479 * Called when the ring-3 init phase completes.
    45334480 *
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