^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: (GPL-2.0 OR CDDL-1.0) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * Virtual Device for Guest <-> VMM/Host communication interface
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * Copyright (C) 2006-2016 Oracle Corporation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) #ifndef __VBOX_VMMDEV_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #define __VBOX_VMMDEV_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include <asm/bitsperlong.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #include <linux/sizes.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #include <linux/types.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #include <linux/vbox_vmmdev_types.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) /* Port for generic request interface (relative offset). */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #define VMMDEV_PORT_OFF_REQUEST 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) /** Layout of VMMDEV RAM region that contains information for guest. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) struct vmmdev_memory {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) /** The size of this structure. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) u32 size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) /** The structure version. (VMMDEV_MEMORY_VERSION) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) u32 version;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) /** Flag telling that VMMDev has events pending. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) u8 have_events;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) /** Explicit padding, MBZ. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) u8 padding[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) } V1_04;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) /** Pending events flags, set by host. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) u32 host_events;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) /** Mask of events the guest wants, set by guest. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) u32 guest_event_mask;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) } V1_03;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) } V;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) /* struct vbva_memory, not used */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) VMMDEV_ASSERT_SIZE(vmmdev_memory, 8 + 8);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) /** Version of vmmdev_memory structure (vmmdev_memory::version). */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) #define VMMDEV_MEMORY_VERSION (1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) /* Host mouse capabilities has been changed. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) #define VMMDEV_EVENT_MOUSE_CAPABILITIES_CHANGED BIT(0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) /* HGCM event. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) #define VMMDEV_EVENT_HGCM BIT(1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) /* A display change request has been issued. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) #define VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST BIT(2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) /* Credentials are available for judgement. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) #define VMMDEV_EVENT_JUDGE_CREDENTIALS BIT(3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) /* The guest has been restored. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) #define VMMDEV_EVENT_RESTORED BIT(4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) /* Seamless mode state changed. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) #define VMMDEV_EVENT_SEAMLESS_MODE_CHANGE_REQUEST BIT(5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) /* Memory balloon size changed. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) #define VMMDEV_EVENT_BALLOON_CHANGE_REQUEST BIT(6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) /* Statistics interval changed. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) #define VMMDEV_EVENT_STATISTICS_INTERVAL_CHANGE_REQUEST BIT(7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) /* VRDP status changed. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) #define VMMDEV_EVENT_VRDP BIT(8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) /* New mouse position data available. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) #define VMMDEV_EVENT_MOUSE_POSITION_CHANGED BIT(9)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) /* CPU hotplug event occurred. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) #define VMMDEV_EVENT_CPU_HOTPLUG BIT(10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) /* The mask of valid events, for sanity checking. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) #define VMMDEV_EVENT_VALID_EVENT_MASK 0x000007ffU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) * Additions are allowed to work only if additions_major == vmmdev_current &&
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) * additions_minor <= vmmdev_current. Additions version is reported to host
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) * (VMMDev) by VMMDEVREQ_REPORT_GUEST_INFO.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) #define VMMDEV_VERSION 0x00010004
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) #define VMMDEV_VERSION_MAJOR (VMMDEV_VERSION >> 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) #define VMMDEV_VERSION_MINOR (VMMDEV_VERSION & 0xffff)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) /* Maximum request packet size. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) #define VMMDEV_MAX_VMMDEVREQ_SIZE 1048576
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) /* Version of vmmdev_request_header structure. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) #define VMMDEV_REQUEST_HEADER_VERSION 0x10001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) /** struct vmmdev_request_header - Generic VMMDev request header. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) struct vmmdev_request_header {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) /** IN: Size of the structure in bytes (including body). */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) u32 size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) /** IN: Version of the structure. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) u32 version;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) /** IN: Type of the request. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) enum vmmdev_request_type request_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) /** OUT: Return code. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) s32 rc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) /** Reserved field no.1. MBZ. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) u32 reserved1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) /** IN: Requestor information (VMMDEV_REQUESTOR_*) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) u32 requestor;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) VMMDEV_ASSERT_SIZE(vmmdev_request_header, 24);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) * struct vmmdev_mouse_status - Mouse status request structure.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) * Used by VMMDEVREQ_GET_MOUSE_STATUS and VMMDEVREQ_SET_MOUSE_STATUS.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) struct vmmdev_mouse_status {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) /** header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) struct vmmdev_request_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) /** Mouse feature mask. See VMMDEV_MOUSE_*. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) u32 mouse_features;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) /** Mouse x position. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) s32 pointer_pos_x;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) /** Mouse y position. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) s32 pointer_pos_y;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) VMMDEV_ASSERT_SIZE(vmmdev_mouse_status, 24 + 12);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) /* The guest can (== wants to) handle absolute coordinates. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) #define VMMDEV_MOUSE_GUEST_CAN_ABSOLUTE BIT(0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) * The host can (== wants to) send absolute coordinates.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) * (Input not captured.)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) #define VMMDEV_MOUSE_HOST_WANTS_ABSOLUTE BIT(1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) * The guest can *NOT* switch to software cursor and therefore depends on the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) * host cursor.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) * When guest additions are installed and the host has promised to display the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) * cursor itself, the guest installs a hardware mouse driver. Don't ask the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) * guest to switch to a software cursor then.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) #define VMMDEV_MOUSE_GUEST_NEEDS_HOST_CURSOR BIT(2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) /* The host does NOT provide support for drawing the cursor itself. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) #define VMMDEV_MOUSE_HOST_CANNOT_HWPOINTER BIT(3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) /* The guest can read VMMDev events to find out about pointer movement */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) #define VMMDEV_MOUSE_NEW_PROTOCOL BIT(4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) * If the guest changes the status of the VMMDEV_MOUSE_GUEST_NEEDS_HOST_CURSOR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) * bit, the host will honour this.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) #define VMMDEV_MOUSE_HOST_RECHECKS_NEEDS_HOST_CURSOR BIT(5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) * The host supplies an absolute pointing device. The Guest Additions may
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) * wish to use this to decide whether to install their own driver.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) #define VMMDEV_MOUSE_HOST_HAS_ABS_DEV BIT(6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) /* The minimum value our pointing device can return. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) #define VMMDEV_MOUSE_RANGE_MIN 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) /* The maximum value our pointing device can return. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) #define VMMDEV_MOUSE_RANGE_MAX 0xFFFF
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) * struct vmmdev_host_version - VirtualBox host version request structure.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) * VBG uses this to detect the precense of new features in the interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) struct vmmdev_host_version {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) /** Header. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) struct vmmdev_request_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) /** Major version. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) u16 major;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) /** Minor version. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) u16 minor;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) /** Build number. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) u32 build;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) /** SVN revision. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) u32 revision;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) /** Feature mask. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) u32 features;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) VMMDEV_ASSERT_SIZE(vmmdev_host_version, 24 + 16);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) /* Physical page lists are supported by HGCM. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) #define VMMDEV_HVF_HGCM_PHYS_PAGE_LIST BIT(0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) * struct vmmdev_mask - Structure to set / clear bits in a mask used for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) * VMMDEVREQ_SET_GUEST_CAPABILITIES and VMMDEVREQ_CTL_GUEST_FILTER_MASK.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) struct vmmdev_mask {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) /** Header. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) struct vmmdev_request_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) /** Mask of bits to be set. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) u32 or_mask;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) /** Mask of bits to be cleared. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) u32 not_mask;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) VMMDEV_ASSERT_SIZE(vmmdev_mask, 24 + 8);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) /* The guest supports seamless display rendering. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) #define VMMDEV_GUEST_SUPPORTS_SEAMLESS BIT(0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) /* The guest supports mapping guest to host windows. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) #define VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING BIT(1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) * The guest graphical additions are active.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) * Used for fast activation and deactivation of certain graphical operations
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) * (e.g. resizing & seamless). The legacy VMMDEVREQ_REPORT_GUEST_CAPABILITIES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) * request sets this automatically, but VMMDEVREQ_SET_GUEST_CAPABILITIES does
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) * not.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) #define VMMDEV_GUEST_SUPPORTS_GRAPHICS BIT(2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) /* The mask of valid capabilities, for sanity checking. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) #define VMMDEV_GUEST_CAPABILITIES_MASK 0x00000007U
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) /** struct vmmdev_hypervisorinfo - Hypervisor info structure. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) struct vmmdev_hypervisorinfo {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) /** Header. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) struct vmmdev_request_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) * Guest virtual address of proposed hypervisor start.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) * Not used by VMMDEVREQ_GET_HYPERVISOR_INFO.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) u32 hypervisor_start;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) /** Hypervisor size in bytes. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) u32 hypervisor_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) VMMDEV_ASSERT_SIZE(vmmdev_hypervisorinfo, 24 + 8);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) /** struct vmmdev_events - Pending events structure. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) struct vmmdev_events {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) /** Header. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) struct vmmdev_request_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) /** OUT: Pending event mask. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) u32 events;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) VMMDEV_ASSERT_SIZE(vmmdev_events, 24 + 4);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) #define VMMDEV_OSTYPE_LINUX26 0x53000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) #define VMMDEV_OSTYPE_X64 BIT(8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) /** struct vmmdev_guestinfo - Guest information report. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) struct vmmdev_guest_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) /** Header. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) struct vmmdev_request_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) * The VMMDev interface version expected by additions.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) * *Deprecated*, do not use anymore! Will be removed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) u32 interface_version;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) /** Guest OS type. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) u32 os_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) VMMDEV_ASSERT_SIZE(vmmdev_guest_info, 24 + 8);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) #define VMMDEV_GUEST_INFO2_ADDITIONS_FEATURES_REQUESTOR_INFO BIT(0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) /** struct vmmdev_guestinfo2 - Guest information report, version 2. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) struct vmmdev_guest_info2 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) /** Header. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) struct vmmdev_request_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) /** Major version. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) u16 additions_major;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) /** Minor version. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) u16 additions_minor;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) /** Build number. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) u32 additions_build;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) /** SVN revision. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) u32 additions_revision;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) /** Feature mask. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) u32 additions_features;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) * The intentional meaning of this field was:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) * Some additional information, for example 'Beta 1' or something like
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) * that.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) * The way it was implemented was implemented: VBG_VERSION_STRING.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) * This means the first three members are duplicated in this field (if
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) * the guest build config is sane). So, the user must check this and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) * chop it off before usage. There is, because of the Main code's blind
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) * trust in the field's content, no way back.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) char name[128];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) VMMDEV_ASSERT_SIZE(vmmdev_guest_info2, 24 + 144);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) enum vmmdev_guest_facility_type {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) VBOXGUEST_FACILITY_TYPE_UNKNOWN = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) VBOXGUEST_FACILITY_TYPE_VBOXGUEST_DRIVER = 20,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) /* VBoxGINA / VBoxCredProv / pam_vbox. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) VBOXGUEST_FACILITY_TYPE_AUTO_LOGON = 90,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) VBOXGUEST_FACILITY_TYPE_VBOX_SERVICE = 100,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) /* VBoxTray (Windows), VBoxClient (Linux, Unix). */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) VBOXGUEST_FACILITY_TYPE_VBOX_TRAY_CLIENT = 101,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) VBOXGUEST_FACILITY_TYPE_SEAMLESS = 1000,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) VBOXGUEST_FACILITY_TYPE_GRAPHICS = 1100,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) VBOXGUEST_FACILITY_TYPE_ALL = 0x7ffffffe,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) /* Ensure the enum is a 32 bit data-type */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) VBOXGUEST_FACILITY_TYPE_SIZEHACK = 0x7fffffff
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) enum vmmdev_guest_facility_status {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) VBOXGUEST_FACILITY_STATUS_INACTIVE = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) VBOXGUEST_FACILITY_STATUS_PAUSED = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) VBOXGUEST_FACILITY_STATUS_PRE_INIT = 20,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) VBOXGUEST_FACILITY_STATUS_INIT = 30,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) VBOXGUEST_FACILITY_STATUS_ACTIVE = 50,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) VBOXGUEST_FACILITY_STATUS_TERMINATING = 100,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) VBOXGUEST_FACILITY_STATUS_TERMINATED = 101,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) VBOXGUEST_FACILITY_STATUS_FAILED = 800,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) VBOXGUEST_FACILITY_STATUS_UNKNOWN = 999,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) /* Ensure the enum is a 32 bit data-type */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) VBOXGUEST_FACILITY_STATUS_SIZEHACK = 0x7fffffff
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) /** struct vmmdev_guest_status - Guest Additions status structure. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) struct vmmdev_guest_status {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) /** Header. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) struct vmmdev_request_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) /** Facility the status is indicated for. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) enum vmmdev_guest_facility_type facility;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) /** Current guest status. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) enum vmmdev_guest_facility_status status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) /** Flags, not used at the moment. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) u32 flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) VMMDEV_ASSERT_SIZE(vmmdev_guest_status, 24 + 12);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) #define VMMDEV_MEMORY_BALLOON_CHUNK_SIZE (1048576)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) #define VMMDEV_MEMORY_BALLOON_CHUNK_PAGES (1048576 / 4096)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) /** struct vmmdev_memballoon_info - Memory-balloon info structure. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) struct vmmdev_memballoon_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) /** Header. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) struct vmmdev_request_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) /** Balloon size in megabytes. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) u32 balloon_chunks;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) /** Guest ram size in megabytes. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) u32 phys_mem_chunks;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338) * Setting this to VMMDEV_EVENT_BALLOON_CHANGE_REQUEST indicates that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) * the request is a response to that event.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) * (Don't confuse this with VMMDEVREQ_ACKNOWLEDGE_EVENTS.)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) u32 event_ack;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344) VMMDEV_ASSERT_SIZE(vmmdev_memballoon_info, 24 + 12);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) /** struct vmmdev_memballoon_change - Change the size of the balloon. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) struct vmmdev_memballoon_change {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) /** Header. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) struct vmmdev_request_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350) /** The number of pages in the array. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351) u32 pages;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) /** true = inflate, false = deflate. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353) u32 inflate;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354) /** Physical address (u64) of each page. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) u64 phys_page[VMMDEV_MEMORY_BALLOON_CHUNK_PAGES];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358) /** struct vmmdev_write_core_dump - Write Core Dump request data. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359) struct vmmdev_write_core_dump {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360) /** Header. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361) struct vmmdev_request_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362) /** Flags (reserved, MBZ). */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363) u32 flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365) VMMDEV_ASSERT_SIZE(vmmdev_write_core_dump, 24 + 4);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) /** struct vmmdev_heartbeat - Heart beat check state structure. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) struct vmmdev_heartbeat {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369) /** Header. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370) struct vmmdev_request_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371) /** OUT: Guest heartbeat interval in nanosec. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) u64 interval_ns;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373) /** Heartbeat check flag. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374) u8 enabled;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375) /** Explicit padding, MBZ. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376) u8 padding[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) VMMDEV_ASSERT_SIZE(vmmdev_heartbeat, 24 + 12);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380) #define VMMDEV_HGCM_REQ_DONE BIT(0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) #define VMMDEV_HGCM_REQ_CANCELLED BIT(1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383) /** struct vmmdev_hgcmreq_header - vmmdev HGCM requests header. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384) struct vmmdev_hgcmreq_header {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385) /** Request header. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386) struct vmmdev_request_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388) /** HGCM flags. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389) u32 flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391) /** Result code. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392) s32 result;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394) VMMDEV_ASSERT_SIZE(vmmdev_hgcmreq_header, 24 + 8);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396) /** struct vmmdev_hgcm_connect - HGCM connect request structure. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397) struct vmmdev_hgcm_connect {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398) /** HGCM request header. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399) struct vmmdev_hgcmreq_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401) /** IN: Description of service to connect to. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402) struct vmmdev_hgcm_service_location loc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 404) /** OUT: Client identifier assigned by local instance of HGCM. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 405) u32 client_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 406) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 407) VMMDEV_ASSERT_SIZE(vmmdev_hgcm_connect, 32 + 132 + 4);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 408)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 409) /** struct vmmdev_hgcm_disconnect - HGCM disconnect request structure. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 410) struct vmmdev_hgcm_disconnect {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 411) /** HGCM request header. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 412) struct vmmdev_hgcmreq_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 413)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 414) /** IN: Client identifier. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 415) u32 client_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 416) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 417) VMMDEV_ASSERT_SIZE(vmmdev_hgcm_disconnect, 32 + 4);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 418)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 419) #define VMMDEV_HGCM_MAX_PARMS 32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 420)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 421) /** struct vmmdev_hgcm_call - HGCM call request structure. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 422) struct vmmdev_hgcm_call {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 423) /* request header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 424) struct vmmdev_hgcmreq_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 425)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 426) /** IN: Client identifier. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 427) u32 client_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 428) /** IN: Service function number. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 429) u32 function;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 430) /** IN: Number of parameters. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 431) u32 parm_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 432) /** Parameters follow in form: HGCMFunctionParameter32|64 parms[X]; */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 433) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 434) VMMDEV_ASSERT_SIZE(vmmdev_hgcm_call, 32 + 12);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 435)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 436) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 437) * struct vmmdev_hgcm_cancel2 - HGCM cancel request structure, version 2.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 438) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 439) * After the request header.rc will be:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 440) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 441) * VINF_SUCCESS when cancelled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 442) * VERR_NOT_FOUND if the specified request cannot be found.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 443) * VERR_INVALID_PARAMETER if the address is invalid valid.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 444) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 445) struct vmmdev_hgcm_cancel2 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 446) /** Header. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 447) struct vmmdev_request_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 448) /** The physical address of the request to cancel. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 449) u32 phys_req_to_cancel;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 450) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 451) VMMDEV_ASSERT_SIZE(vmmdev_hgcm_cancel2, 24 + 4);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 452)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 453) #endif