docs/tcg-plugins: document QEMU_PLUGIN behaviour
authorChristoph Muellner <cmuellner@linux.com>
Wed, 16 Mar 2022 18:14:12 +0000 (19:14 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Wed, 23 Mar 2022 10:38:09 +0000 (10:38 +0000)
QEMU plugins can be loaded via command line arguments or via
the QEMU_PLUGIN environment variable. Currently, only the first method
is documented. Let's document QEMU_PLUGIN.

As drive-by cleanup, this patch fixes the path to the plugins
in the same section of the documentation.

Signed-off-by: Christoph Muellner <cmuellner@linux.com>
Message-Id: <20220316181412.1550044-1-cmuellner@linux.com>
[AJB: fixed some minor typos]
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
docs/devel/tcg-plugins.rst

index f93ef4fe52a4819dee1237e72eb8c12c1d4d9881..a7cc44aa20f8ae273ed19e0e4464956f2286273e 100644 (file)
@@ -27,13 +27,18 @@ Once built a program can be run with multiple plugins loaded each with
 their own arguments::
 
   $QEMU $OTHER_QEMU_ARGS \
-      -plugin tests/plugin/libhowvec.so,inline=on,count=hint \
-      -plugin tests/plugin/libhotblocks.so
+      -plugin contrib/plugin/libhowvec.so,inline=on,count=hint \
+      -plugin contrib/plugin/libhotblocks.so
 
 Arguments are plugin specific and can be used to modify their
 behaviour. In this case the howvec plugin is being asked to use inline
 ops to count and break down the hint instructions by type.
 
+Linux user-mode emulation also evaluates the environment variable
+``QEMU_PLUGIN``::
+
+  QEMU_PLUGIN="file=contrib/plugins/libhowvec.so,inline=on,count=hint" $QEMU
+
 Writing plugins
 ---------------