summary refs log tree commit diff stats
path: root/docs/devel
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-11-21 11:27:33 +0000
committerPeter Maydell <peter.maydell@linaro.org>2019-11-21 11:27:33 +0000
commit7b5425318a27d0a41c1008a36c502719255b8f5e (patch)
tree27b039c4cc7f3eb12167f8db6823c830665b877c /docs/devel
parentbf12043acc6458e7b71d19a9f030b31ec22fba12 (diff)
parent22c30b2d20e828edadbd992c1d4c4bfd0f3433ba (diff)
downloadfocaccia-qemu-7b5425318a27d0a41c1008a36c502719255b8f5e.tar.gz
focaccia-qemu-7b5425318a27d0a41c1008a36c502719255b8f5e.zip
Merge remote-tracking branch 'remotes/stsquad/tags/pull-rc3-testing-and-tcg-201119-1' into staging
A few test and doc fixes:

  - tweak DEBUG behaviour for vm-test-build
  - rename and update plug docs for versioning
  - slim down MAIN_SOFTMMU_TARGETS

# gpg: Signature made Wed 20 Nov 2019 10:56:23 GMT
# gpg:                using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44
# gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [full]
# Primary key fingerprint: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44

* remotes/stsquad/tags/pull-rc3-testing-and-tcg-201119-1:
  tests/tcg: modify multiarch tests to work with clang
  .travis.yml: drop 32 bit systems from MAIN_SOFTMMU_TARGETS
  docs/devel: update tcg-plugins.rst with API versioning details
  docs/devel: rename plugins.rst to tcg-plugins.rst
  tests/vm: make --interactive (and therefore DEBUG=1) unconditional

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'docs/devel')
-rw-r--r--docs/devel/index.rst2
-rw-r--r--docs/devel/tcg-plugins.rst (renamed from docs/devel/plugins.rst)27
2 files changed, 22 insertions, 7 deletions
diff --git a/docs/devel/index.rst b/docs/devel/index.rst
index 2ff058bae3..c86a3cdff2 100644
--- a/docs/devel/index.rst
+++ b/docs/devel/index.rst
@@ -22,4 +22,4 @@ Contents:
    decodetree
    secure-coding-practices
    tcg
-   plugins
+   tcg-plugins
diff --git a/docs/devel/plugins.rst b/docs/devel/tcg-plugins.rst
index b18fb6729e..718eef00f2 100644
--- a/docs/devel/plugins.rst
+++ b/docs/devel/tcg-plugins.rst
@@ -25,6 +25,23 @@ process. However the project reserves the right to change or break the
 API should it need to do so. The best way to avoid this is to submit
 your plugin upstream so they can be updated if/when the API changes.
 
+API versioning
+--------------
+
+All plugins need to declare a symbol which exports the plugin API
+version they were built against. This can be done simply by::
+
+  QEMU_PLUGIN_EXPORT int qemu_plugin_version = QEMU_PLUGIN_VERSION;
+
+The core code will refuse to load a plugin that doesn't export a
+`qemu_plugin_version` symbol or if plugin version is outside of QEMU's
+supported range of API versions.
+
+Additionally the `qemu_info_t` structure which is passed to the
+`qemu_plugin_install` method of a plugin will detail the minimum and
+current API versions supported by QEMU. The API version will be
+incremented if new APIs are added. The minimum API version will be
+incremented if existing APIs are changed or removed.
 
 Exposure of QEMU internals
 --------------------------
@@ -40,16 +57,14 @@ instructions and events are opaque to the plugins themselves.
 Usage
 =====
 
-The QEMU binary needs to be compiled for plugin support:
+The QEMU binary needs to be compiled for plugin support::
 
-::
-    configure --enable-plugins
+  configure --enable-plugins
 
 Once built a program can be run with multiple plugins loaded each with
-their own arguments:
+their own arguments::
 
-::
-    $QEMU $OTHER_QEMU_ARGS \
+  $QEMU $OTHER_QEMU_ARGS \
       -plugin tests/plugin/libhowvec.so,arg=inline,arg=hint \
       -plugin tests/plugin/libhotblocks.so