docs/tcg-plugins: document QEMU_PLUGIN behaviour
PATCH 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.
--- docs/devel/tcg-plugins.rst | 4 ++++ 1 file changed, 4 insertions(+)
docs/devel/tcg-plugins.rst +4 -0
@@ -34,6 +34,10 @@ 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. +QEMU also evaluates the environment variable ``QEMU_PLUGIN``:: + + QEMU_PLUGIN="file=tests/plugin/libhowec.so,inline=on,count=hint" $QEMU + Writing plugins ---------------
Signature · 1 line
2.35.1
Quoted 19 lines · Christoph Muellner
QEMU plugins can be loaded via command line arguments or via the
QEMU_PLUGINenvironment variable. Currently, only the first method is documented. Let's documentQEMU_PLUGIN.Signed-off-by Christoph Muellner <[email protected]>--- docs/devel/tcg-plugins.rst | 4 ++++ 1 file changed, 4 insertions(+)docs/devel/tcg-plugins.rst +0
-0@@ -34,6 +34,10 @@ Arguments are plugin specific and can be used to modifytheir
behaviour. In this case the howvec plugin is being asked to use inline ops to count and break down the hint instructions by type.
docs/devel/tcg-plugins.rst Arguments are plugin specific and can be used to modify their · line 39
Quoted 3 lines
docs/devel/tcg-plugins.rst +3
-0+QEMU also evaluates the environment variable ``QEMU_PLUGIN``:: + + QEMU_PLUGIN="file=tests/plugin/libhowec.so,inline=on,count=hint" $QEMU
The plugin howvec is in contrib/plugins, so I think giving the correct path would be
better. Note also that there's a typo in "libhowec.so".
If you want, you could also fix the next example that has the same path or leave it
for another patch.
+
Quoted 7 lines
Writing plugins
-----------------
2.35.1
Other than that,
Thanks,
Mahmoud
Quoted 23 lines · Mahmoud Abumandour
Quoted 18 lines · Christoph Muellner
QEMU plugins can be loaded via command line arguments or via the
QEMU_PLUGINenvironment variable. Currently, only the first method is documented. Let's documentQEMU_PLUGIN.Signed-off-by Christoph Muellner <[email protected]>--- docs/devel/tcg-plugins.rst | 4 ++++ 1 file changed, 4 insertions(+)docs/devel/tcg-plugins.rst +0
-0@@ -34,6 +34,10 @@ Arguments are plugin specific and can be used tomodify 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.
Quoted 9 lines
docs/devel/tcg-plugins.rst Arguments are plugin specific and can be used to modify their · line 39
Quoted 4 lines
docs/devel/tcg-plugins.rst +3
-0+QEMU also evaluates the environment variable ``QEMU_PLUGIN``:: + + QEMU_PLUGIN="file=tests/plugin/libhowec.so,inline=on,count=hint" $QEMUThe plugin howvec is in contrib/plugins, so I think giving the correct path would be
better. Note also that there's a typo in "libhowec.so".
Oh yes, I was just copying the contents of the example above but did not notice
that this is also wrong.
I'll respin a v2 which fixes the paths.
Thanks!
Quoted 19 lines
If you want, you could also fix the next example that has the same path or leave it
for another patch.+
Quoted 7 lines
Writing plugins
-----------------
2.35.1Other than that,
Reviewed-by Mahmoud Mandour <[email protected]>Thanks,
Mahmoud
Quoted 14 lines · Christoph Muellner
QEMU plugins can be loaded via command line arguments or via the
QEMU_PLUGINenvironment variable. Currently, only the first method is documented. Let's documentQEMU_PLUGIN.Signed-off-by Christoph Muellner <[email protected]>--- docs/devel/tcg-plugins.rst | 4 ++++ 1 file changed, 4 insertions(+)docs/devel/tcg-plugins.rst +0
-0
docs/devel/tcg-plugins.rst Arguments are plugin specific and can be used to modify their · line 37
Quoted 4 lines
docs/devel/tcg-plugins.rst +1
-0@@ -34,6 +34,10 @@ 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. +QEMU also evaluates the environment variable ``QEMU_PLUGIN``::
You should also make it clear this only works for *-user builds of QEMU. For system emulation you still need to use the CLI interface.
Quoted 5 lines
docs/devel/tcg-plugins.rst +3
-0+ + QEMU_PLUGIN="file=tests/plugin/libhowec.so,inline=on,count=hint" $QEMU + Writing plugins ---------------
Signature · 1 line
Alex Bennée
Quoted 18 lines · Alex Bennée
docs/devel/tcg-plugins.rst Arguments are plugin specific and can be used to
Quoted 14 lines · Christoph Muellner
QEMU plugins can be loaded via command line arguments or via the
QEMU_PLUGINenvironment variable. Currently, only the first method is documented. Let's documentQEMU_PLUGIN.Signed-off-by Christoph Muellner <[email protected]>--- docs/devel/tcg-plugins.rst | 4 ++++ 1 file changed, 4 insertions(+)docs/devel/tcg-plugins.rst +0
-0@@ -34,6 +34,10 @@ Arguments are plugin specific and can be used tomodify their
Quoted 7 lines
docs/devel/tcg-plugins.rst Arguments are plugin specific and can be used to modify their · line 37
Quoted 4 lines
docs/devel/tcg-plugins.rst +1
-0behaviour. In this case the howvec plugin is being asked to use inline ops to count and break down the hint instructions by type. +QEMU also evaluates the environment variable ``QEMU_PLUGIN``::You should also make it clear this only works for *-user builds of QEMU. For system emulation you still need to use the CLI interface.
Looks like this is even more restrictive as I can see support only in linux-user/main.c.
I'll reword this to only be available for Linux user-mode emulation.
Thanks!
Quoted 12 lines
docs/devel/tcg-plugins.rst Arguments are plugin specific and can be used to modify their · line 42
Quoted 7 lines
docs/devel/tcg-plugins.rst +3
-0+ + QEMU_PLUGIN="file=tests/plugin/libhowec.so,inline=on,count=hint" $QEMU + Writing plugins -----------------
Alex Bennée