summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/sys/vio9p.h
blob: 359862e797b901c98827203de35d8f667e6fad23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
 * This file and its contents are supplied under the terms of the
 * Common Development and Distribution License ("CDDL"), version 1.0.
 * You may only use this file in accordance with the terms of version
 * 1.0 of the CDDL.
 *
 * A full copy of the text of the CDDL should have accompanied this
 * source.  A copy of the CDDL is also available via the Internet at
 * http://www.illumos.org/license/CDDL.
 */

/*
 * Copyright 2022 Oxide Computer Company
 */

#ifndef _SYS_VIO9P_H
#define	_SYS_VIO9P_H

/*
 * VIRTIO 9P DRIVER
 */

#ifdef __cplusplus
extern "C" {
#endif

/*
 * If the hypervisor supports mount tags through the VIRTIO_9P_F_MOUNT_TAG
 * feature, they will have at most this many bytes:
 */
#define	VIRTIO_9P_TAGLEN		32

/*
 * ioctl(2) support for 9P channel devices:
 */
#define	VIO9P_IOC_BASE			(('9' << 16) | ('P' << 8))
#define	VIO9P_IOC_MOUNT_TAG		(VIO9P_IOC_BASE | 0x01)

/*
 * Buffer size for the VIO9P_IOC_MOUNT_TAG ioctl, which includes one byte
 * beyond the maximum tag length for NUL termination:
 */
#define	VIO9P_MOUNT_TAG_SIZE		(VIRTIO_9P_TAGLEN + 1)

#ifdef __cplusplus
}
#endif

#endif /* _SYS_VIO9P_H */