VirtualBox

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


Ignore:
Timestamp:
Sep 20, 2013 1:42:09 PM (11 years ago)
Author:
vboxsync
Message:

VMMR0/HMR0: HM-Context flag macros.

File:
1 edited

Legend:

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

    r48565 r48591  
    4545 * @param   fFlag   The flag to clear.
    4646 */
    47 #define VMCPU_HMCF_CLEAR(pVCpu, fFlag)          ((pVCpu)->hm.s.fContextUseFlags &= ~(fFlag))
     47#define VMCPU_HMCF_CLEAR(pVCpu, fFlag)              ((pVCpu)->hm.s.fContextUseFlags &= ~(fFlag))
    4848
    4949/** @def VMCPU_FF_SET
     
    5353 * @param   fFlag   The flag to set.
    5454 */
    55 #define VMCPU_HMCF_SET(pVCpu, fFlag)            ((pVCpu)->hm.s.fContextUseFlags |= (fFlag))
     55#define VMCPU_HMCF_SET(pVCpu, fFlag)                ((pVCpu)->hm.s.fContextUseFlags |= (fFlag))
    5656
    5757/** @def VMCPU_HMCF_IS_SET
    58  * Checks if -only- the specified HM-context flag is set and nothing else.
     58 * Checks if all the flags in the specified HM-context set is pending.
    5959 *
    6060 * @param   pVCpu   Pointer to the VMCPU.
    6161 * @param   fFlag   The flag to check.
    6262 */
    63 #define VMCPU_HMCF_IS_SET(pVCpu, fFlag)         (((pVCpu)->hm.s.fContextUseFlags & (fFlag)) == (fFlag))
     63#define VMCPU_HMCF_IS_SET(pVCpu, fFlag)             (((pVCpu)->hm.s.fContextUseFlags & (fFlag)) == (fFlag))
    6464
    6565/** @def VMCPU_HMCF_IS_PENDING
    66  * Checks if a HM-context flags is pending.
     66 * Checks if one or more of the flags in the specified HM-context set is
     67 * pending.
    6768 *
    6869 * @param   pVCpu   Pointer to the VMCPU.
    6970 * @param   fFlags  The flags to check for.
    7071 */
    71 #define VMCPU_HMCF_IS_PENDING(pVCpu, fFlags)    RT_BOOL((pVCpu)->hm.s.fContextUseFlags & (fFlags))
     72#define VMCPU_HMCF_IS_PENDING(pVCpu, fFlags)        RT_BOOL((pVCpu)->hm.s.fContextUseFlags & (fFlags))
     73
     74/** @def VMCPU_HMCF_IS_PENDING_ONLY
     75 * Checks if -only- one or more of the specified HM-context flags is pending.
     76 *
     77 * @param   pVCpu   Pointer to the VMCPU.
     78 * @param   fFlags  The flags to check for.
     79 */
     80#define VMCPU_HMCF_IS_PENDING_ONLY(pVCpu, fFlags)   !RT_BOOL((pVCpu)->hm.s.fContextUseFlags & ~(fFlags))
     81
     82/** @def VMCPU_HMCF_IS_SET_ONLY
     83 * Checks if -only- all the flags in the specified HM-context set is pending.
     84 *
     85 * @param   pVCpu   Pointer to the VMCPU.
     86 * @param   fFlags  The flags to check for.
     87 */
     88#define VMCPU_HMCF_IS_SET_ONLY(pVCpu, fFlags)       ((pVCpu)->hm.s.fContextUseFlags == (fFlags))
    7289
    7390/** @def VMCPU_HMCF_RESET_TO
     
    7592 *
    7693 * @param   pVCpu   Pointer to the VMCPU.
    77  * @param   fFlags  The reset value.
    78  */
    79 #define VMCPU_HMCF_RESET_TO(pVCpu, fFlags)      ((pVCpu)->hm.s.fContextUseFlags = (fFlags))
     94 * @param   fFlags  The new value.
     95 */
     96#define VMCPU_HMCF_RESET_TO(pVCpu, fFlags)          ((pVCpu)->hm.s.fContextUseFlags = (fFlags))
     97
     98/** @def VMCPU_HMCF_VALUE
     99 * Returns the current HM-context flags value.
     100 *
     101 * @param   pVCpu   Pointer to the VMCPU.
     102 */
     103#define VMCPU_HMCF_VALUE(pVCpu)                     ((pVCpu)->hm.s.fContextUseFlags)
     104
    80105
    81106/**
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