/* SPDX-License-Identifier: (GPL-2.0 OR CDDL-1.0) */ /* * Virtual Device for Guest <-> VMM/Host communication interface * * Copyright (C) 2006-2016 Oracle Corporation */ #ifndef __VBOX_VMMDEV_H__ #define __VBOX_VMMDEV_H__ #include <asm/bitsperlong.h> #include <linux/sizes.h> #include <linux/types.h> #include <linux/vbox_vmmdev_types.h> /* Port for generic request interface (relative offset). */ #define VMMDEV_PORT_OFF_REQUEST … /** Layout of VMMDEV RAM region that contains information for guest. */ struct vmmdev_memory { … }; VMMDEV_ASSERT_SIZE(…); /** Version of vmmdev_memory structure (vmmdev_memory::version). */ #define VMMDEV_MEMORY_VERSION … /* Host mouse capabilities has been changed. */ #define VMMDEV_EVENT_MOUSE_CAPABILITIES_CHANGED … /* HGCM event. */ #define VMMDEV_EVENT_HGCM … /* A display change request has been issued. */ #define VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST … /* Credentials are available for judgement. */ #define VMMDEV_EVENT_JUDGE_CREDENTIALS … /* The guest has been restored. */ #define VMMDEV_EVENT_RESTORED … /* Seamless mode state changed. */ #define VMMDEV_EVENT_SEAMLESS_MODE_CHANGE_REQUEST … /* Memory balloon size changed. */ #define VMMDEV_EVENT_BALLOON_CHANGE_REQUEST … /* Statistics interval changed. */ #define VMMDEV_EVENT_STATISTICS_INTERVAL_CHANGE_REQUEST … /* VRDP status changed. */ #define VMMDEV_EVENT_VRDP … /* New mouse position data available. */ #define VMMDEV_EVENT_MOUSE_POSITION_CHANGED … /* CPU hotplug event occurred. */ #define VMMDEV_EVENT_CPU_HOTPLUG … /* The mask of valid events, for sanity checking. */ #define VMMDEV_EVENT_VALID_EVENT_MASK … /* * Additions are allowed to work only if additions_major == vmmdev_current && * additions_minor <= vmmdev_current. Additions version is reported to host * (VMMDev) by VMMDEVREQ_REPORT_GUEST_INFO. */ #define VMMDEV_VERSION … #define VMMDEV_VERSION_MAJOR … #define VMMDEV_VERSION_MINOR … /* Maximum request packet size. */ #define VMMDEV_MAX_VMMDEVREQ_SIZE … /* Version of vmmdev_request_header structure. */ #define VMMDEV_REQUEST_HEADER_VERSION … /** struct vmmdev_request_header - Generic VMMDev request header. */ struct vmmdev_request_header { … }; VMMDEV_ASSERT_SIZE(…); /** * struct vmmdev_mouse_status - Mouse status request structure. * * Used by VMMDEVREQ_GET_MOUSE_STATUS and VMMDEVREQ_SET_MOUSE_STATUS. */ struct vmmdev_mouse_status { … }; VMMDEV_ASSERT_SIZE(…); /* The guest can (== wants to) handle absolute coordinates. */ #define VMMDEV_MOUSE_GUEST_CAN_ABSOLUTE … /* * The host can (== wants to) send absolute coordinates. * (Input not captured.) */ #define VMMDEV_MOUSE_HOST_WANTS_ABSOLUTE … /* * The guest can *NOT* switch to software cursor and therefore depends on the * host cursor. * * When guest additions are installed and the host has promised to display the * cursor itself, the guest installs a hardware mouse driver. Don't ask the * guest to switch to a software cursor then. */ #define VMMDEV_MOUSE_GUEST_NEEDS_HOST_CURSOR … /* The host does NOT provide support for drawing the cursor itself. */ #define VMMDEV_MOUSE_HOST_CANNOT_HWPOINTER … /* The guest can read VMMDev events to find out about pointer movement */ #define VMMDEV_MOUSE_NEW_PROTOCOL … /* * If the guest changes the status of the VMMDEV_MOUSE_GUEST_NEEDS_HOST_CURSOR * bit, the host will honour this. */ #define VMMDEV_MOUSE_HOST_RECHECKS_NEEDS_HOST_CURSOR … /* * The host supplies an absolute pointing device. The Guest Additions may * wish to use this to decide whether to install their own driver. */ #define VMMDEV_MOUSE_HOST_HAS_ABS_DEV … /* The minimum value our pointing device can return. */ #define VMMDEV_MOUSE_RANGE_MIN … /* The maximum value our pointing device can return. */ #define VMMDEV_MOUSE_RANGE_MAX … /** * struct vmmdev_host_version - VirtualBox host version request structure. * * VBG uses this to detect the precense of new features in the interface. */ struct vmmdev_host_version { … }; VMMDEV_ASSERT_SIZE(…); /* Physical page lists are supported by HGCM. */ #define VMMDEV_HVF_HGCM_PHYS_PAGE_LIST … /** * struct vmmdev_mask - Structure to set / clear bits in a mask used for * VMMDEVREQ_SET_GUEST_CAPABILITIES and VMMDEVREQ_CTL_GUEST_FILTER_MASK. */ struct vmmdev_mask { … }; VMMDEV_ASSERT_SIZE(…); /* The guest supports seamless display rendering. */ #define VMMDEV_GUEST_SUPPORTS_SEAMLESS … /* The guest supports mapping guest to host windows. */ #define VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING … /* * The guest graphical additions are active. * Used for fast activation and deactivation of certain graphical operations * (e.g. resizing & seamless). The legacy VMMDEVREQ_REPORT_GUEST_CAPABILITIES * request sets this automatically, but VMMDEVREQ_SET_GUEST_CAPABILITIES does * not. */ #define VMMDEV_GUEST_SUPPORTS_GRAPHICS … /* The mask of valid capabilities, for sanity checking. */ #define VMMDEV_GUEST_CAPABILITIES_MASK … /** struct vmmdev_hypervisorinfo - Hypervisor info structure. */ struct vmmdev_hypervisorinfo { … }; VMMDEV_ASSERT_SIZE(…); /** struct vmmdev_events - Pending events structure. */ struct vmmdev_events { … }; VMMDEV_ASSERT_SIZE(…); #define VMMDEV_OSTYPE_LINUX26 … #define VMMDEV_OSTYPE_X64 … /** struct vmmdev_guestinfo - Guest information report. */ struct vmmdev_guest_info { … }; VMMDEV_ASSERT_SIZE(…); #define VMMDEV_GUEST_INFO2_ADDITIONS_FEATURES_REQUESTOR_INFO … /** struct vmmdev_guestinfo2 - Guest information report, version 2. */ struct vmmdev_guest_info2 { … }; VMMDEV_ASSERT_SIZE(…); enum vmmdev_guest_facility_type { … }; enum vmmdev_guest_facility_status { … }; /** struct vmmdev_guest_status - Guest Additions status structure. */ struct vmmdev_guest_status { … }; VMMDEV_ASSERT_SIZE(…); #define VMMDEV_MEMORY_BALLOON_CHUNK_SIZE … #define VMMDEV_MEMORY_BALLOON_CHUNK_PAGES … /** struct vmmdev_memballoon_info - Memory-balloon info structure. */ struct vmmdev_memballoon_info { … }; VMMDEV_ASSERT_SIZE(…); /** struct vmmdev_memballoon_change - Change the size of the balloon. */ struct vmmdev_memballoon_change { … }; /** struct vmmdev_write_core_dump - Write Core Dump request data. */ struct vmmdev_write_core_dump { … }; VMMDEV_ASSERT_SIZE(…); /** struct vmmdev_heartbeat - Heart beat check state structure. */ struct vmmdev_heartbeat { … } __packed; VMMDEV_ASSERT_SIZE(…); #define VMMDEV_HGCM_REQ_DONE … #define VMMDEV_HGCM_REQ_CANCELLED … /** struct vmmdev_hgcmreq_header - vmmdev HGCM requests header. */ struct vmmdev_hgcmreq_header { … }; VMMDEV_ASSERT_SIZE(…); /** struct vmmdev_hgcm_connect - HGCM connect request structure. */ struct vmmdev_hgcm_connect { … }; VMMDEV_ASSERT_SIZE(…); /** struct vmmdev_hgcm_disconnect - HGCM disconnect request structure. */ struct vmmdev_hgcm_disconnect { … }; VMMDEV_ASSERT_SIZE(…); #define VMMDEV_HGCM_MAX_PARMS … /** struct vmmdev_hgcm_call - HGCM call request structure. */ struct vmmdev_hgcm_call { … }; VMMDEV_ASSERT_SIZE(…); /** * struct vmmdev_hgcm_cancel2 - HGCM cancel request structure, version 2. * * After the request header.rc will be: * * VINF_SUCCESS when cancelled. * VERR_NOT_FOUND if the specified request cannot be found. * VERR_INVALID_PARAMETER if the address is invalid valid. */ struct vmmdev_hgcm_cancel2 { … }; VMMDEV_ASSERT_SIZE(…); #endif