linux/include/uapi/linux/vboxguest.h

/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR CDDL-1.0) */
/*
 * VBoxGuest - VirtualBox Guest Additions Driver Interface.
 *
 * Copyright (C) 2006-2016 Oracle Corporation
 */

#ifndef __UAPI_VBOXGUEST_H__
#define __UAPI_VBOXGUEST_H__

#include <asm/bitsperlong.h>
#include <linux/ioctl.h>
#include <linux/vbox_err.h>
#include <linux/vbox_vmmdev_types.h>

/* Version of vbg_ioctl_hdr structure. */
#define VBG_IOCTL_HDR_VERSION
/* Default request type.  Use this for non-VMMDev requests. */
#define VBG_IOCTL_HDR_TYPE_DEFAULT

/**
 * Common ioctl header.
 *
 * This is a mirror of vmmdev_request_header to prevent duplicating data and
 * needing to verify things multiple times.
 */
struct vbg_ioctl_hdr {};
VMMDEV_ASSERT_SIZE();


/*
 * The VBoxGuest I/O control version.
 *
 * As usual, the high word contains the major version and changes to it
 * signifies incompatible changes.
 *
 * The lower word is the minor version number, it is increased when new
 * functions are added or existing changed in a backwards compatible manner.
 */
#define VBG_IOC_VERSION

/**
 * VBG_IOCTL_DRIVER_VERSION_INFO data structure
 *
 * Note VBG_IOCTL_DRIVER_VERSION_INFO may switch the session to a backwards
 * compatible interface version if uClientVersion indicates older client code.
 */
struct vbg_ioctl_driver_version_info {};
VMMDEV_ASSERT_SIZE();

#define VBG_IOCTL_DRIVER_VERSION_INFO


/* IOCTL to perform a VMM Device request less than 1KB in size. */
#define VBG_IOCTL_VMMDEV_REQUEST(s)


/* IOCTL to perform a VMM Device request larger then 1KB. */
#define VBG_IOCTL_VMMDEV_REQUEST_BIG


/** VBG_IOCTL_HGCM_CONNECT data structure. */
struct vbg_ioctl_hgcm_connect {};
VMMDEV_ASSERT_SIZE();

#define VBG_IOCTL_HGCM_CONNECT


/** VBG_IOCTL_HGCM_DISCONNECT data structure. */
struct vbg_ioctl_hgcm_disconnect {};
VMMDEV_ASSERT_SIZE();

#define VBG_IOCTL_HGCM_DISCONNECT


/** VBG_IOCTL_HGCM_CALL data structure. */
struct vbg_ioctl_hgcm_call {};
VMMDEV_ASSERT_SIZE();

#define VBG_IOCTL_HGCM_CALL_32(s)
#define VBG_IOCTL_HGCM_CALL_64(s)
#if __BITS_PER_LONG == 64
#define VBG_IOCTL_HGCM_CALL(s)
#else
#define VBG_IOCTL_HGCM_CALL
#endif


/** VBG_IOCTL_LOG data structure. */
struct vbg_ioctl_log {};

#define VBG_IOCTL_LOG(s)


/** VBG_IOCTL_WAIT_FOR_EVENTS data structure. */
struct vbg_ioctl_wait_for_events {};
VMMDEV_ASSERT_SIZE();

#define VBG_IOCTL_WAIT_FOR_EVENTS


/*
 * IOCTL to VBoxGuest to interrupt (cancel) any pending
 * VBG_IOCTL_WAIT_FOR_EVENTS and return.
 *
 * Handled inside the vboxguest driver and not seen by the host at all.
 * After calling this, VBG_IOCTL_WAIT_FOR_EVENTS should no longer be called in
 * the same session. Any VBOXGUEST_IOCTL_WAITEVENT calls in the same session
 * done after calling this will directly exit with -EINTR.
 */
#define VBG_IOCTL_INTERRUPT_ALL_WAIT_FOR_EVENTS


/** VBG_IOCTL_CHANGE_FILTER_MASK data structure. */
struct vbg_ioctl_change_filter {};
VMMDEV_ASSERT_SIZE();

/* IOCTL to VBoxGuest to control the event filter mask. */
#define VBG_IOCTL_CHANGE_FILTER_MASK


/** VBG_IOCTL_ACQUIRE_GUEST_CAPABILITIES data structure. */
struct vbg_ioctl_acquire_guest_caps {};
VMMDEV_ASSERT_SIZE();

#define VBGL_IOC_AGC_FLAGS_CONFIG_ACQUIRE_MODE
#define VBGL_IOC_AGC_FLAGS_VALID_MASK

#define VBG_IOCTL_ACQUIRE_GUEST_CAPABILITIES


/** VBG_IOCTL_CHANGE_GUEST_CAPABILITIES data structure. */
struct vbg_ioctl_set_guest_caps {};
VMMDEV_ASSERT_SIZE();

#define VBG_IOCTL_CHANGE_GUEST_CAPABILITIES


/** VBG_IOCTL_CHECK_BALLOON data structure. */
struct vbg_ioctl_check_balloon {};
VMMDEV_ASSERT_SIZE();

/*
 * IOCTL to check memory ballooning.
 *
 * The guest kernel module will ask the host for the current size of the
 * balloon and adjust the size. Or it will set handle_in_r3 = true and R3 is
 * responsible for allocating memory and calling VBG_IOCTL_CHANGE_BALLOON.
 */
#define VBG_IOCTL_CHECK_BALLOON


/** VBG_IOCTL_WRITE_CORE_DUMP data structure. */
struct vbg_ioctl_write_coredump {};
VMMDEV_ASSERT_SIZE();

#define VBG_IOCTL_WRITE_CORE_DUMP

#endif