Logo Search packages:      
Sourcecode: virtualbox-ose version File versions  Download package

VMMDev.h File Reference


Detailed Description

Virtual Device for Guest <-> VMM/Host communication (ADD,DEV).

Definition in file VMMDev.h.

#include <VBox/cdefs.h>
#include <VBox/param.h>
#include <VBox/types.h>
#include <VBox/err.h>
#include <VBox/ostypes.h>
#include <VBox/VMMDev2.h>
#include <iprt/assert.h>

Go to the source code of this file.

Classes

struct  VBoxGuestInfo
struct  VBoxGuestInfo2
struct  VBoxGuestStatistics
struct  VBoxGuestStatus
struct  VBVAMEMORY
struct  VBVARECORD
struct  VMMDevChangeMemBalloon
struct  VMMDevCpuHotPlugStatusRequest
struct  VMMDevCredentials
struct  VMMDevCtlGuestFilterMask
struct  VMMDevDisplayChangeRequest
struct  VMMDevDisplayChangeRequest2
struct  VMMDevEvents
struct  VMMDevGetCpuHotPlugRequest
struct  VMMDevGetHeightReductionRequest
struct  VMMDevGetMemBalloonChangeRequest
struct  VMMDevGetStatisticsChangeRequest
struct  VMMDevMemory
struct  VMMDevPageIsSharedRequest
struct  VMMDevPageSharingStatusRequest
struct  VMMDevPowerStateRequest
struct  VMMDevReportGuestInfo
struct  VMMDevReportGuestInfo2
struct  VMMDevReportGuestStats
struct  VMMDevReportGuestStatus
struct  VMMDevReqGuestCapabilities
struct  VMMDevReqGuestCapabilities2
struct  VMMDevReqHostTime
struct  VMMDevReqHostVersion
struct  VMMDevReqHypervisorInfo
struct  VMMDevReqIdle
struct  VMMDevReqLogString
struct  VMMDevReqMousePointer
struct  VMMDevReqMouseStatus
struct  VMMDevReqPatchMemory
struct  VMMDevReqSessionId
struct  VMMDevRequestHeader
struct  VMMDevSeamlessChangeRequest
struct  VMMDevSharedModuleCheckRequest
struct  VMMDevSharedModuleRegistrationRequest
struct  VMMDevSharedModuleUnregistrationRequest
struct  VMMDEVSHAREDREGIONDESC
struct  VMMDevVideoAccelEnable
struct  VMMDevVideoAccelFlush
struct  VMMDevVideoModeSupportedRequest
struct  VMMDevVideoModeSupportedRequest2
struct  VMMDevVideoSetVisibleRegion
struct  VMMDevVRDPChangeRequest

Defines

#define VMMDEV_CREDENTIALS_STRLEN   128
#define VMMDEV_HEAP_SIZE   (4 * PAGE_SIZE)
#define VMMDEV_MAX_MEMORY_BALLOON(PhysMemTotal)   ( (9 * (PhysMemTotal)) / 10 )
#define VMMDEV_MAX_VMMDEVREQ_SIZE   _1M
#define VMMDEV_MEMORY_VERSION   (1)
#define VMMDEV_PORT_OFF_REQUEST   0
#define VMMDEV_RAM_SIZE   (4 * 256 * PAGE_SIZE)
#define VMMDEV_REQUEST_HEADER_VERSION   (0x10001)
#define VMMDEVSHAREDREGIONDESC_MAX   32
Guest statistics values (VBoxGuestStatistics::u32StatCaps).
#define VBOX_GUEST_STAT_CPU_LOAD_IDLE   RT_BIT(0)
#define VBOX_GUEST_STAT_CPU_LOAD_KERNEL   RT_BIT(1)
#define VBOX_GUEST_STAT_CPU_LOAD_USER   RT_BIT(2)
#define VBOX_GUEST_STAT_HANDLES   RT_BIT(5)
#define VBOX_GUEST_STAT_MEM_COMMIT_TOTAL   RT_BIT(10)
#define VBOX_GUEST_STAT_MEM_KERNEL_NONPAGED   RT_BIT(13)
#define VBOX_GUEST_STAT_MEM_KERNEL_PAGED   RT_BIT(12)
#define VBOX_GUEST_STAT_MEM_KERNEL_TOTAL   RT_BIT(11)
#define VBOX_GUEST_STAT_MEM_SYSTEM_CACHE   RT_BIT(14)
#define VBOX_GUEST_STAT_MEMORY_LOAD   RT_BIT(6)
#define VBOX_GUEST_STAT_PAGE_FILE_SIZE   RT_BIT(15)
#define VBOX_GUEST_STAT_PHYS_MEM_AVAIL   RT_BIT(8)
#define VBOX_GUEST_STAT_PHYS_MEM_BALLOON   RT_BIT(9)
#define VBOX_GUEST_STAT_PHYS_MEM_TOTAL   RT_BIT(7)
#define VBOX_GUEST_STAT_PROCESSES   RT_BIT(4)
#define VBOX_GUEST_STAT_THREADS   RT_BIT(3)
VMMDevReqMousePointer::fFlags
Note:
The VBOX_MOUSE_POINTER_* flags are used in the guest video driver, values must be <= 0x8000 and must not be changed. (try make more sense of this, please).


