devices: fs: Implement virtio-fs server

Add a `Server` type that links the FUSE protocol with the virtio
transport.  It parses messages sent on the virtio queue and then calls
the appropriate method of the `Filesystem` trait.

BUG=b:136128319
TEST=`tast run vm.VirtioFs`

Change-Id: I7d6fb521f6c620efe1bdb4fa0fa8fb8c42a82f45
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1757242
Auto-Submit: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
Commit-Queue: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: Chirantan Ekbote <chirantan@chromium.org>
This commit is contained in:
Chirantan Ekbote 2019-08-16 16:15:13 +09:00 committed by Commit Bot
parent a24f033593
commit 0399e18235
3 changed files with 1297 additions and 0 deletions

1
Cargo.lock generated
View file

@ -164,6 +164,7 @@ dependencies = [
"resources 0.1.0",
"sync 0.1.0",
"sys_util 0.1.0",
"syscall_defines 0.1.0",
"tempfile 3.0.7",
"tpm2 0.1.0",
"usb_util 0.1.0",

View file

@ -34,6 +34,7 @@ remain = "*"
resources = { path = "../resources" }
sync = { path = "../sync" }
sys_util = { path = "../sys_util" }
syscall_defines = { path = "../syscall_defines" }
tpm2 = { path = "../tpm2", optional = true }
usb_util = { path = "../usb_util" }
vfio_sys = { path = "../vfio_sys" }

File diff suppressed because it is too large Load diff