qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: qemu-devel@nongnu.org
Cc: fam@euphon.net, berrange@redhat.com, stefanb@linux.vnet.ibm.com,
	"Alex Bennée" <alex.bennee@linaro.org>,
	richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org,
	stefanha@redhat.com, marcandre.lureau@redhat.com,
	pbonzini@redhat.com, aurelien@aurel32.net
Subject: [PATCH v1 2/2] docs/devel: update tcg-plugins.rst with API versioning details
Date: Tue, 12 Nov 2019 16:40:51 +0000	[thread overview]
Message-ID: <20191112164051.16404-3-alex.bennee@linaro.org> (raw)
In-Reply-To: <20191112164051.16404-1-alex.bennee@linaro.org>

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 docs/devel/tcg-plugins.rst | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst
index b18fb6729e3..8d619fd44ef 100644
--- a/docs/devel/tcg-plugins.rst
+++ b/docs/devel/tcg-plugins.rst
@@ -25,6 +25,22 @@ 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 is 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. 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
 --------------------------
-- 
2.20.1



  parent reply	other threads:[~2019-11-12 16:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-12 16:40 [PATCH v1 0/2] TCG plugin doc updates Alex Bennée
2019-11-12 16:40 ` [PATCH v1 1/2] docs/devel: rename plugins.rst to tcg-plugins.rst Alex Bennée
2019-11-12 17:00   ` Peter Maydell
2019-11-12 16:40 ` Alex Bennée [this message]
2019-11-12 17:03   ` [PATCH v1 2/2] docs/devel: update tcg-plugins.rst with API versioning details Peter Maydell
2019-11-13  7:07 ` [PATCH v1 0/2] TCG plugin doc updates no-reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191112164051.16404-3-alex.bennee@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=aurelien@aurel32.net \
    --cc=berrange@redhat.com \
    --cc=cota@braap.org \
    --cc=f4bug@amsat.org \
    --cc=fam@euphon.net \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=stefanb@linux.vnet.ibm.com \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).