~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/xen/interface/io/pvcalls.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: MIT */
  2 
  3 #ifndef __XEN_PUBLIC_IO_XEN_PVCALLS_H__
  4 #define __XEN_PUBLIC_IO_XEN_PVCALLS_H__
  5 
  6 #include <linux/net.h>
  7 #include <xen/interface/io/ring.h>
  8 #include <xen/interface/grant_table.h>
  9 
 10 /* "1" means socket, connect, release, bind, listen, accept and poll */
 11 #define XENBUS_FUNCTIONS_CALLS "1"
 12 
 13 /*
 14  * See docs/misc/pvcalls.markdown in xen.git for the full specification:
 15  * https://xenbits.xen.org/docs/unstable/misc/pvcalls.html
 16  */
 17 struct pvcalls_data_intf {
 18     RING_IDX in_cons, in_prod, in_error;
 19 
 20     uint8_t pad1[52];
 21 
 22     RING_IDX out_cons, out_prod, out_error;
 23 
 24     uint8_t pad2[52];
 25 
 26     RING_IDX ring_order;
 27     grant_ref_t ref[];
 28 };
 29 DEFINE_XEN_FLEX_RING(pvcalls);
 30 
 31 #define PVCALLS_SOCKET         0
 32 #define PVCALLS_CONNECT        1
 33 #define PVCALLS_RELEASE        2
 34 #define PVCALLS_BIND           3
 35 #define PVCALLS_LISTEN         4
 36 #define PVCALLS_ACCEPT         5
 37 #define PVCALLS_POLL           6
 38 
 39 struct xen_pvcalls_request {
 40     uint32_t req_id; /* private to guest, echoed in response */
 41     uint32_t cmd;    /* command to execute */
 42     union {
 43         struct xen_pvcalls_socket {
 44             uint64_t id;
 45             uint32_t domain;
 46             uint32_t type;
 47             uint32_t protocol;
 48         } socket;
 49         struct xen_pvcalls_connect {
 50             uint64_t id;
 51             uint8_t addr[28];
 52             uint32_t len;
 53             uint32_t flags;
 54             grant_ref_t ref;
 55             uint32_t evtchn;
 56         } connect;
 57         struct xen_pvcalls_release {
 58             uint64_t id;
 59             uint8_t reuse;
 60         } release;
 61         struct xen_pvcalls_bind {
 62             uint64_t id;
 63             uint8_t addr[28];
 64             uint32_t len;
 65         } bind;
 66         struct xen_pvcalls_listen {
 67             uint64_t id;
 68             uint32_t backlog;
 69         } listen;
 70         struct xen_pvcalls_accept {
 71             uint64_t id;
 72             uint64_t id_new;
 73             grant_ref_t ref;
 74             uint32_t evtchn;
 75         } accept;
 76         struct xen_pvcalls_poll {
 77             uint64_t id;
 78         } poll;
 79         /* dummy member to force sizeof(struct xen_pvcalls_request)
 80          * to match across archs */
 81         struct xen_pvcalls_dummy {
 82             uint8_t dummy[56];
 83         } dummy;
 84     } u;
 85 };
 86 
 87 struct xen_pvcalls_response {
 88     uint32_t req_id;
 89     uint32_t cmd;
 90     int32_t ret;
 91     uint32_t pad;
 92     union {
 93         struct _xen_pvcalls_socket {
 94             uint64_t id;
 95         } socket;
 96         struct _xen_pvcalls_connect {
 97             uint64_t id;
 98         } connect;
 99         struct _xen_pvcalls_release {
100             uint64_t id;
101         } release;
102         struct _xen_pvcalls_bind {
103             uint64_t id;
104         } bind;
105         struct _xen_pvcalls_listen {
106             uint64_t id;
107         } listen;
108         struct _xen_pvcalls_accept {
109             uint64_t id;
110         } accept;
111         struct _xen_pvcalls_poll {
112             uint64_t id;
113         } poll;
114         struct _xen_pvcalls_dummy {
115             uint8_t dummy[8];
116         } dummy;
117     } u;
118 };
119 
120 DEFINE_RING_TYPES(xen_pvcalls, struct xen_pvcalls_request,
121                   struct xen_pvcalls_response);
122 
123 #endif
124 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php