From: Kuan-Wei Chiu <visitorckw@gmail.com>
To: trini@konsulko.com, tuomas.tynkkynen@iki.fi, bmeng.cn@gmail.com,
sjg@chromium.org, jerome.forissier@arm.com
Cc: jserv@ccns.ncku.edu.tw, eleanor15x@gmail.com,
marscheng@google.com, u-boot@lists.u-boot-project.org,
Kuan-Wei Chiu <visitorckw@gmail.com>
Subject: [PATCH v3 4/6] doc: 9p: Add 9P filesystem documentation
Date: Wed, 23 Sep 2026 21:30:00 +0000 [thread overview]
Message-ID: <20260923213002.1070404-5-visitorckw@gmail.com> (raw)
In-Reply-To: <20260923213002.1070404-1-visitorckw@gmail.com>
Add documentation for 9P filesystem support, including configuration
options, QEMU configuration, and basic usage examples.
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
---
Changes in v3:
- Use double backticks for literal text in 9p.rst.
---
doc/usage/filesystems/9p.rst | 55 ++++++++++++++++++++++++++++++++++++
doc/usage/index.rst | 1 +
2 files changed, 56 insertions(+)
create mode 100644 doc/usage/filesystems/9p.rst
diff --git a/doc/usage/filesystems/9p.rst b/doc/usage/filesystems/9p.rst
new file mode 100644
index 00000000000..fb4e8bcb9c0
--- /dev/null
+++ b/doc/usage/filesystems/9p.rst
@@ -0,0 +1,55 @@
+.. SPDX-License-Identifier: GPL-2.0+
+.. Copyright (C) 2026, Kuan-Wei Chiu <visitorckw@gmail.com>
+
+9P Filesystem
+=============
+
+The 9P filesystem is a network-based file sharing protocol. It is primarily
+used to share files between a host and a guest over virtio, providing a way
+to load kernels, device trees, and initial ramdisks without needing a disk
+image or networking setup like TFTP.
+
+Configuration
+-------------
+
+To enable the 9P filesystem support, you must enable the following configuration
+options:
+
+* ``CONFIG_FS_9P``: Enables the 9P filesystem layer.
+* ``CONFIG_NET_9P``: Enables the core 9P2000.L client protocol.
+* ``CONFIG_VIRTIO_9P``: Enables the virtio transport driver for 9P.
+
+QEMU Setup
+----------
+
+To use 9P with QEMU, you need to expose a host directory to the guest using
+the ``-fsdev`` and ``-device`` parameters.
+
+For example, to share the host's ``/tmp/shared`` directory with the guest under
+the mount tag ``rootfs``:
+
+.. code-block:: bash
+
+ qemu-system-aarch64 \
+ -machine virt \
+ -nographic \
+ -fsdev local,id=fsdev0,path=/tmp/shared,security_model=none \
+ -device virtio-9p-device,fsdev=fsdev0,mount_tag=rootfs
+
+U-Boot Usage
+------------
+
+Once booted into U-Boot, you must first probe the virtio subsystem. You can then
+access the 9P filesystem using the ``9p`` interface name. You can specify a mount tag
+(such as ``rootfs``), a device index (such as ``0``), or use ``-`` to select the
+default (first) device.
+
+.. code-block:: bash
+
+ => virtio scan
+ => ls 9p rootfs /
+ => ls 9p 0 /
+ => ls 9p - /
+ => load 9p rootfs $kernel_addr_r /Image
+ => load 9p rootfs $ramdisk_addr_r /initramfs.cpio
+ => booti $kernel_addr_r $ramdisk_addr_r:$filesize $fdtcontroladdr
diff --git a/doc/usage/index.rst b/doc/usage/index.rst
index 6f477b842ca..6d7ca6b9aec 100644
--- a/doc/usage/index.rst
+++ b/doc/usage/index.rst
@@ -46,3 +46,4 @@ File Systems
:maxdepth: 1
filesystems/ext4
+ filesystems/9p
--
2.56.0.rc1.310.g51773c2048-goog
next prev parent reply other threads:[~2026-09-23 21:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 21:29 [PATCH v3 0/6] fs: Add 9P filesystem support over virtio Kuan-Wei Chiu
2026-09-23 21:29 ` [PATCH v3 1/6] net: 9p: Add 9P2000.L protocol support Kuan-Wei Chiu
2026-09-23 21:29 ` [PATCH v3 2/6] fs: 9p: Add 9P filesystem support Kuan-Wei Chiu
2026-09-23 21:29 ` [PATCH v3 3/6] virtio: 9p: Add 9P transport driver Kuan-Wei Chiu
2026-09-27 15:40 ` Simon Glass
2026-09-23 21:30 ` Kuan-Wei Chiu [this message]
2026-09-27 15:40 ` [PATCH v3 4/6] doc: 9p: Add 9P filesystem documentation Simon Glass
2026-09-23 21:30 ` [PATCH v3 5/6] test: 9p: Add test for 9P filesystem Kuan-Wei Chiu
2026-09-27 15:40 ` Simon Glass
2026-09-23 21:30 ` [PATCH v3 6/6] MAINTAINERS: Add entry for 9PFS Kuan-Wei Chiu
2026-10-07 18:42 ` [PATCH v3 0/6] fs: Add 9P filesystem support over virtio Tom Rini
2026-10-07 19:59 ` Tom Rini
2026-10-07 20:13 ` Kuan-Wei Chiu
2026-10-07 20:30 ` Kuan-Wei Chiu
2026-10-07 20:31 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260923213002.1070404-5-visitorckw@gmail.com \
--to=visitorckw@gmail.com \
--cc=bmeng.cn@gmail.com \
--cc=eleanor15x@gmail.com \
--cc=jerome.forissier@arm.com \
--cc=jserv@ccns.ncku.edu.tw \
--cc=marscheng@google.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=tuomas.tynkkynen@iki.fi \
--cc=u-boot@lists.u-boot-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox