VirtualBox

Changeset 44709 in vbox


Ignore:
Timestamp:
Feb 15, 2013 1:50:45 AM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
83808
Message:

VMMDev: Cleanups.

Location:
trunk/src/VBox/Devices
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/VMMDev/VMMDev.cpp

    r44528 r44709  
    2020*   Header Files                                                               *
    2121*******************************************************************************/
    22 
    2322/* Enable dev_vmm Log3 statements to get IRQ-related logging. */
    24 
    2523#define LOG_GROUP LOG_GROUP_DEV_VMM
    2624#include <VBox/VMMDev.h>
     
    6260*   Defined Constants And Macros                                               *
    6361*******************************************************************************/
    64 #define PCIDEV_2_VMMDEVSTATE(pPciDev)              ( (VMMDevState *)(pPciDev) )
    6562#define VMMDEVSTATE_2_DEVINS(pVMMDevState)         ( (pVMMDevState)->pDevIns )
    6663
     
    9996#ifndef VBOX_DEVICE_STRUCT_TESTCASE
    10097
    101 /* Whenever host wants to inform guest about something
    102  * an IRQ notification will be raised.
     98/** @page pg_vmmdev   VMMDev
     99 *
     100 * Whenever host wants to inform guest about something an IRQ notification will
     101 * be raised.
    103102 *
    104103 * VMMDev PDM interface will contain the guest notification method.
    105104 *
    106  * There is a 32 bit event mask which will be read
    107  * by guest on an interrupt. A non zero bit in the mask
    108  * means that the specific event occurred and requires
     105 * There is a 32 bit event mask which will be read by guest on an interrupt.  A
     106 * non zero bit in the mask means that the specific event occurred and requires
    109107 * processing on guest side.
    110108 *
    111  * After reading the event mask guest must issue a
    112  * generic request AcknowlegdeEvents.
     109 * After reading the event mask guest must issue a generic request
     110 * AcknowlegdeEvents.
    113111 *
    114  * IRQ line is set to 1 (request) if there are unprocessed
    115  * events, that is the event mask is not zero.
     112 * IRQ line is set to 1 (request) if there are unprocessed events, that is the
     113 * event mask is not zero.
    116114 *
    117  * After receiving an interrupt and checking event mask,
    118  * the guest must process events using the event specific
    119  * mechanism.
     115 * After receiving an interrupt and checking event mask, the guest must process
     116 * events using the event specific mechanism.
    120117 *
    121  * That is if mouse capabilities were changed,
    122  * guest will use VMMDev_GetMouseStatus generic request.
     118 * That is if mouse capabilities were changed, guest will use
     119 * VMMDev_GetMouseStatus generic request.
    123120 *
    124  * Event mask is only a set of flags indicating that guest
    125  * must proceed with a procedure.
     121 * Event mask is only a set of flags indicating that guest must proceed with a
     122 * procedure.
    126123 *
    127  * Unsupported events are therefore ignored.
    128  * The guest additions must inform host which events they
    129  * want to receive, to avoid unnecessary IRQ processing.
     124 * Unsupported events are therefore ignored. The guest additions must inform
     125 * host which events they want to receive, to avoid unnecessary IRQ processing.
    130126 * By default no events are signalled to guest.
    131127 *
    132  * This seems to be fast method. It requires
    133  * only one context switch for an event processing.
     128 * This seems to be fast method. It requires only one context switch for an
     129 * event processing.
    134130 *
    135131 */
     
    10841080                mouseStatus->pointerXPos = pThis->mouseXAbs;
    10851081                mouseStatus->pointerYPos = pThis->mouseYAbs;
    1086                 LogRel2(("%s: VMMDevReq_GetMouseStatus: features = 0x%x, absX = %d, absY = %d\n",
     1082                LogRel2(("%s: VMMDevReq_GetMouseStatus: features = 0x%x, xAbs = %d, yAbs = %d\n",
    10871083                                __PRETTY_FUNCTION__,
    10881084                                mouseStatus->mouseFeatures,
     
    13951391                        if (pThis->displayChangeData.aRequests[i].fPending)
    13961392                        {
    1397                             VMMDevNotifyGuest (pThis, VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST);
     1393                            VMMDevNotifyGuest(pThis, VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST);
    13981394                            break;
    13991395                        }
     
    14191415                    displayChangeRequest->xres = pRequest->displayChangeRequest.xres;
    14201416                    displayChangeRequest->yres = pRequest->displayChangeRequest.yres;
    1421                     displayChangeRequest->bpp = pRequest->displayChangeRequest.bpp;
     1417                    displayChangeRequest->bpp  = pRequest->displayChangeRequest.bpp;
    14221418                }
    14231419                Log(("VMMDev: returning display change request xres = %d, yres = %d, bpp = %d\n",
     
    14691465                        if (pThis->displayChangeData.aRequests[i].fPending)
    14701466                        {
    1471                             VMMDevNotifyGuest (pThis, VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST);
     1467                            VMMDevNotifyGuest(pThis, VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST);
    14721468                            Log3(("VMMDev: another pending at %d\n",
    14731469                                  i));
     
    15651561                        if (pThis->displayChangeData.aRequests[i].fPending)
    15661562                        {
    1567                             VMMDevNotifyGuest (pThis, VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST);
     1563                            VMMDevNotifyGuest(pThis, VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST);
    15681564                            Log3(("VMMDev: another pending at %d\n",
    15691565                                  i));
     
    20462042                VMMDevVRDPChangeRequest *vrdpChangeRequest = (VMMDevVRDPChangeRequest*)pRequestHeader;
    20472043                /* just pass on the information */
    2048                 Log(("VMMDev: returning VRDP status %d level %d\n", pThis->fVRDPEnabled, pThis->u32VRDPExperienceLevel));
     2044                Log(("VMMDev: returning VRDP status %d level %d\n", pThis->fVRDPEnabled, pThis->uVRDPExperienceLevel));
    20492045
    20502046                vrdpChangeRequest->u8VRDPActive = pThis->fVRDPEnabled;
    2051                 vrdpChangeRequest->u32VRDPExperienceLevel = pThis->u32VRDPExperienceLevel;
     2047                vrdpChangeRequest->u32VRDPExperienceLevel = pThis->uVRDPExperienceLevel;
    20522048
    20532049                pRequestHeader->rc = VINF_SUCCESS;
     
    20682064                VMMDevGetMemBalloonChangeRequest *memBalloonChangeRequest = (VMMDevGetMemBalloonChangeRequest*)pRequestHeader;
    20692065                /* just pass on the information */
    2070                 Log(("VMMDev: returning memory balloon size =%d\n", pThis->u32MemoryBalloonSize));
    2071                 memBalloonChangeRequest->cBalloonChunks = pThis->u32MemoryBalloonSize;
     2066                Log(("VMMDev: returning memory balloon size =%d\n", pThis->cMbMemoryBalloon));
     2067                memBalloonChangeRequest->cBalloonChunks = pThis->cMbMemoryBalloon;
    20722068                memBalloonChangeRequest->cPhysMemChunks = pThis->cbGuestRAM / (uint64_t)_1M;
    20732069
     
    20752071                {
    20762072                    /* Remember which mode the client has queried. */
    2077                     pThis->u32LastMemoryBalloonSize = pThis->u32MemoryBalloonSize;
     2073                    pThis->cMbMemoryBalloonLast = pThis->cMbMemoryBalloon;
    20782074                }
    20792075
     
    24772473}
    24782474
     2475
     2476/* -=-=-=-=-=- PCI Device -=-=-=-=-=- */
     2477
     2478
    24792479/**
    24802480 * Callback function for mapping an PCI I/O region.
     
    24912491{
    24922492    LogFlow(("vmmdevR3IORAMRegionMap: iRegion=%d GCPhysAddress=%RGp cb=%#x enmType=%d\n", iRegion, GCPhysAddress, cb, enmType));
    2493     VMMDevState *pThis = PCIDEV_2_VMMDEVSTATE(pPciDev);
     2493    PVMMDEV pThis = RT_FROM_MEMBER(pPciDev, VMMDEV, PciDev);
    24942494    int rc;
    24952495
     
    25642564static DECLCALLBACK(int) vmmdevIOPortRegionMap(PPCIDEVICE pPciDev, /*unsigned*/ int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType)
    25652565{
    2566     VMMDevState *pThis = PCIDEV_2_VMMDEVSTATE(pPciDev);
     2566    PVMMDEV pThis = RT_FROM_MEMBER(pPciDev, VMMDEV, PciDev);
    25672567    int         rc = VINF_SUCCESS;
    25682568
     
    25872587}
    25882588
     2589
     2590/* -=-=-=-=-=- IBase -=-=-=-=-=- */
     2591
    25892592/**
    25902593 * @interface_method_impl{PDMIBASE,pfnQueryInterface}
     
    25922595static DECLCALLBACK(void *) vmmdevPortQueryInterface(PPDMIBASE pInterface, const char *pszIID)
    25932596{
    2594     VMMDevState *pThis = RT_FROM_MEMBER(pInterface, VMMDevState, IBase);
     2597    PVMMDEV pThis = RT_FROM_MEMBER(pInterface, VMMDEV, IBase);
    25952598
    25962599    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->IBase);
     
    26042607}
    26052608
     2609
     2610/* -=-=-=-=-=- ILeds -=-=-=-=-=- */
     2611
    26062612/**
    26072613 * Gets the pointer to the status LED of a unit.
     
    26142620static DECLCALLBACK(int) vmmdevQueryStatusLed(PPDMILEDPORTS pInterface, unsigned iLUN, PPDMLED *ppLed)
    26152621{
    2616     VMMDevState *pThis = (VMMDevState *)( (uintptr_t)pInterface - RT_OFFSETOF(VMMDevState, SharedFolders.ILeds) );
     2622    PVMMDEV pThis = RT_FROM_MEMBER(pInterface, VMMDEV, SharedFolders.ILeds);
    26172623    if (iLUN == 0) /* LUN 0 is shared folders */
    26182624    {
     
    26232629}
    26242630
     2631
    26252632/* -=-=-=-=-=- IVMMDevPort -=-=-=-=-=- */
    26262633
     
    26302637
    26312638/**
    2632  * Return the current absolute mouse position in pixels
    2633  *
    2634  * @returns VBox status code
    2635  * @param   pAbsX   Pointer of result value, can be NULL
    2636  * @param   pAbsY   Pointer of result value, can be NULL
    2637  */
    2638 static DECLCALLBACK(int) vmmdevQueryAbsoluteMouse(PPDMIVMMDEVPORT pInterface, int32_t *pAbsX, int32_t *pAbsY)
     2639 * @interface_method_impl{PDMIVMMDEVPORT, pfnQueryAbsoluteMouse}
     2640 */
     2641static DECLCALLBACK(int) vmmdevIPort_QueryAbsoluteMouse(PPDMIVMMDEVPORT pInterface, int32_t *pxAbs, int32_t *pyAbs)
    26392642{
    26402643    VMMDevState *pThis = IVMMDEVPORT_2_VMMDEVSTATE(pInterface);
    2641     if (pAbsX)
    2642         *pAbsX = ASMAtomicReadS32(&pThis->mouseXAbs); /* why the atomic read? */
    2643     if (pAbsY)
    2644         *pAbsY = ASMAtomicReadS32(&pThis->mouseYAbs);
     2644    if (pxAbs)
     2645        *pxAbs = ASMAtomicReadS32(&pThis->mouseXAbs); /* why the atomic read? */
     2646    if (pyAbs)
     2647        *pyAbs = ASMAtomicReadS32(&pThis->mouseYAbs);
    26452648    return VINF_SUCCESS;
    26462649}
    26472650
    26482651/**
    2649  * Set the new absolute mouse position in pixels
    2650  *
    2651  * @returns VBox status code
    2652  * @param   absX   New absolute X position
    2653  * @param   absY   New absolute Y position
    2654  */
    2655 static DECLCALLBACK(int) vmmdevSetAbsoluteMouse(PPDMIVMMDEVPORT pInterface, int32_t absX, int32_t absY)
     2652 * @interface_method_impl{PDMIVMMDEVPORT, pfnSetAbsoluteMouse}
     2653 */
     2654static DECLCALLBACK(int) vmmdevIPort_SetAbsoluteMouse(PPDMIVMMDEVPORT pInterface, int32_t xAbs, int32_t yAbs)
    26562655{
    26572656    VMMDevState *pThis = IVMMDEVPORT_2_VMMDEVSTATE(pInterface);
    26582657    PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY);
    26592658
    2660     if (pThis->mouseXAbs == absX && pThis->mouseYAbs == absY)
     2659    if (pThis->mouseXAbs == xAbs && pThis->mouseYAbs == yAbs)
    26612660    {
    26622661        PDMCritSectLeave(&pThis->CritSect);
    26632662        return VINF_SUCCESS;
    26642663    }
    2665     Log2(("vmmdevSetAbsoluteMouse: settings absolute position to x = %d, y = %d\n", absX, absY));
    2666     pThis->mouseXAbs = absX;
    2667     pThis->mouseYAbs = absY;
    2668     VMMDevNotifyGuest (pThis, VMMDEV_EVENT_MOUSE_POSITION_CHANGED);
     2664    Log2(("vmmdevIPort_SetAbsoluteMouse : settings absolute position to x = %d, y = %d\n", xAbs, yAbs));
     2665    pThis->mouseXAbs = xAbs;
     2666    pThis->mouseYAbs = yAbs;
     2667    VMMDevNotifyGuest(pThis, VMMDEV_EVENT_MOUSE_POSITION_CHANGED);
    26692668    PDMCritSectLeave(&pThis->CritSect);
    26702669    return VINF_SUCCESS;
     
    26722671
    26732672/**
    2674  * Return the current mouse capability flags
    2675  *
    2676  * @returns VBox status code
    2677  * @param   pCapabilities  Pointer of result value
    2678  */
    2679 static DECLCALLBACK(int) vmmdevQueryMouseCapabilities(PPDMIVMMDEVPORT pInterface, uint32_t *pfCaps)
     2673 * @interface_method_impl{PDMIVMMDEVPORT, pfnQueryMouseCapabilities}
     2674 */
     2675static DECLCALLBACK(int) vmmdevIPort_QueryMouseCapabilities(PPDMIVMMDEVPORT pInterface, uint32_t *pfCapabilities)
    26802676{
    26812677    VMMDevState *pThis = IVMMDEVPORT_2_VMMDEVSTATE(pInterface);
    2682     if (!pfCaps)
     2678    if (!pfCapabilities)
    26832679        return VERR_INVALID_PARAMETER;
    2684     *pfCaps = pThis->mouseCapabilities;
     2680    *pfCapabilities = pThis->mouseCapabilities;
    26852681    return VINF_SUCCESS;
    26862682}
    26872683
    26882684/**
    2689  * Set the current mouse capability flag (host side)
    2690  *
    2691  * @returns VBox status code
    2692  * @param   capabilities  Capability mask
    2693  */
    2694 static DECLCALLBACK(int) vmmdevUpdateMouseCapabilities(PPDMIVMMDEVPORT pInterface, uint32_t fCapsAdded, uint32_t fCapsRemoved)
     2685 * @interface_method_impl{PDMIVMMDEVPORT, pfnUpdateMouseCapabilities}
     2686 */
     2687static DECLCALLBACK(int) vmmdevIPort_UpdateMouseCapabilities(PPDMIVMMDEVPORT pInterface, uint32_t fCapsAdded, uint32_t fCapsRemoved)
    26952688{
    26962689    VMMDevState *pThis = IVMMDEVPORT_2_VMMDEVSTATE(pInterface);
     
    27072700
    27082701    if (fNotify)
    2709         VMMDevNotifyGuest (pThis, VMMDEV_EVENT_MOUSE_CAPABILITIES_CHANGED);
     2702        VMMDevNotifyGuest(pThis, VMMDEV_EVENT_MOUSE_CAPABILITIES_CHANGED);
    27102703
    27112704    PDMCritSectLeave(&pThis->CritSect);
     
    27132706}
    27142707
    2715 
    2716 static DECLCALLBACK(int) vmmdevRequestDisplayChange(PPDMIVMMDEVPORT pInterface, uint32_t xres, uint32_t yres,
    2717                                                     uint32_t bpp, uint32_t display, uint32_t u32OriginX,
    2718                                                     uint32_t u32OriginY, bool fEnabled, bool fChangeOrigin)
     2708/**
     2709 * @interface_method_impl{PDMIVMMDEVPORT, pfnRequestDisplayChange}
     2710 */
     2711static DECLCALLBACK(int)
     2712vmmdevIPort_RequestDisplayChange(PPDMIVMMDEVPORT pInterface, uint32_t cx, uint32_t cy, uint32_t cBits, uint32_t idxDisplay,
     2713                                 uint32_t xOrigin, uint32_t yOrigin, bool fEnabled, bool fChangeOrigin)
    27192714{
    27202715    VMMDevState *pThis = IVMMDEVPORT_2_VMMDEVSTATE(pInterface);
    27212716
    2722     if (display >= RT_ELEMENTS(pThis->displayChangeData.aRequests))
     2717    if (idxDisplay >= RT_ELEMENTS(pThis->displayChangeData.aRequests))
    27232718    {
    27242719        return VERR_INVALID_PARAMETER;
     
    27272722    PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY);
    27282723
    2729     DISPLAYCHANGEREQUEST *pRequest = &pThis->displayChangeData.aRequests[display];
     2724    DISPLAYCHANGEREQUEST *pRequest = &pThis->displayChangeData.aRequests[idxDisplay];
    27302725
    27312726    /* Verify that the new resolution is different and that guest does not yet know about it. */
    2732     bool fSameResolution = (!xres || (pRequest->lastReadDisplayChangeRequest.xres == xres)) &&
    2733                            (!yres || (pRequest->lastReadDisplayChangeRequest.yres == yres)) &&
    2734                            (!bpp || (pRequest->lastReadDisplayChangeRequest.bpp == bpp)) &&
    2735                            (pRequest->lastReadDisplayChangeRequest.xOrigin == u32OriginX) &&
    2736                            (pRequest->lastReadDisplayChangeRequest.yOrigin == u32OriginY) &&
    2737                            (pRequest->lastReadDisplayChangeRequest.fEnabled == fEnabled) &&
    2738                            pRequest->lastReadDisplayChangeRequest.display == display;
    2739 
    2740     if (!xres && !yres && !bpp)
     2727    bool fSameResolution = (!cx    || pRequest->lastReadDisplayChangeRequest.xres == cx)
     2728                        && (!cy    || pRequest->lastReadDisplayChangeRequest.yres == cy)
     2729                        && (!cBits || pRequest->lastReadDisplayChangeRequest.bpp  == cBits)
     2730                        && pRequest->lastReadDisplayChangeRequest.xOrigin  == xOrigin
     2731                        && pRequest->lastReadDisplayChangeRequest.yOrigin  == yOrigin
     2732                        && pRequest->lastReadDisplayChangeRequest.fEnabled == fEnabled
     2733                        && pRequest->lastReadDisplayChangeRequest.display  == idxDisplay;
     2734
     2735    if (!cx && !cy && !cBits)
    27412736    {
    27422737        /* Special case of reset video mode. */
     
    27442739    }
    27452740
    2746     Log3(("vmmdevRequestDisplayChange: same=%d. new: xres=%d, yres=%d, bpp=%d, display=%d.\
    2747           old: xres=%d, yres=%d, bpp=%d, display=%d. \n \
     2741    Log3(("vmmdevIPort_RequestDisplayChange: same=%d. new: cx=%d, cy=%d, cBits=%d, idxDisplay=%d.\
     2742          old: cx=%d, cy=%d, cBits=%d, idxDisplay=%d. \n \
    27482743          ,OriginX = %d , OriginY=%d, Enabled=%d, ChangeOrigin=%d\n",
    2749           fSameResolution, xres, yres, bpp, display, pRequest->lastReadDisplayChangeRequest.xres,
     2744          fSameResolution, cx, cy, cBits, idxDisplay, pRequest->lastReadDisplayChangeRequest.xres,
    27502745          pRequest->lastReadDisplayChangeRequest.yres, pRequest->lastReadDisplayChangeRequest.bpp,
    27512746          pRequest->lastReadDisplayChangeRequest.display,
    2752           u32OriginX, u32OriginY, fEnabled, fChangeOrigin));
     2747          xOrigin, yOrigin, fEnabled, fChangeOrigin));
    27532748
    27542749    if (!fSameResolution)
    27552750    {
    27562751        LogRel(("VMMDev::SetVideoModeHint: got a video mode hint (%dx%dx%d) at %d\n",
    2757                 xres, yres, bpp, display));
     2752                cx, cy, cBits, idxDisplay));
    27582753
    27592754        /* we could validate the information here but hey, the guest can do that as well! */
    2760         pRequest->displayChangeRequest.xres          = xres;
    2761         pRequest->displayChangeRequest.yres          = yres;
    2762         pRequest->displayChangeRequest.bpp           = bpp;
    2763         pRequest->displayChangeRequest.display       = display;
    2764         pRequest->displayChangeRequest.xOrigin       = u32OriginX;
    2765         pRequest->displayChangeRequest.yOrigin       = u32OriginY;
     2755        pRequest->displayChangeRequest.xres          = cx;
     2756        pRequest->displayChangeRequest.yres          = cy;
     2757        pRequest->displayChangeRequest.bpp           = cBits;
     2758        pRequest->displayChangeRequest.display       = idxDisplay;
     2759        pRequest->displayChangeRequest.xOrigin       = xOrigin;
     2760        pRequest->displayChangeRequest.yOrigin       = yOrigin;
    27662761        pRequest->displayChangeRequest.fEnabled      = fEnabled;
    27672762        pRequest->displayChangeRequest.fChangeOrigin = fChangeOrigin;
     
    27702765
    27712766        /* IRQ so the guest knows what's going on */
    2772         VMMDevNotifyGuest (pThis, VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST);
     2767        VMMDevNotifyGuest(pThis, VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST);
    27732768    }
    27742769
     
    27772772}
    27782773
    2779 static DECLCALLBACK(int) vmmdevRequestSeamlessChange(PPDMIVMMDEVPORT pInterface, bool fEnabled)
     2774/**
     2775 * @interface_method_impl{PDMIVMMDEVPORT, pfnRequestSeamlessChange}
     2776 */
     2777static DECLCALLBACK(int) vmmdevIPort_RequestSeamlessChange(PPDMIVMMDEVPORT pInterface, bool fEnabled)
    27802778{
    27812779    VMMDevState *pThis = IVMMDEVPORT_2_VMMDEVSTATE(pInterface);
     
    27852783    bool fSameMode = (pThis->fLastSeamlessEnabled == fEnabled);
    27862784
    2787     Log(("vmmdevRequestSeamlessChange: same=%d. new=%d\n", fSameMode, fEnabled));
     2785    Log(("vmmdevIPort_RequestSeamlessChange: same=%d. new=%d\n", fSameMode, fEnabled));
    27882786
    27892787    if (!fSameMode)
     
    27932791
    27942792        /* IRQ so the guest knows what's going on */
    2795         VMMDevNotifyGuest (pThis, VMMDEV_EVENT_SEAMLESS_MODE_CHANGE_REQUEST);
     2793        VMMDevNotifyGuest(pThis, VMMDEV_EVENT_SEAMLESS_MODE_CHANGE_REQUEST);
    27962794    }
    27972795
     
    28002798}
    28012799
    2802 static DECLCALLBACK(int) vmmdevSetMemoryBalloon(PPDMIVMMDEVPORT pInterface, uint32_t ulBalloonSize)
     2800/**
     2801 * @interface_method_impl{PDMIVMMDEVPORT, pfnSetMemoryBalloon}
     2802 */
     2803static DECLCALLBACK(int) vmmdevIPort_SetMemoryBalloon(PPDMIVMMDEVPORT pInterface, uint32_t cMbBalloon)
    28032804{
    28042805    VMMDevState *pThis = IVMMDEVPORT_2_VMMDEVSTATE(pInterface);
     
    28062807
    28072808    /* Verify that the new resolution is different and that guest does not yet know about it. */
    2808     bool fSame = (pThis->u32LastMemoryBalloonSize == ulBalloonSize);
    2809 
    2810     Log(("vmmdevSetMemoryBalloon: old=%d. new=%d\n", pThis->u32LastMemoryBalloonSize, ulBalloonSize));
    2811 
    2812     if (!fSame)
     2809    Log(("vmmdevIPort_SetMemoryBalloon: old=%u new=%u\n", pThis->cMbMemoryBalloonLast, cMbBalloon));
     2810    if (pThis->cMbMemoryBalloonLast != cMbBalloon)
    28132811    {
    28142812        /* we could validate the information here but hey, the guest can do that as well! */
    2815         pThis->u32MemoryBalloonSize = ulBalloonSize;
     2813        pThis->cMbMemoryBalloon = cMbBalloon;
    28162814
    28172815        /* IRQ so the guest knows what's going on */
    2818         VMMDevNotifyGuest (pThis, VMMDEV_EVENT_BALLOON_CHANGE_REQUEST);
     2816        VMMDevNotifyGuest(pThis, VMMDEV_EVENT_BALLOON_CHANGE_REQUEST);
    28192817    }
    28202818
     
    28232821}
    28242822
    2825 static DECLCALLBACK(int) vmmdevVRDPChange(PPDMIVMMDEVPORT pInterface, bool fVRDPEnabled, uint32_t u32VRDPExperienceLevel)
     2823/**
     2824 * @interface_method_impl{PDMIVMMDEVPORT, pfnVRDPChange}
     2825 */
     2826static DECLCALLBACK(int) vmmdevIPort_VRDPChange(PPDMIVMMDEVPORT pInterface, bool fVRDPEnabled, uint32_t uVRDPExperienceLevel)
    28262827{
    28272828    VMMDevState *pThis = IVMMDEVPORT_2_VMMDEVSTATE(pInterface);
     
    28302831    bool fSame = (pThis->fVRDPEnabled == fVRDPEnabled);
    28312832
    2832     Log(("vmmdevVRDPChange: old=%d. new=%d\n", pThis->fVRDPEnabled, fVRDPEnabled));
     2833    Log(("vmmdevIPort_VRDPChange: old=%d. new=%d\n", pThis->fVRDPEnabled, fVRDPEnabled));
    28332834
    28342835    if (!fSame)
    28352836    {
    28362837        pThis->fVRDPEnabled = fVRDPEnabled;
    2837         pThis->u32VRDPExperienceLevel = u32VRDPExperienceLevel;
    2838 
    2839         VMMDevNotifyGuest (pThis, VMMDEV_EVENT_VRDP);
     2838        pThis->uVRDPExperienceLevel = uVRDPExperienceLevel;
     2839
     2840        VMMDevNotifyGuest(pThis, VMMDEV_EVENT_VRDP);
    28402841    }
    28412842
     
    28442845}
    28452846
    2846 static DECLCALLBACK(int) vmmdevSetStatisticsInterval(PPDMIVMMDEVPORT pInterface, uint32_t ulStatInterval)
     2847/**
     2848 * @interface_method_impl{PDMIVMMDEVPORT, pfnSetStatisticsInterval}
     2849 */
     2850static DECLCALLBACK(int) vmmdevIPort_SetStatisticsInterval(PPDMIVMMDEVPORT pInterface, uint32_t cSecsStatInterval)
    28472851{
    28482852    VMMDevState *pThis = IVMMDEVPORT_2_VMMDEVSTATE(pInterface);
     
    28502854
    28512855    /* Verify that the new resolution is different and that guest does not yet know about it. */
    2852     bool fSame = (pThis->u32LastStatIntervalSize == ulStatInterval);
    2853 
    2854     Log(("vmmdevSetStatisticsInterval: old=%d. new=%d\n", pThis->u32LastStatIntervalSize, ulStatInterval));
     2856    bool fSame = (pThis->u32LastStatIntervalSize == cSecsStatInterval);
     2857
     2858    Log(("vmmdevIPort_SetStatisticsInterval: old=%d. new=%d\n", pThis->u32LastStatIntervalSize, cSecsStatInterval));
    28552859
    28562860    if (!fSame)
    28572861    {
    28582862        /* we could validate the information here but hey, the guest can do that as well! */
    2859         pThis->u32StatIntervalSize = ulStatInterval;
     2863        pThis->u32StatIntervalSize = cSecsStatInterval;
    28602864
    28612865        /* IRQ so the guest knows what's going on */
    2862         VMMDevNotifyGuest (pThis, VMMDEV_EVENT_STATISTICS_INTERVAL_CHANGE_REQUEST);
     2866        VMMDevNotifyGuest(pThis, VMMDEV_EVENT_STATISTICS_INTERVAL_CHANGE_REQUEST);
    28632867    }
    28642868
     
    28672871}
    28682872
    2869 
    2870 static DECLCALLBACK(int) vmmdevSetCredentials(PPDMIVMMDEVPORT pInterface, const char *pszUsername,
    2871                                               const char *pszPassword, const char *pszDomain,
    2872                                               uint32_t u32Flags)
     2873/**
     2874 * @interface_method_impl{PDMIVMMDEVPORT, pfnSetCredentials}
     2875 */
     2876static DECLCALLBACK(int) vmmdevIPort_SetCredentials(PPDMIVMMDEVPORT pInterface, const char *pszUsername,
     2877                                                    const char *pszPassword, const char *pszDomain, uint32_t fFlags)
    28732878{
    28742879    VMMDevState *pThis = IVMMDEVPORT_2_VMMDEVSTATE(pInterface);
     
    28782883
    28792884    /* logon mode? */
    2880     if (u32Flags & VMMDEV_SETCREDENTIALS_GUESTLOGON)
     2885    if (fFlags & VMMDEV_SETCREDENTIALS_GUESTLOGON)
    28812886    {
    28822887        /* memorize the data */
     
    28842889        strcpy(pThis->pCredentials->Logon.szPassword, pszPassword);
    28852890        strcpy(pThis->pCredentials->Logon.szDomain,   pszDomain);
    2886         pThis->pCredentials->Logon.fAllowInteractiveLogon = !(u32Flags & VMMDEV_SETCREDENTIALS_NOLOCALLOGON);
     2891        pThis->pCredentials->Logon.fAllowInteractiveLogon = !(fFlags & VMMDEV_SETCREDENTIALS_NOLOCALLOGON);
    28872892    }
    28882893    /* credentials verification mode? */
    2889     else if (u32Flags & VMMDEV_SETCREDENTIALS_JUDGE)
     2894    else if (fFlags & VMMDEV_SETCREDENTIALS_JUDGE)
    28902895    {
    28912896        /* memorize the data */
     
    28942899        strcpy(pThis->pCredentials->Judge.szDomain,   pszDomain);
    28952900
    2896         VMMDevNotifyGuest (pThis, VMMDEV_EVENT_JUDGE_CREDENTIALS);
     2901        VMMDevNotifyGuest(pThis, VMMDEV_EVENT_JUDGE_CREDENTIALS);
    28972902    }
    28982903    else
     
    29042909
    29052910/**
    2906  * Notification from the Display. Especially useful when
    2907  * acceleration is disabled after a video mode change.
     2911 * @interface_method_impl{PDMIVMMDEVPORT, pfnVBVAChange}
    29082912 *
    2909  * @param   fEnable   Current acceleration status.
    2910  */
    2911 static DECLCALLBACK(void) vmmdevVBVAChange(PPDMIVMMDEVPORT pInterface, bool fEnabled)
     2913 * Notification from the Display.  Especially useful when acceleration is
     2914 * disabled after a video mode change.
     2915 */
     2916static DECLCALLBACK(void) vmmdevIPort_VBVAChange(PPDMIVMMDEVPORT pInterface, bool fEnabled)
    29122917{
    29132918    VMMDevState *pThis = IVMMDEVPORT_2_VMMDEVSTATE(pInterface);
    29142919
    2915     Log(("vmmdevVBVAChange: fEnabled = %d\n", fEnabled));
     2920    Log(("vmmdevIPort_VBVAChange: fEnabled = %d\n", fEnabled));
    29162921
    29172922    if (pThis)
     
    29232928
    29242929/**
    2925  * Notification that a CPU is about to be unplugged from the VM.
    2926  * The guest has to eject the CPU.
    2927  *
    2928  * @returns VBox status code.
    2929  * @param   idCpu    The id of the CPU.
    2930  * @param   idCpuCore    The core id of the CPU to remove.
    2931  * @param   idCpuPackage The package id of the CPU to remove.
    2932  */
    2933 static DECLCALLBACK(int) vmmdevCpuHotUnplug(PPDMIVMMDEVPORT pInterface, uint32_t idCpuCore, uint32_t idCpuPackage)
     2930 * @interface_method_impl{PDMIVMMDEVPORT, pfnCpuHotUnplug}
     2931 */
     2932static DECLCALLBACK(int) vmmdevIPort_CpuHotUnplug(PPDMIVMMDEVPORT pInterface, uint32_t idCpuCore, uint32_t idCpuPackage)
    29342933{
    29352934    int rc = VINF_SUCCESS;
    29362935    VMMDevState *pThis = IVMMDEVPORT_2_VMMDEVSTATE(pInterface);
    29372936
    2938     Log(("vmmdevCpuHotUnplug: idCpuCore=%u idCpuPackage=%u\n", idCpuCore, idCpuPackage));
     2937    Log(("vmmdevIPort_CpuHotUnplug: idCpuCore=%u idCpuPackage=%u\n", idCpuCore, idCpuPackage));
    29392938
    29402939    PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY);
     
    29452944        pThis->idCpuCore          = idCpuCore;
    29462945        pThis->idCpuPackage       = idCpuPackage;
    2947         VMMDevNotifyGuest (pThis, VMMDEV_EVENT_CPU_HOTPLUG);
     2946        VMMDevNotifyGuest(pThis, VMMDEV_EVENT_CPU_HOTPLUG);
    29482947    }
    29492948    else
     
    29552954
    29562955/**
    2957  * Notification that a CPU was attached to the VM
    2958  * The guest may use it now.
    2959  *
    2960  * @returns VBox status code.
    2961  * @param   idCpuCore    The core id of the CPU to add.
    2962  * @param   idCpuPackage The package id of the CPU to add.
    2963  */
    2964 static DECLCALLBACK(int) vmmdevCpuHotPlug(PPDMIVMMDEVPORT pInterface, uint32_t idCpuCore, uint32_t idCpuPackage)
     2956 * @interface_method_impl{PDMIVMMDEVPORT, pfnCpuHotPlug}
     2957 */
     2958static DECLCALLBACK(int) vmmdevIPort_CpuHotPlug(PPDMIVMMDEVPORT pInterface, uint32_t idCpuCore, uint32_t idCpuPackage)
    29652959{
    29662960    int rc = VINF_SUCCESS;
     
    29852979}
    29862980
     2981
    29872982/* -=-=-=-=-=- Saved State -=-=-=-=-=- */
    29882983
    29892984/**
    2990  * @copydoc FNSSMDEVLIVEEXEC
     2985 * @callback_method_impl{NSSMDEVLIVEEXEC}
    29912986 */
    29922987static DECLCALLBACK(int) vmmdevLiveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uPass)
    29932988{
    2994     VMMDevState *pThis = PDMINS_2_DATA(pDevIns, VMMDevState*);
     2989    PVMMDEV pThis = PDMINS_2_DATA(pDevIns, PVMMDEV);
    29952990
    29962991    SSMR3PutBool(pSSM, pThis->fGetHostTimeDisabled);
     
    30042999
    30053000/**
    3006  * @copydoc FNSSMDEVSAVEEXEC
    3007  *
     3001 * @callback_method_impl{FNSSMDEVSAVEEXEC}
    30083002 */
    30093003static DECLCALLBACK(int) vmmdevSaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
    30103004{
    3011     VMMDevState *pThis = PDMINS_2_DATA(pDevIns, VMMDevState*);
     3005    PVMMDEV pThis = PDMINS_2_DATA(pDevIns, PVMMDEV);
    30123006
    30133007    vmmdevLiveExec(pDevIns, pSSM, SSM_PASS_FINAL);
     
    30553049
    30563050/**
    3057  * @copydoc FNSSMDEVLOADEXEC
     3051 * @callback_method_impl{FNSSMDEVLOADEXEC}
    30583052 */
    30593053static DECLCALLBACK(int) vmmdevLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass)
     
    30613055    /** @todo The code load code is assuming we're always loaded into a freshly
    30623056     *        constructed VM. */
    3063     VMMDevState *pThis = PDMINS_2_DATA(pDevIns, VMMDevState*);
    3064     int          rc;
     3057    PVMMDEV pThis = PDMINS_2_DATA(pDevIns, PVMMDEV);
     3058    int     rc;
    30653059
    30663060    if (   uVersion > VMMDEV_SAVED_STATE_VERSION
     
    31993193    {
    32003194        LogRel(("Guest Additions information report: additionsVersion = 0x%08X, osType = 0x%08X\n",
    3201                 pThis->guestInfo.interfaceVersion,
    3202                 pThis->guestInfo.osType));
     3195                pThis->guestInfo.interfaceVersion, pThis->guestInfo.osType));
    32033196        if (pThis->pDrv)
    32043197        {
     
    32373230static DECLCALLBACK(int) vmmdevLoadStateDone(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
    32383231{
    3239     VMMDevState *pThis = PDMINS_2_DATA(pDevIns, VMMDevState*);
     3232    PVMMDEV pThis = PDMINS_2_DATA(pDevIns, PVMMDEV);
    32403233
    32413234#ifdef VBOX_WITH_HGCM
     
    32493242}
    32503243
     3244
    32513245/* -=-=-=-=- PDMDEVREG -=-=-=-=- */
    32523246
     
    32633257}
    32643258
    3265 /**
    3266  * Reset notification.
    3267  *
    3268  * @returns VBox status.
    3269  * @param   pDrvIns     The driver instance data.
     3259
     3260/**
     3261 * @interface_method_impl{PDMDEVREG,pfnReset}
    32703262 */
    32713263static DECLCALLBACK(void) vmmdevReset(PPDMDEVINS pDevIns)
    32723264{
    3273     VMMDevState *pThis = PDMINS_2_DATA(pDevIns, VMMDevState*);
     3265    PVMMDEV pThis = PDMINS_2_DATA(pDevIns, PVMMDEV);
    32743266
    32753267    /*
     
    33373329
    33383330    /* disabled memory ballooning */
    3339     pThis->u32LastMemoryBalloonSize = 0;
     3331    pThis->cMbMemoryBalloonLast = 0;
    33403332
    33413333    /* disabled statistics updating */
     
    33953387static DECLCALLBACK(int) vmmdevDestroy(PPDMDEVINS pDevIns)
    33963388{
     3389    PVMMDEV pThis = PDMINS_2_DATA(pDevIns, PVMMDEV);
    33973390    PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
    3398     VMMDevState *pThis = PDMINS_2_DATA(pDevIns, VMMDevState *);
    33993391
    34003392    /*
     
    34173409static DECLCALLBACK(int) vmmdevConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
    34183410{
     3411    PVMMDEV pThis = PDMINS_2_DATA(pDevIns, PVMMDEV);
    34193412    int rc;
    3420     VMMDevState *pThis = PDMINS_2_DATA(pDevIns, VMMDevState *);
    34213413
    34223414    Assert(iInstance == 0);
     
    34303422
    34313423    /* PCI vendor, just a free bogus value */
    3432     PCIDevSetVendorId(&pThis->dev, 0x80ee);
     3424    PCIDevSetVendorId(&pThis->PciDev, 0x80ee);
    34333425    /* device ID */
    3434     PCIDevSetDeviceId(&pThis->dev, 0xcafe);
     3426    PCIDevSetDeviceId(&pThis->PciDev, 0xcafe);
    34353427    /* class sub code (other type of system peripheral) */
    3436     PCIDevSetClassSub(&pThis->dev, 0x80);
     3428    PCIDevSetClassSub(&pThis->PciDev, 0x80);
    34373429    /* class base code (base system peripheral) */
    3438     PCIDevSetClassBase(&pThis->dev, 0x08);
     3430    PCIDevSetClassBase(&pThis->PciDev, 0x08);
    34393431    /* header type */
    3440     PCIDevSetHeaderType(&pThis->dev, 0x00);
     3432    PCIDevSetHeaderType(&pThis->PciDev, 0x00);
    34413433    /* interrupt on pin 0 */
    3442     PCIDevSetInterruptPin(&pThis->dev, 0x01);
     3434    PCIDevSetInterruptPin(&pThis->PciDev, 0x01);
    34433435
    34443436    RTTIMESPEC TimeStampNow;
     
    34583450
    34593451    /* VMMDev port */
    3460     pThis->IPort.pfnQueryAbsoluteMouse      = vmmdevQueryAbsoluteMouse;
    3461     pThis->IPort.pfnSetAbsoluteMouse        = vmmdevSetAbsoluteMouse;
    3462     pThis->IPort.pfnQueryMouseCapabilities  = vmmdevQueryMouseCapabilities;
    3463     pThis->IPort.pfnUpdateMouseCapabilities = vmmdevUpdateMouseCapabilities;
    3464     pThis->IPort.pfnRequestDisplayChange    = vmmdevRequestDisplayChange;
    3465     pThis->IPort.pfnSetCredentials          = vmmdevSetCredentials;
    3466     pThis->IPort.pfnVBVAChange              = vmmdevVBVAChange;
    3467     pThis->IPort.pfnRequestSeamlessChange   = vmmdevRequestSeamlessChange;
    3468     pThis->IPort.pfnSetMemoryBalloon        = vmmdevSetMemoryBalloon;
    3469     pThis->IPort.pfnSetStatisticsInterval   = vmmdevSetStatisticsInterval;
    3470     pThis->IPort.pfnVRDPChange              = vmmdevVRDPChange;
    3471     pThis->IPort.pfnCpuHotUnplug            = vmmdevCpuHotUnplug;
    3472     pThis->IPort.pfnCpuHotPlug              = vmmdevCpuHotPlug;
     3452    pThis->IPort.pfnQueryAbsoluteMouse      = vmmdevIPort_QueryAbsoluteMouse;
     3453    pThis->IPort.pfnSetAbsoluteMouse        = vmmdevIPort_SetAbsoluteMouse ;
     3454    pThis->IPort.pfnQueryMouseCapabilities  = vmmdevIPort_QueryMouseCapabilities;
     3455    pThis->IPort.pfnUpdateMouseCapabilities = vmmdevIPort_UpdateMouseCapabilities;
     3456    pThis->IPort.pfnRequestDisplayChange    = vmmdevIPort_RequestDisplayChange;
     3457    pThis->IPort.pfnSetCredentials          = vmmdevIPort_SetCredentials;
     3458    pThis->IPort.pfnVBVAChange              = vmmdevIPort_VBVAChange;
     3459    pThis->IPort.pfnRequestSeamlessChange   = vmmdevIPort_RequestSeamlessChange;
     3460    pThis->IPort.pfnSetMemoryBalloon        = vmmdevIPort_SetMemoryBalloon;
     3461    pThis->IPort.pfnSetStatisticsInterval   = vmmdevIPort_SetStatisticsInterval;
     3462    pThis->IPort.pfnVRDPChange              = vmmdevIPort_VRDPChange;
     3463    pThis->IPort.pfnCpuHotUnplug            = vmmdevIPort_CpuHotUnplug;
     3464    pThis->IPort.pfnCpuHotPlug              = vmmdevIPort_CpuHotPlug;
    34733465
    34743466    /* Shared folder LED */
     
    36013593     * Register the PCI device.
    36023594     */
    3603     rc = PDMDevHlpPCIRegister(pDevIns, &pThis->dev);
     3595    rc = PDMDevHlpPCIRegister(pDevIns, &pThis->PciDev);
    36043596    if (RT_FAILURE(rc))
    36053597        return rc;
    3606     if (pThis->dev.devfn != 32 || iInstance != 0)
    3607         Log(("!!WARNING!!: pThis->dev.devfn=%d (ignore if testcase or no started by Main)\n", pThis->dev.devfn));
     3598    if (pThis->PciDev.devfn != 32 || iInstance != 0)
     3599        Log(("!!WARNING!!: pThis->PciDev.devfn=%d (ignore if testcase or no started by Main)\n", pThis->PciDev.devfn));
    36083600    rc = PDMDevHlpPCIIORegionRegister(pDevIns, 0, 0x20, PCI_ADDRESS_SPACE_IO, vmmdevIOPortRegionMap);
    36093601    if (RT_FAILURE(rc))
     
    36463638        /* Query the initial balloon size. */
    36473639        AssertPtr(pThis->pDrv->pfnQueryBalloonSize);
    3648         rc = pThis->pDrv->pfnQueryBalloonSize(pThis->pDrv, &pThis->u32MemoryBalloonSize);
     3640        rc = pThis->pDrv->pfnQueryBalloonSize(pThis->pDrv, &pThis->cMbMemoryBalloon);
    36493641        AssertRC(rc);
    36503642
    3651         Log(("Initial balloon size %x\n", pThis->u32MemoryBalloonSize));
     3643        Log(("Initial balloon size %x\n", pThis->cMbMemoryBalloon));
    36523644    }
    36533645    else if (rc == VERR_PDM_NO_ATTACHED_DRIVER)
     
    36883680#endif /* VBOX_WITH_HGCM */
    36893681
    3690     /* In this version of VirtualBox the GUI checks whether "needs host cursor"
    3691      * changes. */
     3682    /*
     3683     * In this version of VirtualBox the GUI checks whether "needs host cursor"
     3684     * changes.
     3685     */
    36923686    pThis->mouseCapabilities |= VMMDEV_MOUSE_HOST_RECHECKS_NEEDS_HOST_CURSOR;
    36933687
    36943688    PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatMemBalloonChunks, STAMTYPE_U32, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, "Memory balloon size", "/Devices/VMMDev/BalloonChunks");
    36953689
    3696     /* Generate a unique session id for this VM; it will be changed for each start, reset or restore.
    3697      * This can be used for restore detection inside the guest.
     3690    /*
     3691     * Generate a unique session id for this VM; it will be changed for each
     3692     * start, reset or restore. This can be used for restore detection inside
     3693     * the guest.
    36983694     */
    36993695    pThis->idSession = ASMReadTSC();
     
    37563752};
    37573753#endif /* !VBOX_DEVICE_STRUCT_TESTCASE */
     3754
  • trunk/src/VBox/Devices/VMMDev/VMMDevState.h

    r44528 r44709  
    5454    bool afAlignment[3];
    5555
    56     DISPLAYCHANGEREQUEST aRequests[64]; // @todo maxMonitors
     56    DISPLAYCHANGEREQUEST aRequests[64]; /// @todo maxMonitors
    5757} DISPLAYCHANGEDATA;
    5858
     
    113113{
    114114    /** The PCI device structure. */
    115     PCIDevice dev;
    116 
    117     /** The critical section for this device. */
    118     PDMCRITSECT CritSect;
     115    PCIDevice           PciDev;
     116    /** The critical section for this device.
     117     * @remarks We use this rather than the default one, it's simpler with all
     118     *          the driver interfaces where we have to waste time digging out the
     119     *          PDMDEVINS structure. */
     120    PDMCRITSECT         CritSect;
    119121
    120122    /** hypervisor address space size */
     
    226228
    227229    /* memory balloon change request */
    228     uint32_t    u32MemoryBalloonSize, u32LastMemoryBalloonSize;
     230    uint32_t    cMbMemoryBalloon;
     231    /** The last balloon size queried by the guest additions.  */
     232    uint32_t    cMbMemoryBalloonLast;
    229233
    230234    /* guest ram size */
     
    242246
    243247    bool fVRDPEnabled;
    244     uint32_t u32VRDPExperienceLevel;
     248    uint32_t uVRDPExperienceLevel;
    245249
    246250#ifdef TIMESYNC_BACKDOOR
     
    349353#endif /* !VBOX_WITHOUT_TESTING_FEATURES */
    350354} VMMDevState;
    351 AssertCompileMemberAlignment(VMMDevState, CritSect, 8);
    352 AssertCompileMemberAlignment(VMMDevState, cbGuestRAM, 8);
    353 AssertCompileMemberAlignment(VMMDevState, enmCpuHotPlugEvent, 4);
    354 AssertCompileMemberAlignment(VMMDevState, aFacilityStatuses, 8);
     355typedef VMMDevState VMMDEV;
     356/** Pointer to the VMM device state. */
     357typedef VMMDEV *PVMMDEV;
     358AssertCompileMemberAlignment(VMMDEV, CritSect, 8);
     359AssertCompileMemberAlignment(VMMDEV, cbGuestRAM, 8);
     360AssertCompileMemberAlignment(VMMDEV, enmCpuHotPlugEvent, 4);
     361AssertCompileMemberAlignment(VMMDEV, aFacilityStatuses, 8);
    355362#ifndef VBOX_WITHOUT_TESTING_FEATURES
    356 AssertCompileMemberAlignment(VMMDevState, TestingData.Value.u64Value, 8);
     363AssertCompileMemberAlignment(VMMDEV, TestingData.Value.u64Value, 8);
    357364#endif
    358365
    359366
    360 void VMMDevNotifyGuest (VMMDevState *pVMMDevState, uint32_t u32EventMask);
    361 void VMMDevCtlSetGuestFilterMask (VMMDevState *pVMMDevState,
    362                                   uint32_t u32OrMask,
    363                                   uint32_t u32NotMask);
     367void VMMDevNotifyGuest(VMMDEV *pVMMDevState, uint32_t u32EventMask);
     368void VMMDevCtlSetGuestFilterMask(VMMDEV *pVMMDevState, uint32_t u32OrMask, uint32_t u32NotMask);
    364369
    365370#endif /* !___VMMDev_VMMDevState_h */
  • trunk/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp

    r44680 r44709  
    14071407    /* VMMDev*.cpp/h */
    14081408    GEN_CHECK_SIZE(VMMDevState);
    1409     GEN_CHECK_OFF(VMMDevState, dev);
     1409    GEN_CHECK_OFF(VMMDevState, PciDev);
    14101410    GEN_CHECK_OFF(VMMDevState, CritSect);
    14111411    GEN_CHECK_OFF(VMMDevState, hypervisorSize);
     
    14431443    GEN_CHECK_OFF(VMMDevState, displayChangeData);
    14441444    GEN_CHECK_OFF(VMMDevState, pCredentials);
    1445     GEN_CHECK_OFF(VMMDevState, u32MemoryBalloonSize);
    1446     GEN_CHECK_OFF(VMMDevState, u32LastMemoryBalloonSize);
     1445    GEN_CHECK_OFF(VMMDevState, cMbMemoryBalloon);
     1446    GEN_CHECK_OFF(VMMDevState, cMbMemoryBalloonLast);
    14471447    GEN_CHECK_OFF(VMMDevState, cbGuestRAM);
    14481448    GEN_CHECK_OFF(VMMDevState, idSession);
     
    14521452    GEN_CHECK_OFF(VMMDevState, fSeamlessEnabled);
    14531453    GEN_CHECK_OFF(VMMDevState, fVRDPEnabled);
    1454     GEN_CHECK_OFF(VMMDevState, u32VRDPExperienceLevel);
     1454    GEN_CHECK_OFF(VMMDevState, uVRDPExperienceLevel);
    14551455#ifdef TIMESYNC_BACKDOOR
    14561456    GEN_CHECK_OFF(VMMDevState, hostTime);
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