#define VBOX_MOUSE_POINTER_ALPHA   (0x0002)
#define VBOX_MOUSE_POINTER_SHAPE   (0x0004)
#define VBOX_MOUSE_POINTER_VISIBLE   (0x0001)
VBVA ring defines.
The VBVA ring buffer is suitable for transferring large (< 2GB) amount of data. For example big bitmaps which do not fit to the buffer.

Guest starts writing to the buffer by initializing a record entry in the aRecords queue. VBVA_F_RECORD_PARTIAL indicates that the record is being written. As data is written to the ring buffer, the guest increases off32End for the record.

The host reads the aRecords on flushes and processes all completed records. When host encounters situation when only a partial record presents and cbRecord & ~VBVA_F_RECORD_PARTIAL >= VBVA_RING_BUFFER_SIZE - VBVA_RING_BUFFER_THRESHOLD, the host fetched all record data and updates off32Head. After that on each flush the host continues fetching the data until the record is completed.

#define VBVA_F_MODE_ENABLED   (0x00000001)
#define VBVA_F_MODE_VRDP   (0x00000002)
#define VBVA_F_MODE_VRDP_ORDER_MASK   (0x00000008)
#define VBVA_F_MODE_VRDP_RESET   (0x00000004)
#define VBVA_F_RECORD_PARTIAL   (0x80000000)
#define VBVA_MAX_RECORDS   (64)
#define VBVA_RING_BUFFER_SIZE   (_4M - _1K)
#define VBVA_RING_BUFFER_THRESHOLD   (4 * _1K)
VMMDevVideoAccelEnable::fu32Status.
#define VBVA_F_STATUS_ACCEPTED   (0x01)
#define VBVA_F_STATUS_ENABLED   (0x02)
Credentials request flag (VMMDevCredentials::u32Flags)
#define VMMDEV_CREDENTIALS_CLEAR   RT_BIT(3)
#define VMMDEV_CREDENTIALS_CLEARJUDGE   RT_BIT(9)
#define VMMDEV_CREDENTIALS_JUDGE_DENY   RT_BIT(11)
#define VMMDEV_CREDENTIALS_JUDGE_NOJUDGEMENT   RT_BIT(12)
#define VMMDEV_CREDENTIALS_JUDGE_OK   RT_BIT(10)
#define VMMDEV_CREDENTIALS_NOLOCALLOGON   RT_BIT(17)
#define VMMDEV_CREDENTIALS_PRESENT   RT_BIT(16)
#define VMMDEV_CREDENTIALS_QUERYPRESENCE   RT_BIT(1)
#define VMMDEV_CREDENTIALS_READ   RT_BIT(2)
#define VMMDEV_CREDENTIALS_READJUDGE   RT_BIT(8)
VMMDev events.
Used mainly by VMMDevReq_AcknowledgeEvents/VMMDevEvents and version 1.3 of VMMDevMemory.

