summaryrefslogtreecommitdiffstats
path: root/include/qemu/qemu-plugin.h
Commit message (Collapse)AuthorAgeFilesLines
* plugins: Fixes typo in qemu-plugin.hYonggang Luo2021-03-171-2/+2
| | | | | | | | | Getting the comment consistence with the function name Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20201013002806.1447-3-luoyonggang@gmail.com> Message-Id: <20210312172821.31647-15-alex.bennee@linaro.org>
* plugins: expand kernel-doc for memory query and instrumentationAlex Bennée2021-03-171-6/+30
| | | | | Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210312172821.31647-13-alex.bennee@linaro.org>
* plugins: expand kernel-doc for instruction query and instrumentationAlex Bennée2021-03-171-2/+51
| | | | | Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210312172821.31647-12-alex.bennee@linaro.org>
* plugins: expand inline exec kernel-doc documentation.Alex Bennée2021-03-171-1/+11
| | | | | | | | Remove the extraneous @cb parameter and document the non-atomic nature of the INLINE_ADD_U64 operation. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210312172821.31647-11-alex.bennee@linaro.org>
* plugins: add qemu_plugin_id_t to kernel-docAlex Bennée2021-03-171-0/+3
| | | | | Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210312172821.31647-10-alex.bennee@linaro.org>
* plugins: add qemu_plugin_cb_flags to kernel-docAlex Bennée2021-03-171-3/+13
| | | | | | | Also add a note to explain currently they are unused. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210312172821.31647-9-alex.bennee@linaro.org>
* plugins: expand the typedef kernel-docs for translationAlex Bennée2021-03-171-10/+13
| | | | | Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210312172821.31647-8-alex.bennee@linaro.org>
* plugins: expand the callback typedef kernel-docsAlex Bennée2021-03-171-3/+22
| | | | | Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210312172821.31647-7-alex.bennee@linaro.org>
* plugins: cleanup kernel-doc for qemu_plugin_installAlex Bennée2021-03-171-6/+6
| | | | | | | | kernel-doc doesn't like multiple Note sections. Also add an explicit Return. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210312172821.31647-6-alex.bennee@linaro.org>
* plugins: expand kernel-doc for qemu_info_tAlex Bennée2021-03-171-7/+15
| | | | | | | | It seems kernel-doc struggles a bit with typedef structs but with enough encouragement we can get something out of it. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210312172821.31647-5-alex.bennee@linaro.org>
* plugins: Expose physical addresses instead of device offsetsAaron Lindsay2021-03-171-7/+25
| | | | | | | | | | | | This allows plugins to query for full virtual-to-physical address translation for a given `qemu_plugin_hwaddr` and stops exposing the offset within the device itself. As this change breaks the API, QEMU_PLUGIN_VERSION is incremented. Signed-off-by: Aaron Lindsay <aaron@os.amperecomputing.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210309202802.211756-1-aaron@os.amperecomputing.com> Message-Id: <20210312172821.31647-3-alex.bennee@linaro.org>
* plugins: add API to return a name for a IO deviceAlex Bennée2021-02-181-0/+6
| | | | | | | | | | This may well end up being anonymous but it should always be unique. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Clement Deschamps <clement.deschamps@greensocs.com> Reviewed-by: Emilio G. Cota <cota@braap.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210213130325.14781-3-alex.bennee@linaro.org>
* qemu-plugin.h: remove GCC < 4Marc-André Lureau2020-12-151-7/+2Star
| | | | | | | | | | | | Since commit efc6c07 ("configure: Add a test for the minimum compiler version"), QEMU explicitely depends on GCC >= 4.8. (clang >= 3.4 advertizes itself as GCC >= 4.2 compatible) Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20201210134752.780923-5-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* qemu-plugin.h: add missing include <stddef.h> to define size_tEmilio G. Cota2020-06-081-0/+1
| | | | | | | | Signed-off-by: Emilio G. Cota <cota@braap.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200524202427.951784-1-cota@braap.org> Message-Id: <20200605154929.26910-2-alex.bennee@linaro.org>
* qemu/qemu-plugin: Make qemu_plugin_hwaddr_is_io() hwaddr argument constPhilippe Mathieu-Daudé2020-05-151-1/+1
| | | | | | | | | | | | Rename qemu_plugin_hwaddr_is_io() address argument 'haddr' similarly to qemu_plugin_hwaddr_device_offset(), and make it const. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200510171119.20827-4-f4bug@amsat.org> Message-Id: <20200513173200.11830-4-alex.bennee@linaro.org>
* tcg plugins: expose an API version conceptAlex Bennée2019-11-121-0/+19
| | | | | | | | | | | | This is a very simple versioning API which allows the plugin infrastructure to check the API a plugin was built against. We also expose a min/cur API version to the plugin via the info block in case it wants to avoid using old deprecated APIs in the future. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Robert Foley <robert.foley@linaro.org>
* plugin: add qemu_plugin_outs helperAlex Bennée2019-10-281-0/+6
| | | | | | | | | Having the plugins grab stdout and spew stuff there is a bit ugly and certainly makes the tests look ugly. Provide a hook back into QEMU which can be redirected as needed. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Aaron Lindsay <aaron@os.amperecomputing.com>
* plugin: add qemu_plugin_insn_disas helperAlex Bennée2019-10-281-0/+9
| | | | | | | | | | Give the plugins access to the QEMU dissasembler so they don't have to re-invent the wheel. We generate a warning when there are spare bytes in the decode buffer. This is usually due to the front end loading in more bytes than decoded. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
* plugin: expand the plugin_init function to include an info blockAlex Bennée2019-10-281-2/+24
| | | | | | | | This provides a limited amount of info to plugins about the guest system that will allow them to make some additional decisions on setup. Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
* plugins: implement helpers for resolving hwaddrAlex Bennée2019-10-281-0/+8
| | | | | | | | | | | We need to keep a local per-cpu copy of the data as other threads may be running. Currently we can provide insight as to if the access was IO or not and give the offset into a given device (usually the main RAMBlock). We store enough information to get details such as the MemoryRegion which might be useful in later expansions to the API. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
* plugin: add implementation of the apiAlex Bennée2019-10-281-3/+0Star
| | | | | | [AJB: split from the core code commit] Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
* plugin: add user-facing APIEmilio G. Cota2019-10-281-0/+351
Add the API first to ease review. Signed-off-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>