Skip to content

Commit b530cc7

Browse files
committed
9p: add virtio transport
This adds a transport to 9p for communicating between guests and a host using a virtio based transport. Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
1 parent 0b776eb commit b530cc7

File tree

5 files changed

+379
-3
lines changed

5 files changed

+379
-3
lines changed

Documentation/filesystems/9p.txt

+5-3
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@ OPTIONS
4242

4343
trans=name select an alternative transport. Valid options are
4444
currently:
45-
unix - specifying a named pipe mount point
46-
tcp - specifying a normal TCP/IP connection
47-
fd - used passed file descriptors for connection
45+
unix - specifying a named pipe mount point
46+
tcp - specifying a normal TCP/IP connection
47+
fd - used passed file descriptors for connection
4848
(see rfdno and wfdno)
49+
virtio - connect to the next virtio channel available
50+
(from lguest or KVM with trans_virtio module)
4951

5052
uname=name user name to attempt mount as on the remote server. The
5153
server may override or ignore this value. Certain user

include/linux/virtio_9p.h

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#ifndef _LINUX_VIRTIO_9P_H
2+
#define _LINUX_VIRTIO_9P_H
3+
#include <linux/virtio_config.h>
4+
5+
/* The ID for virtio console */
6+
#define VIRTIO_ID_9P 9
7+
/* Maximum number of virtio channels per partition (1 for now) */
8+
#define MAX_9P_CHAN 1
9+
10+
#endif /* _LINUX_VIRTIO_9P_H */

net/9p/Kconfig

+7
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ config NET_9P_FD
2323
file descriptors. TCP/IP is the default transport for 9p,
2424
so if you are going to use 9p, you'll likely want this.
2525

26+
config NET_9P_VIRTIO
27+
depends on NET_9P && EXPERIMENTAL && VIRTIO
28+
tristate "9P Virtio Transport (Experimental)"
29+
help
30+
This builds support for a transports between
31+
guest partitions and a host partition.
32+
2633
config NET_9P_DEBUG
2734
bool "Debug information"
2835
depends on NET_9P

net/9p/Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
obj-$(CONFIG_NET_9P) := 9pnet.o
22
obj-$(CONFIG_NET_9P_FD) += 9pnet_fd.o
3+
obj-$(CONFIG_NET_9P_VIRTIO) += 9pnet_virtio.o
34

45
9pnet-objs := \
56
mod.o \
@@ -12,3 +13,6 @@ obj-$(CONFIG_NET_9P_FD) += 9pnet_fd.o
1213

1314
9pnet_fd-objs := \
1415
trans_fd.o \
16+
17+
9pnet_virtio-objs := \
18+
trans_virtio.o \

0 commit comments

Comments
 (0)