VirtualBox

Changeset 45749 in vbox for trunk/include/VBox/vmm


Ignore:
Timestamp:
Apr 26, 2013 12:14:09 AM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
85307
Message:

VMM: Introduced VMCPUSTATE_STARTED_HM for indicating that we're between HMR3Enter and HMR3Leave. Added HMIsInHwVirtCtx and VMMIsLongJumpArmed methods/macros.

Location:
trunk/include/VBox/vmm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/hm.h

    r45701 r45749  
    8888 */
    8989#define HMCanEmulateIoBlockEx(a_pCtx)   (!CPUMIsGuestInPagedProtectedModeEx(a_pCtx))
     90
     91/**
     92 * Checks whether we're in the special hardware virtualization context.
     93 * @returns true / false.
     94 * @param   a_pVCpu     The caller's cross context virtual CPU structure.
     95 * @thread  EMT
     96 */
     97#ifdef IN_RING0
     98# define HMIsInHwVirtCtx(a_pVCpu)       (VMCPU_GET_STATE(a_pVCpu) == VMCPUSTATE_STARTED_HM)
     99#else
     100# define HMIsInHwVirtCtx(a_pVCpu)       (false)
     101#endif
     102
    90103
    91104VMMDECL(bool)                   HMIsEnabledNotMacro(PVM pVM);
  • trunk/include/VBox/vmm/vm.h

    r45701 r45749  
    6969    /** CPU started. */
    7070    VMCPUSTATE_STARTED,
    71     /** Executing guest code and can be poked. */
     71    /** CPU started in HM context. */
     72    VMCPUSTATE_STARTED_HM,
     73    /** Executing guest code and can be poked (RC or STI bits of HM). */
    7274    VMCPUSTATE_STARTED_EXEC,
    7375    /** Executing guest code in the recompiler. */
  • trunk/include/VBox/vmm/vmm.h

    r45701 r45749  
    230230
    231231
     232/**
     233 * Checks whether we've armed the ring-0 long jump machinery.
     234 *
     235 * @returns @c true / @c false
     236 * @param   pVCpu           The caller's cross context virtual CPU structure.
     237 * @thread  EMT
     238 * @sa      VMMR0IsLongJumpArmed
     239 */
     240#ifdef IN_RING0
     241# define VMMIsLongJumpArmed(a_pVCpu)                VMMR0IsLongJumpArmed(a_pVCpu)
     242#else
     243# define VMMIsLongJumpArmed(a_pVCpu)                (false)
     244#endif
     245
     246
    232247VMM_INT_DECL(RTRCPTR)       VMMGetStackRC(PVMCPU pVCpu);
    233248VMMDECL(VMCPUID)            VMMGetCpuId(PVM pVM);
     
    238253VMM_INT_DECL(uint32_t)      VMMGetSvnRev(void);
    239254VMM_INT_DECL(VMMSWITCHER)   VMMGetSwitcher(PVM pVM);
     255VMM_INT_DECL(bool)          VMMIsInRing3Call(PVMCPU pVCpu);
    240256VMM_INT_DECL(void)          VMMTrashVolatileXMMRegs(void);
    241257
     
    479495VMMR0DECL(int)      VMMR0EntryEx(PVM pVM, VMCPUID idCpu, VMMR0OPERATION enmOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION);
    480496VMMR0DECL(int)      VMMR0TermVM(PVM pVM, PGVM pGVM);
     497VMMR0_INT_DECL(bool) VMMR0IsLongJumpArmed(PVMCPU pVCpu);
     498
    481499
    482500#ifdef LOG_ENABLED
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