History

Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost

Pull virtio updates from Michael Tsirkin: "virtio: virtio 1.0 support, misc patches This adds a lot of infrastructure for virtio 1.0 support. Notable missing pieces: virtio pci, virtio balloon (needs spec extension), vhost scsi. Plus, there are some minor fixes in a couple of places. Note: some net drivers are affected by these patches. David said he's fine with merging these patches through my tree. Rusty's on vacation, he acked using my tree for these, too" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (70 commits) virtio_ccw: finalize_features error handling virtio_ccw: future-proof finalize_features virtio_pci: rename virtio_pci -> virtio_pci_common virtio_pci: update file descriptions and copyright virtio_pci: split out legacy device support virtio_pci: setup config vector indirectly virtio_pci: setup vqs indirectly virtio_pci: delete vqs indirectly virtio_pci: use priv for vq notification virtio_pci: free up vq->priv virtio_pci: fix coding style for structs virtio_pci: add isr field virtio: drop legacy_only driver flag virtio_balloon: drop legacy_only driver flag virtio_ccw: rev 1 devices set VIRTIO_F_VERSION_1 virtio: allow finalize_features to fail virtio_ccw: legacy: don't negotiate rev 1/features virtio: add API to detect legacy devices virtio_console: fix sparse warnings vhost: remove unnecessary forward declarations in vhost.h ...

Linus Torvalds committed 11 years ago

Commit 6b9e2ce2 parents 14ba9a2 f01a2a840 files · +2048 −1428Browse files

Showing the changes to include/uapi/linux (9 of 40 files). Show all

Unified · Split

9 files
  1. include/uapi/linux/Kbuild +2 −0
  2. include/uapi/linux/if_tun.h +4 −13
  3. include/uapi/linux/virtio_blk.h +8 −7
  4. include/uapi/linux/virtio_config.h +7 −2
  5. include/uapi/linux/virtio_console.h +4 −3
  6. include/uapi/linux/virtio_net.h +8 −7
  7. include/uapi/linux/virtio_ring.h +23 −22
  8. include/uapi/linux/virtio_scsi.h +164 −0
  9. include/uapi/linux/virtio_types.h +46 −0
