VirtualBox

Changeset 41338 in vbox for trunk/include


Ignore:
Timestamp:
May 16, 2012 2:39:21 PM (13 years ago)
Author:
vboxsync
Message:

Pass ring-0 address to the tracer when possible (makes accessing much easier).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VBoxTpG.h

    r41311 r41338  
    164164/** The type context mask. */
    165165#define VTG_TYPE_CTX_MASK       UINT32_C(0x0f000000)
     166/** The type is automatically converted to a ring-0 pointer. */
     167#define VTG_TYPE_AUTO_CONV_PTR  RT_BIT_32(28)
    166168/** The type is a physical address. */
    167169#define VTG_TYPE_PHYS           RT_BIT_32(29)
     
    171173#define VTG_TYPE_SIGNED         RT_BIT_32(31)
    172174/** Mask of valid bits (for simple validation). */
    173 #define VTG_TYPE_VALID_MASK     UINT32_C(0xef000fff)
     175#define VTG_TYPE_VALID_MASK     UINT32_C(0xff000fff)
    174176/** @} */
    175177
     
    403405extern VTGOBJHDR            g_VTGObjHeader;
    404406
     407
     408/** @name Macros for converting typical pointer arguments to ring-0 pointers.
     409 * @{ */
     410#ifdef IN_RING0
     411# define VTG_VM_TO_R0(a_pVM)                     (a_pVM)
     412# define VTG_VMCPU_TO_R0(a_pVCpu)                (a_pVCpu)
     413# define VTG_CPUMCTX_TO_R0(a_pVCpu, a_pCtx)      (a_pCtx)
     414#else
     415# define VTG_VM_TO_R0(a_pVM)                     ((a_pVM)->pVMR0)
     416# define VTG_VMCPU_TO_R0(a_pVCpu)                VM_R0_ADDR((a_pVCpu)->CTX_SUFF(pVM), a_pVCpu)
     417# define VTG_CPUMCTX_TO_R0(a_pVCpu, a_pCtx)      VM_R0_ADDR((a_pVCpu)->CTX_SUFF(pVM), a_pCtx)
     418#endif
     419/** @} */
     420
     421
    405422RT_C_DECLS_END
    406423
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