Skip to contentSkip to conversation

docs/tcg-plugins: document QEMU_PLUGIN behaviour

PATCH Applied Christoph Muellner 2 participants 2 messages Mar 16, 2022

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 docs/tcg-plugins: document QEMU_PLUGIN behaviour

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.

---
 docs/devel/tcg-plugins.rst | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
docs/devel/tcg-plugins.rst +7 -2
index f93ef4fe52..bf66c12885 100644
@@ -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/plugin/libhowec.so,inline=on,count=hint" $QEMU
+
 Writing plugins
 ---------------
 
Signature · 1 line
2.35.1
Applied
#1 lore raw
Quoted 8 lines · Christoph Muellner

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.

Queued to for-7.0/misc-bits, thanks.

There where some minor typos but I've fixed them.

Quoted 28 lines
---
 docs/devel/tcg-plugins.rst | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
docs/devel/tcg-plugins.rst +7 -2
index f93ef4fe52..bf66c12885 100644
@@ -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/plugin/libhowec.so,inline=on,count=hint" $QEMU
+
 Writing plugins
 ---------------
Signature · 1 line
Alex Bennée