VirtualBox

Changeset 58390 in vbox for trunk/include


Ignore:
Timestamp:
Oct 23, 2015 12:35:35 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
103627
Message:

VMM/GIM: Implement Hyper-V debug receive thread optimization. Added a few statistics to GIM.
Fixed a bug in Windows guests' debug DHCP handling.

File:
1 edited

Legend:

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

    r58124 r58390  
    100100AssertCompileMemberAlignment(GIMMMIO2REGION, pvPageR0, 8);
    101101
    102 #if 0
    103102/**
    104  * A GIM Hypercall handler.
     103 * Debug data buffer available callback over the GIM debug connection.
    105104 *
    106  * @param   pVCpu   The cross context virtual CPU structure of the calling EMT.
    107  * @param   pCtx    Pointer to the guest-CPU context.
     105 * @param   pVM             The cross context VM structure.
    108106 */
    109 typedef DECLCALLBACK(int) FNGIMHYPERCALL(PVMCPU pVCpu, PCPUMCTX pCtx);
    110 /** Pointer to a GIM hypercall handler. */
    111 typedef FNGIMHYPERCALL *PFNGIMHYPERCALL;
     107typedef DECLCALLBACK(void) FNGIMDEBUGBUFAVAIL(PVM pVM);
     108/** Pointer to GIM debug buffer available callback. */
     109typedef FNGIMDEBUGBUFAVAIL *PFNGIMDEBUGBUFAVAIL;
    112110
    113111/**
    114  * A GIM MSR-read handler.
     112 * GIM debug setup.
    115113 *
    116  * @returns VBox status code.
    117  * @param   pVCpu   The cross context virtual CPU structure of the calling EMT.
    118  * @param   idMsr   The MSR being read.
    119  * @param   pRange  The range that the MSR belongs to.
    120  * @param   puValue Where to store the value of the MSR.
     114 * These are parameters/options filled in by the GIM provider and passed along
     115 * to the GIM device.
    121116 */
    122 typedef DECLCALLBACK(int) FNGIMRDMSR(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue);
    123 /** Pointer to a GIM MSR-read handler. */
    124 typedef FNGIMRDMSR *PFNGIMRDMSR;
     117typedef struct GIMDEBUGSETUP
     118{
     119    /** The callback to invoke when the receive buffer has data. */
     120    PFNGIMDEBUGBUFAVAIL     pfnDbgRecvBufAvail;
     121    /** The size of the receive buffer as specified by the GIM provider. */
     122    uint32_t                cbDbgRecvBuf;
     123} GIMDEBUGSETUP;
     124/** Pointer to a GIM debug setup struct. */
     125typedef struct GIMDEBUGSETUP *PGIMDEBUGSETUP;
     126/** Pointer to a const GIM debug setup struct. */
     127typedef struct GIMDEBUGSETUP const *PCGGIMDEBUGSETUP;
    125128
    126129/**
    127  * A GIM MSR-write handler.
     130 * GIM debug structure (common to the GIM device and GIM).
    128131 *
    129  * @returns VBox status code.
    130  * @param   pVCpu       The cross context virtual CPU structure of the calling EMT.
    131  * @param   idMsr       The MSR being written.
    132  * @param   pRange      The range that the MSR belongs to.
    133  * @param   uValue      The value to set, ignored bits masked.
    134  * @param   uRawValue   The raw value with the ignored bits not masked.
     132 * This is used to exchanging data between the GIM provider and the GIM device.
    135133 */
    136 typedef DECLCALLBACK(int) FNGIMWRMSR(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue);
    137 /** Pointer to a GIM MSR-write handler. */
    138 typedef FNGIMWRMSR *PFNGIMWRMSR;
    139 #endif
     134typedef struct GIMDEBUG
     135{
     136    /** The receive buffer. */
     137    void                   *pvDbgRecvBuf;
     138    /** The debug I/O stream driver. */
     139    PPDMISTREAM             pDbgDrvStream;
     140    /** Number of bytes pending to be read from the receive buffer. */
     141    uint32_t                cbDbgRecvBufRead;
     142    /** The flag synchronizing reads of the receive buffer from EMT. */
     143    volatile bool           fDbgRecvBufRead;
     144    /** The receive thread wakeup semaphore. */
     145    RTSEMEVENTMULTI         hDbgRecvThreadSem;
     146} GIMDEBUG;
     147/** Pointer to a GIM debug struct. */
     148typedef struct GIMDEBUG *PGIMDEBUG;
     149/** Pointer to a const GIM debug struct. */
     150typedef struct GIMDEBUG const *PCGIMDEBUG;
    140151
    141152
     
    166177VMMR3_INT_DECL(int)         GIMR3Term(PVM pVM);
    167178VMMR3_INT_DECL(void)        GIMR3Reset(PVM pVM);
    168 VMMR3DECL(void)             GIMR3GimDeviceRegister(PVM pVM, PPDMDEVINS pDevInsR3, PPDMISTREAM pDebugStreamR3);
     179VMMR3DECL(void)             GIMR3GimDeviceRegister(PVM pVM, PPDMDEVINS pDevInsR3, PGIMDEBUG pDbg);
     180VMMR3DECL(int)              GIMR3GetDebugSetup(PVM pVM, PGIMDEBUGSETUP pDbgSetup);
    169181VMMR3DECL(PGIMMMIO2REGION)  GIMR3GetMmio2Regions(PVM pVM, uint32_t *pcRegions);
    170182/** @} */
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