]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kvm tools: Add virtio-9p
authorSasha Levin <levinsasha928@gmail.com>
Fri, 20 May 2011 08:37:09 +0000 (11:37 +0300)
committerPekka Enberg <penberg@kernel.org>
Fri, 20 May 2011 13:24:52 +0000 (16:24 +0300)
commitcf3d9915319dfb23a4f8c9abbb4412cf2ae9e721
tree21e6c9e151dbc03102622104458197cffb201a87
parentdd68c0124cdfb6592c974e49bca2777f459d39b8
kvm tools: Add virtio-9p

Overview:
9p allows for simple RPC based resource sharing over
different transports (in our case, virtio).

This is the implementation of (most of) the original
9p2000 protocol, without the .u or the .l extensions.

How to use:
1. Make sure kernel is compiled with:
    CONFIG_NET_9P=y
    CONFIG_NET_9P_VIRTIO=y
    CONFIG_NET_9P_DEBUG=y (At least until code is stable)
    CONFIG_9P_FS=y

2. Start KVM with '--virtio-9p <dirname>'. What happens now is that
a virtio transport with the name 'kvm_9p' is created. The server side
of the transport maps dirname to the root of the file system.

3. Within the guest, mount the fs:
mount -t 9p -otrans=virtio kvm_9p <local_dir> -oversion=9p2000
This will mount the 9p server to local_dir.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/Makefile
tools/kvm/include/kvm/ioport.h
tools/kvm/include/kvm/virtio-9p.h [new file with mode: 0644]
tools/kvm/include/kvm/virtio-pci-dev.h
tools/kvm/kvm-run.c
tools/kvm/virtio/9p.c [new file with mode: 0644]