#define VMMDEV_EVENT_BALLOON_CHANGE_REQUEST   RT_BIT(6)
#define VMMDEV_EVENT_CPU_HOTPLUG   RT_BIT(10)
#define VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST   RT_BIT(2)
#define VMMDEV_EVENT_HGCM   RT_BIT(1)
#define VMMDEV_EVENT_JUDGE_CREDENTIALS   RT_BIT(3)
#define VMMDEV_EVENT_MOUSE_CAPABILITIES_CHANGED   RT_BIT(0)
#define VMMDEV_EVENT_MOUSE_POSITION_CHANGED   RT_BIT(9)
#define VMMDEV_EVENT_RESTORED   RT_BIT(4)
#define VMMDEV_EVENT_SEAMLESS_MODE_CHANGE_REQUEST   RT_BIT(5)
#define VMMDEV_EVENT_STATISTICS_INTERVAL_CHANGE_REQUEST   RT_BIT(7)
#define VMMDEV_EVENT_VALID_EVENT_MASK   UINT32_C(0x000007ff)
#define VMMDEV_EVENT_VRDP   RT_BIT(8)
Default patch memory size .
Used by VMMDevReq_RegisterPatchMemory and VMMDevReq_DeregisterPatchMemory.

#define VMMDEV_GUEST_DEFAULT_PATCHMEM_SIZE   8192
Guest capability bits.
Used by VMMDevReq_ReportGuestCapabilities and VMMDevReq_SetGuestCapabilities.

#define VMMDEV_GUEST_SUPPORTS_GRAPHICS   RT_BIT_32(2)
#define VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING   RT_BIT_32(1)
#define VMMDEV_GUEST_SUPPORTS_SEAMLESS   RT_BIT_32(0)
VMMDevReqHostVersion::features
#define VMMDEV_HVF_HGCM_PHYS_PAGE_LIST   RT_BIT(0)
The ballooning chunk size which VMMDev works at.
#define VMMDEV_MEMORY_BALLOON_CHUNK_PAGES   (_1M/4096)
#define VMMDEV_MEMORY_BALLOON_CHUNK_SIZE   (VMMDEV_MEMORY_BALLOON_CHUNK_PAGES*4096)
Mouse capability bits (VMMDevReqMouseStatus::mouseFeatures).
#define VMMDEV_MOUSE_GUEST_CAN_ABSOLUTE   RT_BIT(0)
#define VMMDEV_MOUSE_GUEST_MASK   (VMMDEV_MOUSE_NOTIFY_HOST_MASK | VMMDEV_MOUSE_GUEST_USES_VMMDEV)
#define VMMDEV_MOUSE_GUEST_NEEDS_HOST_CURSOR   RT_BIT(2)
#define VMMDEV_MOUSE_GUEST_USES_VMMDEV   RT_BIT(4)
#define VMMDEV_MOUSE_HOST_CAN_ABSOLUTE   RT_BIT(1)
#define VMMDEV_MOUSE_HOST_CANNOT_HWPOINTER   RT_BIT(3)
#define VMMDEV_MOUSE_HOST_HAS_ABS_DEV   RT_BIT(6)
#define VMMDEV_MOUSE_HOST_MASK
#define VMMDEV_MOUSE_HOST_RECHECKS_NEEDS_HOST_CURSOR   RT_BIT(5)
#define VMMDEV_MOUSE_MASK   UINT32_C(0x0000007f)
#define VMMDEV_MOUSE_NOTIFY_GUEST_MASK   VMMDEV_MOUSE_HOST_CAN_ABSOLUTE
#define VMMDEV_MOUSE_NOTIFY_HOST_MASK   (VMMDEV_MOUSE_GUEST_CAN_ABSOLUTE | VMMDEV_MOUSE_GUEST_NEEDS_HOST_CURSOR)
Current version of the VMMDev interface.
Additions are allowed to work only if additions_major == vmmdev_current && additions_minor <= vmmdev_current. Additions version is reported to host (VMMDev) by VMMDevReq_ReportGuestInfo.

Remarks:
These defines also live in the 16-bit and assembly versions of this header.


#define VMMDEV_VERSION   0x00010004
#define VMMDEV_VERSION_MAJOR   (VMMDEV_VERSION >> 16)
#define VMMDEV_VERSION_MINOR   (VMMDEV_VERSION & 0xffff)
VRDP Experience level (VMMDevVRDPChangeRequest::u32VRDPExperienceLevel)
#define VRDP_EXPERIENCE_LEVEL_FULL   4
#define VRDP_EXPERIENCE_LEVEL_HIGH   3
#define VRDP_EXPERIENCE_LEVEL_LOW   1
#define VRDP_EXPERIENCE_LEVEL_MEDIUM   2
#define VRDP_EXPERIENCE_LEVEL_ZERO   0

