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
42typedef __u16 __bitwise __virtio16;
43typedef __u32 __bitwise __virtio32;
44typedef __u64 __bitwise __virtio64;
45
46#endif /* _UAPI_LINUX_VIRTIO_TYPES_H */
47