VirtualBox

Changeset 58390 in vbox for trunk/src/VBox/VMM/include


Ignore:
Timestamp:
Oct 23, 2015 12:35:35 PM (9 years ago)
Author:
vboxsync
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.

Location:
trunk/src/VBox/VMM/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/include/GIMHvInternal.h

    r58335 r58390  
    713713/** The undocumented bit for MSR_GIM_HV_DEBUG_OPTIONS_MSR that makes it all
    714714 *  work. */
    715 #define GIM_HV_DEBUG_OPTIONS_MSR_ENABLE           RT_BIT(2)
     715#define GIM_HV_DEBUG_OPTIONS_USE_HYPERCALLS       RT_BIT(2)
    716716
    717717/** Guest will perform the HvPostDebugData hypercall until completion. */
     
    10471047    /** Whether we're posing as the Microsoft virtualization service. */
    10481048    bool                        fIsInterfaceVs;
    1049     bool                        afAlignment0[6];
    1050     /** The auto IP address last chosen by the guest after failed ARP queries. */
     1049    /** Whether debugging support is enabled. */
     1050    bool                        fDbgEnabled;
     1051    /** Whether we should suggest a hypercall-based debug interface to the guest. */
     1052    bool                        fDbgHypercallInterface;
     1053    bool                        afAlignment0[4];
     1054    /** The action to take while sending replies. */
     1055    GIMHVDEBUGREPLY             enmDbgReply;
     1056    /** The IP address chosen by/assigned to the guest. */
    10511057    RTNETADDRIPV4               DbgGuestIp4Addr;
    1052     /** The action to take while sending replies. */
    1053     GIMHVDEBUGREPLY             enmDebugReply;
    10541058    /** Transaction ID for the BOOTP+DHCP sequence. */
    1055     uint32_t                    uBootpXId;
    1056     /** Padding. */
    1057     uint32_t                    uAlignment0;
     1059    uint32_t                    uDbgBootpXId;
     1060    /** The source UDP port used by the guest while sending debug packets. */
     1061    uint16_t                    uUdpGuestSrcPort;
     1062    /** The destination UDP port used by the guest while sending debug packets. */
     1063    uint16_t                    uUdpGuestDstPort;
    10581064    /** Debug send buffer MSR. */
    1059     uint64_t                    uDebugSendBufferMsr;
     1065    uint64_t                    uDbgSendBufferMsr;
    10601066    /** Debug receive buffer MSR. */
    1061     uint64_t                    uDebugRecvBufferMsr;
     1067    uint64_t                    uDbgRecvBufferMsr;
    10621068    /** Debug pending buffer MSR. */
    1063     uint64_t                    uDebugPendingBufferMsr;
     1069    uint64_t                    uDbgPendingBufferMsr;
    10641070    /** Debug status MSR. */
    1065     uint64_t                    uDebugStatusMsr;
     1071    uint64_t                    uDbgStatusMsr;
     1072    /** Intermediate debug I/O buffer. */
     1073    R3PTRTYPE(void *)           pvDbgBuffer;
    10661074    /** @} */
    10671075
     
    11131121VMMR3_INT_DECL(int)             gimR3HvSave(PVM pVM, PSSMHANDLE pSSM);
    11141122VMMR3_INT_DECL(int)             gimR3HvLoad(PVM pVM, PSSMHANDLE pSSM, uint32_t uSSMVersion);
     1123VMMR3_INT_DECL(int)             gimR3HvGetDebugSetup(PVM pVM, PGIMDEBUGSETUP pDbgSetup);
    11151124
    11161125VMMR3_INT_DECL(int)             gimR3HvDisableTscPage(PVM pVM);
  • trunk/src/VBox/VMM/include/GIMInternal.h

    r58283 r58390  
    5454    /** Pointer to the GIM device - R3 ptr. */
    5555    R3PTRTYPE(PPDMDEVINS)            pDevInsR3;
    56     /** Pointer to the GIM device debug stream - R3 ptr. */
    57     R3PTRTYPE(PPDMISTREAM)           pDebugStreamR3;
    58 #if 0
    59     /** Pointer to the provider's ring-3 hypercall handler. */
    60     R3PTRTYPE(PFNGIMHYPERCALL)       pfnHypercallR3;
    61     /** Pointer to the provider's ring-0 hypercall handler. */
    62     R0PTRTYPE(PFNGIMHYPERCALL)       pfnHypercallR0;
    63     /** Pointer to the provider's raw-mode context hypercall handler. */
    64     RCPTRTYPE(PFNGIMHYPERCALL)       pfnHypercallRC;
     56    /** The debug struct - R3 ptr. */
     57    R3PTRTYPE(PGIMDEBUG)             pDbgR3;
    6558
    66     /** Pointer to the provider's ring-3 MSR-read handler. */
    67     R3PTRTYPE(PFNGIMRDMSR)           pfnReadMsrR3;
    68     /** Pointer to the provider's ring-0 MSR-read handler. */
    69     R0PTRTYPE(PFNGIMRDMSR)           pfnReadMsrR0;
    70     /** Pointer to the provider's raw-mode context MSR-read handler. */
    71     RCPTRTYPE(PFNGIMRDMSR)           pfnReadMsrRC;
    72 
    73     /** Pointer to the provider's ring-3 MSR-read handler. */
    74     R3PTRTYPE(PFNGIMWDMSR)           pfnWriteMsrR3;
    75     /** Pointer to the provider's ring-0 MSR-read handler. */
    76     R0PTRTYPE(PFNGIMWDMSR)           pfnWriteMsrRR0;
    77     /** Pointer to the provider's raw-mode context MSR-read handler. */
    78     RCPTRTYPE(PFNGIMWDMSR)           pfnWriteMsrRRC;
    79 #endif
    80 
     59    /** The provider specific data. */
    8160    union
    8261    {
     
    8463        GIMKVM Kvm;
    8564    } u;
     65
     66    /** Number of hypercalls initiated. */
     67    STAMCOUNTER                      StatHypercalls;
     68    /** Debug packets sent. */
     69    STAMCOUNTER                      StatDbgXmit;
     70    /** Debug bytes sent. */
     71    STAMCOUNTER                      StatDbgXmitBytes;
     72    /** Debug packets received. */
     73    STAMCOUNTER                      StatDbgRecv;
     74    /** Debug bytes received. */
     75    STAMCOUNTER                      StatDbgRecvBytes;
    8676} GIM;
    8777/** Pointer to GIM VM instance data. */
    8878typedef GIM *PGIM;
    89 
    9079
    9180/**
     
    10392typedef GIMCPU *PGIMCPU;
    10493
     94/**
     95 * Callback when a debug buffer read has completed and before signaling
     96 * the next read.
     97 *
     98 * @param   pVM             The cross context VM structure.
     99 */
     100typedef DECLCALLBACK(void) FNGIMDEBUGBUFREADCOMPLETED(PVM pVM);
     101/** Pointer to GIM debug buffer read completion callback. */
     102typedef FNGIMDEBUGBUFREADCOMPLETED *PFNGIMDEBUGBUFREADCOMPLETED;
     103
    105104#ifdef IN_RING3
    106105VMMR3_INT_DECL(int)           GIMR3Mmio2Unmap(PVM pVM, PGIMMMIO2REGION pRegion);
     
    109108VMMR3_INT_DECL(int)           GIMR3Mmio2HandlerPhysicalDeregister(PVM pVM, PGIMMMIO2REGION pRegion);
    110109
    111 VMMR3_INT_DECL(int)           GIMR3DebugRead(PVM pVM, void *pvRead, size_t *pcbRead);
     110VMMR3_INT_DECL(int)           GIMR3DebugRead(PVM pVM, void *pvRead, size_t *pcbRead, PFNGIMDEBUGBUFREADCOMPLETED pfnReadComplete);
    112111VMMR3_INT_DECL(int)           GIMR3DebugWrite(PVM pVM, void *pvWrite, size_t *pcbWrite);
    113112#endif /* IN_RING3 */
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