Enumerations

enum  VBoxGuestStatusCurrent {
  VBoxGuestStatusCurrent_Disabled = 0, VBoxGuestStatusCurrent_Inactive = 1, VBoxGuestStatusCurrent_PreInit = 20, VBoxGuestStatusCurrent_Init = 30,
  VBoxGuestStatusCurrent_Active = 50, VBoxGuestStatusCurrent_Terminating = 100, VBoxGuestStatusCurrent_Terminated = 101, VBoxGuestStatusCurrent_SizeHack = 0x7fffffff
}
enum  VBoxGuestStatusFacility {
  VBoxGuestStatusFacility_Unknown = 0, VBoxGuestStatusFacility_VBoxGuestDriver = 20, VBoxGuestStatusFacility_VBoxService = 100, VBoxGuestStatusFacility_VBoxTray = 101,
  VBoxGuestStatusFacility_All = 999, VBoxGuestStatusFacility_SizeHack = 0x7fffffff
}
enum  VMMDevCpuStatusType { VMMDevCpuStatusType_Invalid = 0, VMMDevCpuStatusType_Disable = 1, VMMDevCpuStatusType_Enable = 2, VMMDevCpuStatusType_SizeHack = 0x7fffffff }
enum  VMMDevPowerState {
  VMMDevPowerState_Invalid = 0, VMMDevPowerState_Pause = 1, VMMDevPowerState_PowerOff = 2, VMMDevPowerState_SaveState = 3,
  VMMDevPowerState_SizeHack = 0x7fffffff
}
enum  VMMDevRequestType {
  VMMDevReq_InvalidRequest = 0, VMMDevReq_GetMouseStatus = 1, VMMDevReq_SetMouseStatus = 2, VMMDevReq_SetPointerShape = 3,
  VMMDevReq_GetHostVersion = 4, VMMDevReq_Idle = 5, VMMDevReq_GetHostTime = 10, VMMDevReq_GetHypervisorInfo = 20,
  VMMDevReq_SetHypervisorInfo = 21, VMMDevReq_RegisterPatchMemory = 22, VMMDevReq_DeregisterPatchMemory = 23, VMMDevReq_SetPowerStatus = 30,
  VMMDevReq_AcknowledgeEvents = 41, VMMDevReq_CtlGuestFilterMask = 42, VMMDevReq_ReportGuestInfo = 50, VMMDevReq_ReportGuestInfo2 = 58,
  VMMDevReq_ReportGuestStatus = 59, VMMDevReq_GetDisplayChangeRequest = 51, VMMDevReq_VideoModeSupported = 52, VMMDevReq_GetHeightReduction = 53,
  VMMDevReq_GetDisplayChangeRequest2 = 54, VMMDevReq_ReportGuestCapabilities = 55, VMMDevReq_SetGuestCapabilities = 56, VMMDevReq_VideoModeSupported2 = 57,
  VMMDevReq_VideoAccelEnable = 70, VMMDevReq_VideoAccelFlush = 71, VMMDevReq_VideoSetVisibleRegion = 72, VMMDevReq_GetSeamlessChangeRequest = 73,
  VMMDevReq_QueryCredentials = 100, VMMDevReq_ReportCredentialsJudgement = 101, VMMDevReq_ReportGuestStats = 110, VMMDevReq_GetMemBalloonChangeRequest = 111,
  VMMDevReq_GetStatisticsChangeRequest = 112, VMMDevReq_ChangeMemBalloon = 113, VMMDevReq_GetVRDPChangeRequest = 150, VMMDevReq_LogString = 200,
  VMMDevReq_GetCpuHotPlugRequest = 210, VMMDevReq_SetCpuHotPlugStatus = 211, VMMDevReq_RegisterSharedModule = 212, VMMDevReq_UnregisterSharedModule = 213,
  VMMDevReq_CheckSharedModules = 214, VMMDevReq_GetPageSharingStatus = 215, VMMDevReq_DebugIsPageShared = 216, VMMDevReq_GetSessionId = 217,
  VMMDevReq_SizeHack = 0x7fffffff
}

