Carl van Schaik 0c7e12307d driver: vservices: Add the vservices framework and core
Adds the Virtual Services framework and core protocol code.

The Virtual Services framework provides a bus for generic inter-vm
communications using a high level abstract model. The vservices
bus provides support for both HLOS and embedded C clients and servers,
allowing VMs to communicate in a common OS independent manner.

The vservices bus and services over it are hot-plug capable and
can support a wide variety of use cases, including device virtualization
using virtual device protocol (classes) and drivers, similar in
concept to USB or virtio.

Change-Id: I7a696354f59730e0ad340fb92dc85661a7376dee
Signed-off-by: Carl van Schaik <carl@cog.systems>
Git-commit: 42814676e8bf5fb34060ee80e05e2175ae146292
Git-repo: https://github.com/CogSystems/linux-msm/commits/msm-4.9-hyp
[mnalajal@codeaurora: Resolve trivial merge conflicts]
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
2018-11-19 18:17:34 -08:00

42 lines
1.3 KiB
C

/*
* include/vservices/types.h
*
* Copyright (c) 2012-2018 General Dynamics
* Copyright (c) 2014 Open Kernel Labs, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef _VSERVICE_TYPES_H
#define _VSERVICE_TYPES_H
#include <linux/types.h>
typedef u16 vs_service_id_t;
typedef u16 vs_message_id_t;
/*
* An opaque handle to a queued asynchronous command. This is used internally
* by the generated interface code, to identify which of the pending commands
* is being replied to. It is provided as a parameter to non-blocking handler
* callbacks for queued asynchronous requests, and must be stored by the server
* and passed to the corresponding reply call.
*/
typedef struct vservice_queued_request vservice_queued_request_t;
/*
* Following enum is to be used by server for informing about successful or
* unsuccessful open callback by using VS_SERVER_RESP_SUCCESS or
* VS_SERVER_RESP_FAILURE resepectively. Server can choose to complete request
* explicitely in this case it should return VS_SERVER_RESP_EXPLICIT_COMPLETE.
*/
typedef enum vs_server_response_type {
VS_SERVER_RESP_SUCCESS,
VS_SERVER_RESP_FAILURE,
VS_SERVER_RESP_EXPLICIT_COMPLETE
} vs_server_response_type_t;
#endif /*_VSERVICE_TYPES_H */