[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 13/15] plugins: getting qemu_plugin_get_hwaddr only expose one
From: |
Alex Bennée |
Subject: |
[PULL v2 13/15] plugins: getting qemu_plugin_get_hwaddr only expose one function prototype |
Date: |
Wed, 17 Mar 2021 07:22:14 +0000 |
From: Yonggang Luo <luoyonggang@gmail.com>
This is used for counting how much function are export to qemu plugin.
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20201013002806.1447-2-luoyonggang@gmail.com>
Message-Id: <20210312172821.31647-14-alex.bennee@linaro.org>
diff --git a/plugins/api.c b/plugins/api.c
index 3c7dc406e3..b22998cd7c 100644
--- a/plugins/api.c
+++ b/plugins/api.c
@@ -266,10 +266,12 @@ bool qemu_plugin_mem_is_store(qemu_plugin_meminfo_t info)
#ifdef CONFIG_SOFTMMU
static __thread struct qemu_plugin_hwaddr hwaddr_info;
+#endif
struct qemu_plugin_hwaddr *qemu_plugin_get_hwaddr(qemu_plugin_meminfo_t info,
uint64_t vaddr)
{
+#ifdef CONFIG_SOFTMMU
CPUState *cpu = current_cpu;
unsigned int mmu_idx = info >> TRACE_MEM_MMU_SHIFT;
hwaddr_info.is_store = info & TRACE_MEM_ST;
@@ -281,14 +283,10 @@ struct qemu_plugin_hwaddr
*qemu_plugin_get_hwaddr(qemu_plugin_meminfo_t info,
}
return &hwaddr_info;
-}
#else
-struct qemu_plugin_hwaddr *qemu_plugin_get_hwaddr(qemu_plugin_meminfo_t info,
- uint64_t vaddr)
-{
return NULL;
-}
#endif
+}
bool qemu_plugin_hwaddr_is_io(const struct qemu_plugin_hwaddr *haddr)
{
--
2.20.1
- [PULL v2 04/15] plugins: expand kernel-doc for qemu_info_t, (continued)
- [PULL v2 04/15] plugins: expand kernel-doc for qemu_info_t, Alex Bennée, 2021/03/17
- [PULL v2 02/15] plugins: new syscalls plugin, Alex Bennée, 2021/03/17
- [PULL v2 08/15] plugins: add qemu_plugin_cb_flags to kernel-doc, Alex Bennée, 2021/03/17
- [PULL v2 07/15] plugins: expand the typedef kernel-docs for translation, Alex Bennée, 2021/03/17
- [PULL v2 05/15] plugins: cleanup kernel-doc for qemu_plugin_install, Alex Bennée, 2021/03/17
- [PULL v2 06/15] plugins: expand the callback typedef kernel-docs, Alex Bennée, 2021/03/17
- [PULL v2 09/15] plugins: add qemu_plugin_id_t to kernel-doc, Alex Bennée, 2021/03/17
- [PULL v2 12/15] plugins: expand kernel-doc for memory query and instrumentation, Alex Bennée, 2021/03/17
- [PULL v2 10/15] plugins: expand inline exec kernel-doc documentation., Alex Bennée, 2021/03/17
- [PULL v2 11/15] plugins: expand kernel-doc for instruction query and instrumentation, Alex Bennée, 2021/03/17
- [PULL v2 13/15] plugins: getting qemu_plugin_get_hwaddr only expose one function prototype,
Alex Bennée <=
- [PULL v2 15/15] hw/core: Only build guest-loader if libfdt is available, Alex Bennée, 2021/03/17
- [PULL v2 14/15] plugins: Fixes typo in qemu-plugin.h, Alex Bennée, 2021/03/17
- Re: [PULL v2 00/15] misc fixes (strtoz, plugins, guest-loader), Peter Maydell, 2021/03/18