9p: add virtio transport
Subsystems (3)
PATCH 1/1 9p: add virtio transport
From: Eric Van Hensbergen <[email protected]>
This adds a transport to 9p for communicating between guests and a host using a virtio based transport.
Signed-off-by Eric Van Hensbergen <[email protected]>
--- Documentation/filesystems/9p.txt | 8 +- include/linux/virtio_9p.h | 10 + net/9p/Kconfig | 7 + net/9p/Makefile | 4 + net/9p/trans_virtio.c | 354 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 380 insertions(+), 3 deletions(-) create mode 100644 include/linux/virtio_9p.h create mode 100644 net/9p/trans_virtio.c
Documentation/filesystems/9p.txt +5 -3
@@ -42,10 +42,12 @@ OPTIONS trans=name select an alternative transport. Valid options are currently: - unix - specifying a named pipe mount point - tcp - specifying a normal TCP/IP connection - fd - used passed file descriptors for connection + unix - specifying a named pipe mount point + tcp - specifying a normal TCP/IP connection + fd - used passed file descriptors for connection (see rfdno and wfdno) + virtio - connect to the next virtio channel available + (from lguest or KVM with trans_virtio module) uname=name user name to attempt mount as on the remote server. The server may override or ignore this value. Certain user
include/linux/virtio_9p.h new file +10 -0
@@ -0,0 +1,10 @@ +#ifndef _LINUX_VIRTIO_9P_H +#define _LINUX_VIRTIO_9P_H +#include <linux/virtio_config.h> + +/* The ID for virtio console */ +#define VIRTIO_ID_9P 9 +/* Maximum number of virtio channels per partition (1 for now) */ +#define MAX_9P_CHAN 1 + +#endif /* _LINUX_VIRTIO_9P_H */
net/9p/Kconfig +7 -0
@@ -23,6 +23,13 @@ config NET_9P_FD file descriptors. TCP/IP is the default transport for 9p, so if you are going to use 9p, you'll likely want this. +config NET_9P_VIRTIO + depends on NET_9P && EXPERIMENTAL && VIRTIO + tristate "9P Virtio Transport (Experimental)" + help + This builds support for a transports between + guest partitions and a host partition. + config NET_9P_DEBUG bool "Debug information" depends on NET_9P
net/9p/Makefile +4 -0
@@ -1,5 +1,6 @@ obj-$(CONFIG_NET_9P) := 9pnet.o obj-$(CONFIG_NET_9P_FD) += 9pnet_fd.o +obj-$(CONFIG_NET_9P_VIRTIO) += 9pnet_virtio.o 9pnet-objs := \ mod.o \
@@ -12,3 +13,6 @@ obj-$(CONFIG_NET_9P_FD) += 9pnet_fd.o 9pnet_fd-objs := \ trans_fd.o \ + +9pnet_virtio-objs := \ + trans_virtio.o \
net/9p/trans_virtio.c new file +354 -0
354 lines not on this page · raw message
Signature · 1 line
1.5.0.2.gfbe3d-dirty