VirtualBox

Changeset 27023 in vbox for trunk/include


Ignore:
Timestamp:
Mar 4, 2010 1:32:45 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
58333
Message:

Guest Additions: memory ballooning for guests without support for RTR0MemObjAllocPhysNC()

Location:
trunk/include/VBox
Files:
3 edited

Legend:

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

    r27001 r27023  
    272272/** IOCTL to VBoxGuest to check memory ballooning.
    273273 * The guest kernel module / device driver will ask the host for the current size of
    274  * the balloon and adjust the size or return with VERR_NO_PHYS_MEMORY. In the latter
    275  * case the user-level application is responsible for allocating memory in userland
    276  * and call the kernel module again doing VBOXGUEST_IOCTL_CHANGE_BALLOON */
     274 * the balloon and adjust the size. Or it will set fHandledInR0 = false and R3 is
     275 * responsible for allocating memory and calling R0 (VBOXGUEST_IOCTL_CHANGE_BALLOON). */
    277276#define VBOXGUEST_IOCTL_CHECK_BALLOON               VBOXGUEST_IOCTL_CODE_(7, 100)
     277
     278typedef struct VBoxGuestCheckBalloonInfo
     279{
     280    /** the size of the balloon in chunks of 1MB */
     281    uint32_t cBalloonChunks;
     282    /** false = handled in R0, no further action required.
     283     *   true = allocate balloon memory in R3. */
     284    uint32_t fHandleInR3;
     285} VBoxGuestCheckBalloonInfo;
     286AssertCompileSize(VBoxGuestCheckBalloonInfo, 8);
    278287
    279288
  • trunk/include/VBox/VBoxGuestLib.h

    r26999 r27023  
    467467/** @name Memory ballooning
    468468 * @{ */
    469 VBGLR3DECL(int) VbglR3MemBalloonRefresh(uint32_t *pu32Size);
     469VBGLR3DECL(int) VbglR3MemBalloonRefresh(uint32_t *pcChunks, bool *pfHandleInR3);
    470470VBGLR3DECL(int) VbglR3MemBalloonChange(void *pv, bool fInflate);
    471471/** @}  */
  • trunk/include/VBox/VMMDev.h

    r26295 r27023  
    689689    VMMDevRequestHeader header;
    690690    /** Balloon size in megabytes. */
    691     uint32_t            u32BalloonSize;
     691    uint32_t            cBalloonChunks;
    692692    /** Guest ram size in megabytes. */
    693     uint32_t            u32PhysMemSize;
     693    uint32_t            cPhysMemChunks;
    694694    /** Setting this to VMMDEV_EVENT_BALLOON_CHANGE_REQUEST indicates that the
    695695     * request is a response to that event.
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