1 #ifndef __XEN_PUBLIC_IO_XEN_PVCALLS_H__
2 #define __XEN_PUBLIC_IO_XEN_PVCALLS_H__
5 #include <xen/interface/io/ring.h>
6 #include <xen/interface/grant_table.h>
8 /* "1" means socket, connect, release, bind, listen, accept and poll */
9 #define XENBUS_FUNCTIONS_CALLS "1"
12 * See docs/misc/pvcalls.markdown in xen.git for the full specification:
13 * https://xenbits.xen.org/docs/unstable/misc/pvcalls.html
15 struct pvcalls_data_intf
{
16 RING_IDX in_cons
, in_prod
, in_error
;
20 RING_IDX out_cons
, out_prod
, out_error
;
27 DEFINE_XEN_FLEX_RING(pvcalls
);
29 #define PVCALLS_SOCKET 0
30 #define PVCALLS_CONNECT 1
31 #define PVCALLS_RELEASE 2
32 #define PVCALLS_BIND 3
33 #define PVCALLS_LISTEN 4
34 #define PVCALLS_ACCEPT 5
35 #define PVCALLS_POLL 6
37 struct xen_pvcalls_request
{
38 uint32_t req_id
; /* private to guest, echoed in response */
39 uint32_t cmd
; /* command to execute */
41 struct xen_pvcalls_socket
{
47 struct xen_pvcalls_connect
{
55 struct xen_pvcalls_release
{
59 struct xen_pvcalls_bind
{
64 struct xen_pvcalls_listen
{
68 struct xen_pvcalls_accept
{
74 struct xen_pvcalls_poll
{
77 /* dummy member to force sizeof(struct xen_pvcalls_request)
78 * to match across archs */
79 struct xen_pvcalls_dummy
{
85 struct xen_pvcalls_response
{
91 struct _xen_pvcalls_socket
{
94 struct _xen_pvcalls_connect
{
97 struct _xen_pvcalls_release
{
100 struct _xen_pvcalls_bind
{
103 struct _xen_pvcalls_listen
{
106 struct _xen_pvcalls_accept
{
109 struct _xen_pvcalls_poll
{
112 struct _xen_pvcalls_dummy
{
118 DEFINE_RING_TYPES(xen_pvcalls
, struct xen_pvcalls_request
,
119 struct xen_pvcalls_response
);