include/uapi/linux/Kbuild+2−0
@@ -424,10 +424,12 @@ header-y += virtio_blk.h · 423 unmodified lines
424424 header-y += virtio_config.h
425425 header-y += virtio_console.h
426426 header-y += virtio_ids.h
427+header-y += virtio_types.h
427428 header-y += virtio_net.h
428429 header-y += virtio_pci.h
429430 header-y += virtio_ring.h
430431 header-y += virtio_rng.h
432+header-y += virtio_scsi.h
431433 header-y += vm_sockets.h
432434 header-y += vt.h
433435 header-y += wait.h
include/uapi/linux/if_tun.h+4−13
@@ -22,21 +22,11 @@ · 21 unmodified lines
2222
2323 /* Read queue size */
2424 #define TUN_READQ_SIZE 500
25−
26−/* TUN device flags */
27−#define TUN_TUN_DEV 0x0001
28−#define TUN_TAP_DEV 0x0002
25+/* TUN device type flags: deprecated. Use IFF_TUN/IFF_TAP instead. */
26+#define TUN_TUN_DEV IFF_TUN
27+#define TUN_TAP_DEV IFF_TAP
2928 #define TUN_TYPE_MASK 0x000f
3029
31−#define TUN_FASYNC 0x0010
32−#define TUN_NOCHECKSUM 0x0020
33−#define TUN_NO_PI 0x0040
34−/* This flag has no real effect */
35−#define TUN_ONE_QUEUE 0x0080
36−#define TUN_PERSIST 0x0100
37−#define TUN_VNET_HDR 0x0200
38−#define TUN_TAP_MQ 0x0400
39−
4030 /* Ioctl defines */
4131 #define TUNSETNOCSUM _IOW('T', 200, int)
4232 #define TUNSETDEBUG _IOW('T', 201, int)
@@ -67,6 +57,7 @@ · 24 unmodified lines
6757 #define IFF_ONE_QUEUE 0x2000
6858 #define IFF_VNET_HDR 0x4000
6959 #define IFF_TUN_EXCL 0x8000
60+#define IFF_VNET_LE 0x10000
7061 #define IFF_MULTI_QUEUE 0x0100
7162 #define IFF_ATTACH_QUEUE 0x0200
7263 #define IFF_DETACH_QUEUE 0x0400
include/uapi/linux/virtio_blk.h+8−7
@@ -28,6 +28,7 @@ · 27 unmodified lines
2828 #include <linux/types.h>
2929 #include <linux/virtio_ids.h>
3030 #include <linux/virtio_config.h>
31+#include <linux/virtio_types.h>
3132
3233 /* Feature bits */
3334 #define VIRTIO_BLK_F_BARRIER 0 /* Does host support barriers? */
@@ -114,18 +115,18 @@ struct virtio_blk_config { · 80 unmodified lines
114115 /* This is the first element of the read scatter-gather list. */
115116 struct virtio_blk_outhdr {
116117 /* VIRTIO_BLK_T* */
117− __u32 type;
118+ __virtio32 type;
118119 /* io priority. */
119− __u32 ioprio;
120+ __virtio32 ioprio;
120121 /* Sector (ie. 512 byte offset) */
121− __u64 sector;
122+ __virtio64 sector;
122123 };
123124
124125 struct virtio_scsi_inhdr {
125− __u32 errors;
126− __u32 data_len;
127− __u32 sense_len;
128− __u32 residual;
126+ __virtio32 errors;
127+ __virtio32 data_len;
128+ __virtio32 sense_len;
129+ __virtio32 residual;
129130 };
130131
131132 /* And this is the final byte of the write scatter-gather list. */
include/uapi/linux/virtio_config.h+7−2
@@ -38,14 +38,16 @@ · 37 unmodified lines
3838 #define VIRTIO_CONFIG_S_DRIVER 2
3939 /* Driver has used its parts of the config, and is happy */
4040 #define VIRTIO_CONFIG_S_DRIVER_OK 4
41+/* Driver has finished configuring features */
42+#define VIRTIO_CONFIG_S_FEATURES_OK 8
4143 /* We've given up on this device. */
4244 #define VIRTIO_CONFIG_S_FAILED 0x80
4345
44−/* Some virtio feature bits (currently bits 28 through 31) are reserved for the
46+/* Some virtio feature bits (currently bits 28 through 32) are reserved for the
4547 * transport being used (eg. virtio_ring), the rest are per-device feature
4648 * bits. */
4749 #define VIRTIO_TRANSPORT_F_START 28
48−#define VIRTIO_TRANSPORT_F_END 32
50+#define VIRTIO_TRANSPORT_F_END 33
4951
5052 /* Do we get callbacks when the ring is completely used, even if we've
5153 * suppressed them? */
@@ -54,4 +56,7 @@ · 2 unmodified lines
5456 /* Can the device handle any descriptor layout? */
5557 #define VIRTIO_F_ANY_LAYOUT 27
5658
59+/* v1.0 compliant. */
60+#define VIRTIO_F_VERSION_1 32
61+
5762 #endif /* _UAPI_LINUX_VIRTIO_CONFIG_H */
include/uapi/linux/virtio_console.h+4−3
@@ -32,6 +32,7 @@ · 31 unmodified lines
3232 #ifndef _UAPI_LINUX_VIRTIO_CONSOLE_H
3333 #define _UAPI_LINUX_VIRTIO_CONSOLE_H
3434 #include <linux/types.h>
35+#include <linux/virtio_types.h>
3536 #include <linux/virtio_ids.h>
3637 #include <linux/virtio_config.h>
3738
@@ -58,9 +59,9 @@ struct virtio_console_config { · 20 unmodified lines
5859 * particular port.
5960 */
6061 struct virtio_console_control {
61− __u32 id; /* Port number */
62− __u16 event; /* The kind of control event (see below) */
63− __u16 value; /* Extra information for the key */
62+ __virtio32 id; /* Port number */
63+ __virtio16 event; /* The kind of control event (see below) */
64+ __virtio16 value; /* Extra information for the key */
6465 };
6566
6667 /* Some events for control messages */
include/uapi/linux/virtio_net.h+8−7
@@ -28,6 +28,7 @@ · 27 unmodified lines
2828 #include <linux/types.h>
2929 #include <linux/virtio_ids.h>
3030 #include <linux/virtio_config.h>
31+#include <linux/virtio_types.h>
3132 #include <linux/if_ether.h>
3233
3334 /* The feature bitmap for virtio net */
@@ -84,17 +85,17 @@ struct virtio_net_hdr { · 50 unmodified lines
8485 #define VIRTIO_NET_HDR_GSO_TCPV6 4 // GSO frame, IPv6 TCP
8586 #define VIRTIO_NET_HDR_GSO_ECN 0x80 // TCP has ECN set
8687 __u8 gso_type;
87− __u16 hdr_len; /* Ethernet + IP + tcp/udp hdrs */
88− __u16 gso_size; /* Bytes to append to hdr_len per frame */
89− __u16 csum_start; /* Position to start checksumming from */
90− __u16 csum_offset; /* Offset after that to place checksum */
88+ __virtio16 hdr_len; /* Ethernet + IP + tcp/udp hdrs */
89+ __virtio16 gso_size; /* Bytes to append to hdr_len per frame */
90+ __virtio16 csum_start; /* Position to start checksumming from */
91+ __virtio16 csum_offset; /* Offset after that to place checksum */
9192 };
9293
9394 /* This is the version of the header to use when the MRG_RXBUF
9495 * feature has been negotiated. */
9596 struct virtio_net_hdr_mrg_rxbuf {
9697 struct virtio_net_hdr hdr;
97− __u16 num_buffers; /* Number of merged rx buffers */
98+ __virtio16 num_buffers; /* Number of merged rx buffers */
9899 };
99100
100101 /*
@@ -149,7 +150,7 @@ typedef __u8 virtio_net_ctrl_ack; · 48 unmodified lines
149150 * VIRTIO_NET_F_CTRL_MAC_ADDR feature is available.
150151 */
151152 struct virtio_net_ctrl_mac {
152− __u32 entries;
153+ __virtio32 entries;
153154 __u8 macs[][ETH_ALEN];
154155 } __attribute__((packed));
155156
@@ -193,7 +194,7 @@ struct virtio_net_ctrl_mac { · 37 unmodified lines
193194 * specified.
194195 */
195196 struct virtio_net_ctrl_mq {
196− __u16 virtqueue_pairs;
197+ __virtio16 virtqueue_pairs;
197198 };
198199
199200 #define VIRTIO_NET_CTRL_MQ 4
include/uapi/linux/virtio_ring.h+23−22
@@ -32,6 +32,7 @@ · 31 unmodified lines
3232 *
3333 * Copyright Rusty Russell IBM Corporation 2007. */
3434 #include <linux/types.h>
35+#include <linux/virtio_types.h>
3536
3637 /* This marks a buffer as continuing via the next field. */
3738 #define VRING_DESC_F_NEXT 1
@@ -61,32 +62,32 @@ · 23 unmodified lines
6162 /* Virtio ring descriptors: 16 bytes. These can chain together via "next". */
6263 struct vring_desc {
6364 /* Address (guest-physical). */
64− __u64 addr;
65+ __virtio64 addr;
6566 /* Length. */
66− __u32 len;
67+ __virtio32 len;
6768 /* The flags as indicated above. */
68− __u16 flags;
69+ __virtio16 flags;
6970 /* We chain unused descriptors via this, too */
70− __u16 next;
71+ __virtio16 next;
7172 };
7273
7374 struct vring_avail {
74− __u16 flags;
75− __u16 idx;
76− __u16 ring[];
75+ __virtio16 flags;
76+ __virtio16 idx;
77+ __virtio16 ring[];
7778 };
7879
7980 /* u32 is used here for ids for padding reasons. */
8081 struct vring_used_elem {
8182 /* Index of start of used descriptor chain. */
82− __u32 id;
83+ __virtio32 id;
8384 /* Total length of the descriptor chain which was used (written to) */
84− __u32 len;
85+ __virtio32 len;
8586 };
8687
8788 struct vring_used {
88− __u16 flags;
89− __u16 idx;
89+ __virtio16 flags;
90+ __virtio16 idx;
9091 struct vring_used_elem ring[];
9192 };
9293
@@ -109,25 +110,25 @@ struct vring { · 16 unmodified lines
109110 * struct vring_desc desc[num];
110111 *
111112 * // A ring of available descriptor heads with free-running index.
112− * __u16 avail_flags;
113− * __u16 avail_idx;
114− * __u16 available[num];
115− * __u16 used_event_idx;
113+ * __virtio16 avail_flags;
114+ * __virtio16 avail_idx;
115+ * __virtio16 available[num];
116+ * __virtio16 used_event_idx;
116117 *
117118 * // Padding to the next align boundary.
118119 * char pad[];
119120 *
120121 * // A ring of used descriptor heads with free-running index.
121− * __u16 used_flags;
122− * __u16 used_idx;
122+ * __virtio16 used_flags;
123+ * __virtio16 used_idx;
123124 * struct vring_used_elem used[num];
124− * __u16 avail_event_idx;
125+ * __virtio16 avail_event_idx;
125126 * };
126127 */
127128 /* We publish the used event index at the end of the available ring, and vice
128129 * versa. They are at the end for backwards compatibility. */
129130 #define vring_used_event(vr) ((vr)->avail->ring[(vr)->num])
130−#define vring_avail_event(vr) (*(__u16 *)&(vr)->used->ring[(vr)->num])
131+#define vring_avail_event(vr) (*(__virtio16 *)&(vr)->used->ring[(vr)->num])
131132
132133 static inline void vring_init(struct vring *vr, unsigned int num, void *p,
133134 unsigned long align)
@@ -135,15 +136,15 @@ static inline void vring_init(struct vring *vr, unsigned int num, void *p, · 1 unmodified line
135136 vr->num = num;
136137 vr->desc = p;
137138 vr->avail = p + num*sizeof(struct vring_desc);
138− vr->used = (void *)(((unsigned long)&vr->avail->ring[num] + sizeof(__u16)
139+ vr->used = (void *)(((unsigned long)&vr->avail->ring[num] + sizeof(__virtio16)
139140 + align-1) & ~(align - 1));
140141 }
141142
142143 static inline unsigned vring_size(unsigned int num, unsigned long align)
143144 {
144− return ((sizeof(struct vring_desc) * num + sizeof(__u16) * (3 + num)
145+ return ((sizeof(struct vring_desc) * num + sizeof(__virtio16) * (3 + num)
145146 + align - 1) & ~(align - 1))
146− + sizeof(__u16) * 3 + sizeof(struct vring_used_elem) * num;
147+ + sizeof(__virtio16) * 3 + sizeof(struct vring_used_elem) * num;
147148 }
148149
149150 /* The following is used with USED_EVENT_IDX and AVAIL_EVENT_IDX */
include/uapi/linux/virtio_scsi.h+164−0
@@ -0,0 +1,164 @@
1+/*
2+ * This header is BSD licensed so anyone can use the definitions to implement
3+ * compatible drivers/servers.
4+ *
5+ * Redistribution and use in source and binary forms, with or without
6+ * modification, are permitted provided that the following conditions
7+ * are met:
8+ * 1. Redistributions of source code must retain the above copyright
9+ * notice, this list of conditions and the following disclaimer.
10+ * 2. Redistributions in binary form must reproduce the above copyright
11+ * notice, this list of conditions and the following disclaimer in the
12+ * documentation and/or other materials provided with the distribution.
13+ *
14+ * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17+ * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
18+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24+ * SUCH DAMAGE.
25+ */
26+
27+#ifndef _LINUX_VIRTIO_SCSI_H
28+#define _LINUX_VIRTIO_SCSI_H
29+
30+#include <linux/virtio_types.h>
31+
32+#define VIRTIO_SCSI_CDB_SIZE 32
33+#define VIRTIO_SCSI_SENSE_SIZE 96
34+
35+/* SCSI command request, followed by data-out */
36+struct virtio_scsi_cmd_req {
37+ __u8 lun[8]; /* Logical Unit Number */
38+ __virtio64 tag; /* Command identifier */
39+ __u8 task_attr; /* Task attribute */
40+ __u8 prio; /* SAM command priority field */
41+ __u8 crn;
42+ __u8 cdb[VIRTIO_SCSI_CDB_SIZE];
43+} __attribute__((packed));
44+
45+/* SCSI command request, followed by protection information */
46+struct virtio_scsi_cmd_req_pi {
47+ __u8 lun[8]; /* Logical Unit Number */
48+ __virtio64 tag; /* Command identifier */
49+ __u8 task_attr; /* Task attribute */
50+ __u8 prio; /* SAM command priority field */
51+ __u8 crn;
52+ __virtio32 pi_bytesout; /* DataOUT PI Number of bytes */
53+ __virtio32 pi_bytesin; /* DataIN PI Number of bytes */
54+ __u8 cdb[VIRTIO_SCSI_CDB_SIZE];
55+} __attribute__((packed));
56+
57+/* Response, followed by sense data and data-in */
58+struct virtio_scsi_cmd_resp {
59+ __virtio32 sense_len; /* Sense data length */
60+ __virtio32 resid; /* Residual bytes in data buffer */
61+ __virtio16 status_qualifier; /* Status qualifier */
62+ __u8 status; /* Command completion status */
63+ __u8 response; /* Response values */
64+ __u8 sense[VIRTIO_SCSI_SENSE_SIZE];
65+} __attribute__((packed));
66+
67+/* Task Management Request */
68+struct virtio_scsi_ctrl_tmf_req {
69+ __virtio32 type;
70+ __virtio32 subtype;
71+ __u8 lun[8];
72+ __virtio64 tag;
73+} __attribute__((packed));
74+
75+struct virtio_scsi_ctrl_tmf_resp {
76+ __u8 response;
77+} __attribute__((packed));
78+
79+/* Asynchronous notification query/subscription */
80+struct virtio_scsi_ctrl_an_req {
81+ __virtio32 type;
82+ __u8 lun[8];
83+ __virtio32 event_requested;
84+} __attribute__((packed));
85+
86+struct virtio_scsi_ctrl_an_resp {
87+ __virtio32 event_actual;
88+ __u8 response;
89+} __attribute__((packed));
90+
91+struct virtio_scsi_event {
92+ __virtio32 event;
93+ __u8 lun[8];
94+ __virtio32 reason;
95+} __attribute__((packed));
96+
97+struct virtio_scsi_config {
98+ __u32 num_queues;
99+ __u32 seg_max;
100+ __u32 max_sectors;
101+ __u32 cmd_per_lun;
102+ __u32 event_info_size;
103+ __u32 sense_size;
104+ __u32 cdb_size;
105+ __u16 max_channel;
106+ __u16 max_target;
107+ __u32 max_lun;
108+} __attribute__((packed));
109+
110+/* Feature Bits */
111+#define VIRTIO_SCSI_F_INOUT 0
112+#define VIRTIO_SCSI_F_HOTPLUG 1
113+#define VIRTIO_SCSI_F_CHANGE 2
114+#define VIRTIO_SCSI_F_T10_PI 3
115+
116+/* Response codes */
117+#define VIRTIO_SCSI_S_OK 0
118+#define VIRTIO_SCSI_S_OVERRUN 1
119+#define VIRTIO_SCSI_S_ABORTED 2
120+#define VIRTIO_SCSI_S_BAD_TARGET 3
121+#define VIRTIO_SCSI_S_RESET 4
122+#define VIRTIO_SCSI_S_BUSY 5
123+#define VIRTIO_SCSI_S_TRANSPORT_FAILURE 6
124+#define VIRTIO_SCSI_S_TARGET_FAILURE 7
125+#define VIRTIO_SCSI_S_NEXUS_FAILURE 8
126+#define VIRTIO_SCSI_S_FAILURE 9
127+#define VIRTIO_SCSI_S_FUNCTION_SUCCEEDED 10
128+#define VIRTIO_SCSI_S_FUNCTION_REJECTED 11
129+#define VIRTIO_SCSI_S_INCORRECT_LUN 12
130+
131+/* Controlq type codes. */
132+#define VIRTIO_SCSI_T_TMF 0
133+#define VIRTIO_SCSI_T_AN_QUERY 1
134+#define VIRTIO_SCSI_T_AN_SUBSCRIBE 2
135+
136+/* Valid TMF subtypes. */
137+#define VIRTIO_SCSI_T_TMF_ABORT_TASK 0
138+#define VIRTIO_SCSI_T_TMF_ABORT_TASK_SET 1
139+#define VIRTIO_SCSI_T_TMF_CLEAR_ACA 2
140+#define VIRTIO_SCSI_T_TMF_CLEAR_TASK_SET 3
141+#define VIRTIO_SCSI_T_TMF_I_T_NEXUS_RESET 4
142+#define VIRTIO_SCSI_T_TMF_LOGICAL_UNIT_RESET 5
143+#define VIRTIO_SCSI_T_TMF_QUERY_TASK 6
144+#define VIRTIO_SCSI_T_TMF_QUERY_TASK_SET 7
145+
146+/* Events. */
147+#define VIRTIO_SCSI_T_EVENTS_MISSED 0x80000000
148+#define VIRTIO_SCSI_T_NO_EVENT 0
149+#define VIRTIO_SCSI_T_TRANSPORT_RESET 1
150+#define VIRTIO_SCSI_T_ASYNC_NOTIFY 2
151+#define VIRTIO_SCSI_T_PARAM_CHANGE 3
152+
153+/* Reasons of transport reset event */
154+#define VIRTIO_SCSI_EVT_RESET_HARD 0
155+#define VIRTIO_SCSI_EVT_RESET_RESCAN 1
156+#define VIRTIO_SCSI_EVT_RESET_REMOVED 2
157+
158+#define VIRTIO_SCSI_S_SIMPLE 0
159+#define VIRTIO_SCSI_S_ORDERED 1
160+#define VIRTIO_SCSI_S_HEAD 2
161+#define VIRTIO_SCSI_S_ACA 3
162+
163+
164+#endif /* _LINUX_VIRTIO_SCSI_H */
include/uapi/linux/virtio_types.h+46−0
@@ -0,0 +1,46 @@
1+#ifndef _UAPI_LINUX_VIRTIO_TYPES_H
2+#define _UAPI_LINUX_VIRTIO_TYPES_H
3+/* Type definitions for virtio implementations.
4+ *
5+ * This header is BSD licensed so anyone can use the definitions to implement
6+ * compatible drivers/servers.
7+ *
8+ * Redistribution and use in source and binary forms, with or without
9+ * modification, are permitted provided that the following conditions
10+ * are met:
11+ * 1. Redistributions of source code must retain the above copyright
12+ * notice, this list of conditions and the following disclaimer.
13+ * 2. Redistributions in binary form must reproduce the above copyright
14+ * notice, this list of conditions and the following disclaimer in the
15+ * documentation and/or other materials provided with the distribution.
16+ * 3. Neither the name of IBM nor the names of its contributors
17+ * may be used to endorse or promote products derived from this software
18+ * without specific prior written permission.
19+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND
20+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22+ * ARE DISCLAIMED. IN NO EVENT SHALL IBM OR CONTRIBUTORS BE LIABLE
23+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29+ * SUCH DAMAGE.
30+ *
31+ * Copyright (C) 2014 Red Hat, Inc.
32+ * Author: Michael S. Tsirkin <mst@redhat.com>
33+ */
34+#include <linux/types.h>
35+
36+/*
37+ * __virtio{16,32,64} have the following meaning:
38+ * - __u{16,32,64} for virtio devices in legacy mode, accessed in native endian
39+ * - __le{16,32,64} for standard-compliant virtio devices
40+ */
41+
42+typedef __u16 __bitwise__ __virtio16;
43+typedef __u32 __bitwise__ __virtio32;
44+typedef __u64 __bitwise__ __virtio64;
45+
46+#endif /* _UAPI_LINUX_VIRTIO_TYPES_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t