VirtualBox

Changeset 19334 in vbox for trunk/include


Ignore:
Timestamp:
May 4, 2009 4:03:57 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
46812
Message:

DBGF,SELM,DBGC,++: Refactored the selector info querying and usage, mainly for fixing VM_ASSERT_EMT issues cropping up after from #3170, but also for moving the external interface to DBGF.

Location:
trunk/include/VBox
Files:
1 added
2 edited

Legend:

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

    r19293 r19334  
    3535#include <VBox/vmm.h>
    3636#include <VBox/log.h>                   /* LOG_ENABLED */
     37#include <VBox/dbgfsel.h>
    3738
    3839#include <iprt/stdarg.h>
     
    814815
    815816
     817/** @name DBGFR3SelQueryInfo flags.
     818 * @{ */
     819/** Get the info from the guest descriptor table. */
     820#define DBGFSELQI_FLAGS_DT_GUEST        UINT32_C(0)
     821/** Get the info from the shadow descriptor table.
     822 * Only works in raw-mode.  */
     823#define DBGFSELQI_FLAGS_DT_SHADOW       UINT32_C(1)
     824/** @} */
     825VMMR3DECL(int) DBGFR3SelQueryInfo(PVM pVM, VMCPUID idCpu, RTSEL Sel, uint32_t fFlags, PDBGFSELINFO pSelInfo);
     826
     827
    816828/**
    817829 * Guest OS digger interface identifier.
  • trunk/include/VBox/selm.h

    r18927 r19334  
    3535#include <VBox/x86.h>
    3636#include <VBox/dis.h>
     37#include <VBox/dbgfsel.h>
    3738
    3839
     
    8586VMMDECL(int)        SELMGetLDTFromSel(PVM pVM, RTSEL SelLdt, PRTGCPTR ppvLdt, unsigned *pcbLimit);
    8687
    87 /**
    88  * Selector information structure.
    89  */
    90 typedef struct SELMSELINFO
    91 {
    92     /** The base address. */
    93     RTGCPTR         GCPtrBase;
    94     /** The limit (-1). */
    95     RTGCUINTPTR     cbLimit;
    96     /** The raw descriptor. */
    97     union
    98     {
    99         X86DESC     Raw;
    100         X86DESC64   Raw64;
    101     };
    102     /** The selector. */
    103     RTSEL           Sel;
    104     /** Set if the selector is used by the hypervisor. */
    105     bool            fHyper;
    106     /** Set if the selector is a real mode segment. */
    107     bool            fRealMode;
    108 } SELMSELINFO;
    109 /** Pointer to a SELM selector information struct. */
    110 typedef SELMSELINFO *PSELMSELINFO;
    111 /** Pointer to a const SELM selector information struct. */
    112 typedef const SELMSELINFO *PCSELMSELINFO;
    113 
    114 VMMDECL(int)        SELMSelInfoValidateCS(PCSELMSELINFO pSelInfo, RTSEL SelCPL);
    115 
    116 /** @def SELMSelInfoIsExpandDown
    117  * Tests whether the selector info describes an expand-down selector or now.
    118  *
    119  * @returns true / false.
    120  * @param   pSelInfo        The selector info.
    121  *
    122  * @remark  Realized as a macro for reasons of speed/lazyness and to avoid
    123  *          dragging in VBox/x86.h for now.
    124  */
    125 #define SELMSelInfoIsExpandDown(pSelInfo) \
    126     (   (pSelInfo)->Raw.Gen.u1DescType \
    127      && ((pSelInfo)->Raw.Gen.u4Type & (X86_SEL_TYPE_DOWN | X86_SEL_TYPE_CODE)) == X86_SEL_TYPE_DOWN)
    128 
    12988
    13089#ifdef IN_RING3
     
    14099VMMR3DECL(int)      SELMR3UpdateFromCPUM(PVM pVM, PVMCPU pVCpu);
    141100VMMR3DECL(int)      SELMR3SyncTSS(PVM pVM, PVMCPU pVCpu);
    142 VMMR3DECL(int)      SELMR3GetSelectorInfo(PVM pVM, PVMCPU pVCpu, RTSEL Sel, PSELMSELINFO pSelInfo);
    143 VMMR3DECL(int)      SELMR3GetShadowSelectorInfo(PVM pVM, RTSEL Sel, PSELMSELINFO pSelInfo);
     101VMMR3DECL(int)      SELMR3GetSelectorInfo(PVM pVM, PVMCPU pVCpu, RTSEL Sel, PDBGFSELINFO pSelInfo);
     102VMMR3DECL(int)      SELMR3GetShadowSelectorInfo(PVM pVM, RTSEL Sel, PDBGFSELINFO pSelInfo);
    144103VMMR3DECL(void)     SELMR3DisableMonitoring(PVM pVM);
    145104VMMR3DECL(void)     SELMR3DumpDescriptor(X86DESC  Desc, RTSEL Sel, const char *pszMsg);
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