[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 19/19] docs: add a man page for vhost-user-rpmb
From: |
Alex Bennée |
Subject: |
[RFC PATCH 19/19] docs: add a man page for vhost-user-rpmb |
Date: |
Fri, 25 Sep 2020 13:51:47 +0100 |
Basic usage and example invocation.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
docs/tools/index.rst | 1 +
docs/tools/vhost-user-rpmb.rst | 102 +++++++++++++++++++++++++++++++++
2 files changed, 103 insertions(+)
create mode 100644 docs/tools/vhost-user-rpmb.rst
diff --git a/docs/tools/index.rst b/docs/tools/index.rst
index 232ce9f3e463..488784b3bf1f 100644
--- a/docs/tools/index.rst
+++ b/docs/tools/index.rst
@@ -15,3 +15,4 @@ Contents:
qemu-trace-stap
virtfs-proxy-helper
virtiofsd
+ vhost-user-rpmb
diff --git a/docs/tools/vhost-user-rpmb.rst b/docs/tools/vhost-user-rpmb.rst
new file mode 100644
index 000000000000..40d5d3bceb7c
--- /dev/null
+++ b/docs/tools/vhost-user-rpmb.rst
@@ -0,0 +1,102 @@
+QEMU vhost-user-rpmb - rpmb emulation backend
+=============================================
+
+Synopsis
+--------
+
+**vhost-user-rpmb** [*OPTIONS*]
+
+Description
+-----------
+
+This program is a vhost-user backed that emulates a VirtIO Replay
+Protected Memory Block device. These are usually special partitions
+that are part of a flash device that offer protection against reply
+attacks. They are used to store secure information in a way that is
+hard to tamper with.
+
+This program is designed to work with QEMU's ``--device
+vhost-user-rpmb-pci`` but should work with any virtual machine
+monitor (VMM) that supports vhost-user. See the Examples section
+below.
+
+This program requires a backing store to persist any data programmed
+into the device. The spec supports devices up 32Mb in size. For the
+daemon this is simply a raw file of the appropriate size. To program
+the device it needs to have a key. This can either be programmed by
+the guest at the start or come from a key file supplied to the daemon.
+
+Options
+-------
+
+.. program:: vhost-user-rpmb
+
+.. option:: -h, --help
+
+ Print help.
+
+.. option:: -V, --version
+
+ Print version.
+
+.. option:: -v, --verbose
+
+ Increase verbosity of output
+
+.. option:: --debug
+
+ Enable debug output.
+
+.. option:: --socket-path=PATH
+
+ Listen on vhost-user UNIX domain socket at PATH. Incompatible with --fd.
+
+.. option:: --fd=FDNUM
+
+ Accept connections from vhost-user UNIX domain socket file descriptor FDNUM.
+ The file descriptor must already be listening for connections.
+ Incompatible with --socket-path.
+
+.. option:: --flash-path=PATH
+
+ Path to the backing store for the flash image, can be up to 32Mb in size.
+
+.. option:: --key-path=PATH
+
+ Path to the backing store for the key of 32 bytes.
+
+.. option:: --key-set
+
+ Treat the value of key-path as set meaning the key cannot be
+ reprogrammed by the guest.
+
+.. option:: --initial-counter=N
+
+ Set the initial value of the devices write count. It is
+ incremented by each write operation.
+
+Examples
+--------
+
+The daemon should be started first:
+
+::
+
+ host# vhost-user-rpmb --socket-path=vrpmb.sock \
+ --flash-path=flash.img \
+ --key-path=key --key-set \
+ --initial-counter=1234
+
+The QEMU invocation needs to create a chardev socket the device can
+use to communicate as well as share the guests memory over a memfd.
+
+::
+
+ host# qemu-system \
+ -chardev socket,path=vrpmb.sock,id=vrpmb \
+ -device vhost-user-rpmb-pci,chardev=vrpmb,id=rpmb \
+ -m 4096 \
+ -object memory-backend-file,id=mem,size=4G,mem-path=/dev/shm,share=on \
+ -numa node,memdev=mem \
+ ...
+
--
2.20.1
- [RFC PATCH 08/19] tools/vhost-user-rpmb: connect to fd and instantiate basic run loop, (continued)
- [RFC PATCH 08/19] tools/vhost-user-rpmb: connect to fd and instantiate basic run loop, Alex Bennée, 2020/09/25
- [RFC PATCH 09/19] tools/vhost-user-rpmb: add a --verbose/debug flags for logging, Alex Bennée, 2020/09/25
- [RFC PATCH 11/19] tools/vhost-user-rpmb: add --flash-path for backing store, Alex Bennée, 2020/09/25
- [RFC PATCH 12/19] tools/vhost-user-rpmb: import hmac_sha256 functions, Alex Bennée, 2020/09/25
- [RFC PATCH 10/19] tools/vhost-user-rpmb: handle shutdown and SIGINT/SIGHUP cleanly, Alex Bennée, 2020/09/25
- [RFC PATCH 17/19] tools/vhost-user-rpmb: add key persistence, Alex Bennée, 2020/09/25
- [RFC PATCH 15/19] tools/vhost-user-rpmb: implement VIRTIO_RPMB_REQ_DATA_WRITE, Alex Bennée, 2020/09/25
- [RFC PATCH 16/19] tools/vhost-user-rpmb: implement VIRTIO_RPMB_REQ_DATA_READ, Alex Bennée, 2020/09/25
- [RFC PATCH 18/19] tools/vhost-user-rpmb: allow setting of the write_count, Alex Bennée, 2020/09/25
- [RFC PATCH 13/19] tools/vhost-user-rpmb: implement the PROGRAM_KEY handshake, Alex Bennée, 2020/09/25
- [RFC PATCH 19/19] docs: add a man page for vhost-user-rpmb,
Alex Bennée <=
- [RFC PATCH 14/19] tools/vhost-user-rpmb: implement VIRTIO_RPMB_REQ_GET_WRITE_COUNTER, Alex Bennée, 2020/09/25
- Re: [RFC PATCH 00/19] vhost-user-rpmb (Replay Protected Memory Block), no-reply, 2020/09/25