Functions

 AssertCompileMemberOffset (VMMDevVRDPChangeRequest, u32VRDPExperienceLevel, 24+4)
 AssertCompileMemberOffset (VMMDevVRDPChangeRequest, u8VRDPActive, 24)
 AssertCompileMemberOffset (VMMDevSeamlessChangeRequest, eventAck, 24+4)
 AssertCompileSize (VMMDevMemory, 8+8+(12+(_4M-_1K)+4 *64+12))
 AssertCompileSize (VBVAMEMORY, 12+(_4M-_1K)+4 *64+12)
 AssertCompileSize (VBVARECORD, 4)
 AssertCompileSize (VMMDevReqSessionId, 24+8)
 AssertCompileSize (VMMDevPageSharingStatusRequest, 24+4)
 AssertCompileSize (VMMDevSharedModuleCheckRequest, 24)
 AssertCompileSize (VMMDevSharedModuleUnregistrationRequest, 24+4+4+8+128+16)
 AssertCompileSize (VMMDevSharedModuleRegistrationRequest, 24+4+4+8+4+4+128+16+16)
 AssertCompileSize (VMMDEVSHAREDREGIONDESC, 16)
 AssertCompileSize (VMMDevGetCpuHotPlugRequest, 24+4+4+4)
 AssertCompileSize (VMMDevCpuHotPlugStatusRequest, 24+4)
 AssertCompileSize (VMMDevVideoSetVisibleRegion, 24+4+16)
 AssertCompileSize (RTRECT, 16)
 AssertCompileSize (VMMDevVideoAccelFlush, 24)
 AssertCompileSize (VMMDevVideoAccelEnable, 24+12)
 AssertCompileSize (VMMDevVRDPChangeRequest, 24+8)
 AssertCompileSize (VMMDevGetHeightReductionRequest, 24+4)
 AssertCompileSize (VMMDevVideoModeSupportedRequest2, 24+20)
 AssertCompileSize (VMMDevVideoModeSupportedRequest, 24+16)
 AssertCompileSize (VMMDevDisplayChangeRequest2, 24+20)
 AssertCompileSize (VMMDevDisplayChangeRequest, 24+16)
 AssertCompileSize (VMMDevSeamlessChangeRequest, 24+8)
 AssertCompileSize (VMMDevCredentials, 24+4+3 *128)
 AssertCompileSize (VMMDevGetStatisticsChangeRequest, 24+8)
 AssertCompileSize (VMMDevChangeMemBalloon, 24+16)
 AssertCompileSize (VMMDevGetMemBalloonChangeRequest, 24+12)
 AssertCompileSize (VMMDevReportGuestStats, 24+19 *4)
 AssertCompileSize (VBoxGuestStatistics, 19 *4)
 AssertCompileSize (VMMDevReportGuestStatus, 24+12)
 AssertCompileSize (VBoxGuestStatus, 12)
 AssertCompileSize (VBoxGuestStatusCurrent, 4)
 AssertCompileSize (VBoxGuestStatusFacility, 4)
 AssertCompileSize (VMMDevReportGuestInfo2, 24+144)
 AssertCompileSize (VMMDevReportGuestInfo, 24+8)
 AssertCompileSize (VBoxGuestInfo, 8)
 AssertCompileSize (VMMDevCtlGuestFilterMask, 24+8)
 AssertCompileSize (VMMDevEvents, 24+4)
 AssertCompileSize (VMMDevPowerStateRequest, 24+4)
 AssertCompileSize (VMMDevPowerState, 4)
 AssertCompileSize (VMMDevReqPatchMemory, 24+12)
 AssertCompileSize (VMMDevReqHypervisorInfo, 24+8)
 AssertCompileSize (VMMDevReqHostTime, 24+8)
 AssertCompileSize (VMMDevReqIdle, 24)
 AssertCompileSize (VMMDevReqGuestCapabilities2, 24+8)
 AssertCompileSize (VMMDevReqGuestCapabilities, 24+4)
 AssertCompileSize (VMMDevReqHostVersion, 24+16)
 AssertCompileSize (VMMDevReqLogString, 24+4)
 AssertCompileSize (VMMDevReqMousePointer, 24+24)
 AssertCompileSize (VMMDevReqMouseStatus, 24+12)
 AssertCompileSize (VMMDevRequestHeader, 24)
 DECLINLINE (int) vmmdevInitRequest(VMMDevRequestHeader *req
 DECLINLINE (size_t) vmmdevGetRequestSize(VMMDevRequestType requestType)


Generated by  Doxygen 1.6.0   Back to index