diff options
author | Alex Bennée | 2021-02-13 14:03:04 +0100 |
---|---|---|
committer | Alex Bennée | 2021-02-18 09:16:50 +0100 |
commit | b853a79f6530fbccdb65639b6e5a94f71dcd5050 (patch) | |
tree | 4546991230a8f4a6c1e09823cba92f74e8ca6467 /include/qemu/qemu-plugin.h | |
parent | hw/virtio/pci: include vdev name in registered PCI sections (diff) | |
download | qemu-b853a79f6530fbccdb65639b6e5a94f71dcd5050.tar.gz qemu-b853a79f6530fbccdb65639b6e5a94f71dcd5050.tar.xz qemu-b853a79f6530fbccdb65639b6e5a94f71dcd5050.zip |
plugins: add API to return a name for a IO device
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>
Diffstat (limited to 'include/qemu/qemu-plugin.h')
-rw-r--r-- | include/qemu/qemu-plugin.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 5775e82c4e..c66507fe8f 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -330,6 +330,12 @@ struct qemu_plugin_hwaddr *qemu_plugin_get_hwaddr(qemu_plugin_meminfo_t info, bool qemu_plugin_hwaddr_is_io(const struct qemu_plugin_hwaddr *haddr); uint64_t qemu_plugin_hwaddr_device_offset(const struct qemu_plugin_hwaddr *haddr); +/* + * Returns a string representing the device. The string is valid for + * the lifetime of the plugin. + */ +const char *qemu_plugin_hwaddr_device_name(const struct qemu_plugin_hwaddr *h); + typedef void (*qemu_plugin_vcpu_mem_cb_t)(unsigned int vcpu_index, qemu_plugin_meminfo_t info, uint64_t vaddr, |