docs: Add virtio-fs document in crosvm book

Crosvm book don't have a documentation for how to run and use the virtio-fs.

Add a fs chapter under device, and upload a runnable example.

BUG=b:235067443
TEST=mdbook build docs/book

Change-Id: I8ef1ceb9d4cfc5f9a2e8afa2416d1f3ba69691b4
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4535500
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Takaya Saeki <takayas@chromium.org>
Commit-Queue: Yuan Yao <yuanyaogoog@chromium.org>
diff --git a/docs/book/src/SUMMARY.md b/docs/book/src/SUMMARY.md
index c230781..1762d76 100644
--- a/docs/book/src/SUMMARY.md
+++ b/docs/book/src/SUMMARY.md
@@ -17,6 +17,7 @@
   - [Block](./devices/block.md)
   - [Network](./devices/net.md)
   - [Balloon](./devices/balloon.md)
+  - [Fs](./devices/fs.md)
   - [Vsock](./devices/vsock.md)
   - [Pmem](./devices/pmem.md)
   - [Wayland](./devices/wayland.md)
diff --git a/docs/book/src/devices/fs.md b/docs/book/src/devices/fs.md
new file mode 100644
index 0000000..fab9d1b
--- /dev/null
+++ b/docs/book/src/devices/fs.md
@@ -0,0 +1,41 @@
+# Fs
+
+Crosvm supports
+[virtio-fs](https://docs.oasis-open.org/virtio/virtio/v1.2/csd01/virtio-v1.2-csd01.html#x1-45800011),
+a shared file system that lets virtual machines access a directory tree on the host. It allows the
+guest to access files on the host machine. This section will explain how to create a shared
+directory. You can also find a runnable sample in `tools/examples/example_fs`.
+
+## Creating a Shared Directory on the Host Machine
+
+Run following commands in host machine, to create a shared directory:
+
+```sh
+mkdir host_shared_dir
+HOST_SHARED_DIR=$(pwd)/host_shared_dir
+crosvm run \
+   --shared-dir "$HOST_SHARED_DIR:my_shared_tag:type=fs" \
+  ... # usual crosvm args
+```
+
+In the `--shared-dir` argument:
+
+- The first field is the directory to be shared (`$HOST_SHARED_DIR` in this example).
+- The second field is the tag that the VM will use to identify the device (`my_shared_tag` in this
+  example).
+- The remaining fields are key-value pairs configuring the shared directory.
+
+To see available options, run `crosvm run --help`.
+
+## Mount the Shared Directory in the Guest OS
+
+Next, switch to the guest OS and run the following commands to set up the shared directory:
+
+```sh
+sudo su
+mkdir /tmp/guest_shared_dir
+mount -t virtiofs my_shared_tag /tmp/guest_shared_dir
+```
+
+You can now add files to the shared directory. Any files you put in the `guest_shared_dir` will
+appear in the `host_shared_dir` on the host machine, and vice versa.
diff --git a/tools/examples/example_fs b/tools/examples/example_fs
new file mode 100755
index 0000000..1544869
--- /dev/null
+++ b/tools/examples/example_fs
@@ -0,0 +1,36 @@
+#!/bin/bash
+# Copyright 2023 The ChromiumOS Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Example VM with a shared directory
+
+set -e
+
+SRC=$(realpath "$(dirname "${BASH_SOURCE[0]}")")
+#If "example_simple" is executed, reuse its image. Otherwise, create one.
+mkdir -p "$SRC/images/simple" && cd "$_"
+mkdir -p "host_shared_dir"
+HOST_SHARED_DIR="$SRC/images/simple/host_shared_dir"
+
+if ! [ -f rootfs ]; then
+    # Build a simple ubuntu image and create a user with no password.
+    virt-builder ubuntu-20.04 \
+        --run-command "useradd -m -g sudo -p '' $USER ; chage -d 0 $USER" \
+        -o ./rootfs
+
+    virt-builder --get-kernel ./rootfs -o .
+fi
+
+# Use crosvm/tools/examples/images/simple/host_shared_dir as mount point
+cargo run -- run \
+    --shared-dir "$HOST_SHARED_DIR:my_shared_tag:type=fs" \
+    --rwdisk ./rootfs \
+    --initrd ./initrd.img-* \
+    -p "root=/dev/vda5 " \
+    ./vmlinuz-*
+
+## In guest OS, run following instructions to set up the shared directory
+## sudo su
+## mkdir /tmp/guest_shared_dir
+## mount -t virtiofs my_shared_tag /tmp/guest_shared_dir