- Nov 23, 2023
-
-
Greg Manning authored
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1972 Cross compile gcc is more picky about argument order than msys. Changed the meson command to take the (now renamed) libqemu_plugin_api.a as a lib, rather than an object. This puts it in the right place on both native and cross compile gcc commands Reenable plugins on crossbuilds Signed-off-by:
Greg Manning <gmanning@rapitasystems.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20231109124326.21106-2-gmanning@rapitasystems.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20231120150833.2552739-5-alex.bennee@linaro.org>
-
- Nov 08, 2023
-
-
Greg Manning authored
Generate a qemu_plugin_api.lib delay import lib on windows, for windows qemu plugins to link against. Implement an example dll load fail hook to link up the API functions correctly when a plugin is loaded on windows. Update the build scripts for the test and example plugins to use these things. Signed-off-by:
Greg Manning <gmanning@rapitasystems.com> Acked-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20231102172053.17692-3-gmanning@rapitasystems.com> [AJB: use find_program for dlltool, s/Windows/windows/] Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20231106185112.2755262-15-alex.bennee@linaro.org>
-
- Nov 07, 2023
-
-
Philippe Mathieu-Daudé authored
"exec/cpu-common.h" is meant to contain the declarations related to CPU usable with any accelerator / target combination. tcg_flush_jmp_cache() is specific to TCG, so restrict its declaration by moving it to "exec/tb-flush.h". Signed-off-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by:
Anton Johansson <anjo@rev.ng> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230918104153.24433-2-philmd@linaro.org>
-
- Oct 11, 2023
-
-
Akihiko Odaki authored
The created member of CPUState tells if the vCPU thread is started, and will be always false for the user space emulation that manages threads independently. Use the realized member of DeviceState, which is valid for both of the system and user space emulation. Fixes: 54cb65d8 ("plugin: add core code") Signed-off-by:
Akihiko Odaki <akihiko.odaki@daynix.com> Message-Id: <20230912224107.29669-4-akihiko.odaki@daynix.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20231009164104.369749-11-alex.bennee@linaro.org>
-
- Oct 06, 2023
-
-
Philippe Mathieu-Daudé authored
Fix: include/qemu/plugin.h:245:54: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] static inline void qemu_plugin_opt_parse(const char *optarg, ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/getopt.h:77:14: note: previous declaration is here extern char *optarg; /* getopt(3) external variables */ ^ Signed-off-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20231004120019.93101-6-philmd@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-
- Sep 16, 2023
-
-
Richard Henderson authored
Rather than saving MemoryRegionSection and offset, save phys_addr and MemoryRegion. This matches up much closer with the plugin api. Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Sep 07, 2023
-
-
Paolo Bonzini authored
While the option still needs to be parsed in the configure script (it's needed by tests/tcg, and also to decide about recursing into contrib/plugins), passing it to Meson can be done with -D instead of using config-host.mak. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Jun 20, 2023
-
-
Philippe Mathieu-Daudé authored
Signed-off-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230611085846.21415-2-philmd@linaro.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Mar 22, 2023
-
-
Richard Henderson authored
Now that we've broken the include loop with cpu.h, we can bring this inline. Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230310195252.210956-8-richard.henderson@linaro.org> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20230315174331.2959-18-alex.bennee@linaro.org> Reviewed-by:
Emilio Cota <cota@braap.org>
-
- Mar 07, 2023
-
-
Alex Bennée authored
This aids subsystems (like gdbstub) that want to trigger a flush without pulling target specific headers. Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20230302190846.2593720-8-alex.bennee@linaro.org> Message-Id: <20230303025805.625589-8-richard.henderson@linaro.org>
-
- Feb 02, 2023
-
-
Richard Henderson authored
Rather than iterate over all plugins for all events, iterate over plugins that have registered a given event. Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230117035701.168514-4-richard.henderson@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20230124180127.1881110-36-alex.bennee@linaro.org>
-
Emilio Cota authored
To fix potential deadlocks as reported by tsan. Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by:
Emilio Cota <cota@braap.org> Message-Id: <20230111151628.320011-6-cota@braap.org> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20230124180127.1881110-31-alex.bennee@linaro.org>
-
- Oct 06, 2022
-
-
Alex Bennée authored
Special care needs to be taken in ensuring locks are in a consistent state across fork events. Add helpers so the plugin system can ensure that. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Fixes: https://gitlab.com/qemu-project/qemu/-/issues/358 Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Tested-by:
Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20221004115221.2174499-1-alex.bennee@linaro.org>
-
Richard Henderson authored
Coverity reports out-of-bound accesses here. This should be a false positive due to how the index is decoded from MemOpIdx. Fixes: Coverity CID 1487201 Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Damien Hedde <damien.hedde@greensocs.com> Message-Id: <20220401190233.329360-1-richard.henderson@linaro.org> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220929114231.583801-37-alex.bennee@linaro.org>
-
- Oct 04, 2022
-
-
Richard Henderson authored
Wrap the bare TranslationBlock pointer into a structure. Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Sep 01, 2022
-
-
Paolo Bonzini authored
Found with "muon analyze". Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- May 11, 2022
-
-
Markus Armbruster authored
Header guard symbols should match their file name to make guard collisions less likely. Cleaned up with scripts/clean-header-guards.pl, followed by some renaming of new guard symbols picked by the script to better ones. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20220506134911.2856099-2-armbru@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> [Change to generated file ebpf/rss.bpf.skeleton.h backed out]
-
- Mar 07, 2022
-
-
Peter Maydell authored
Move the various memalign-related functions out of osdep.h and into their own header, which we include only where they are used. While we're doing this, add some brief documentation comments. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20220226180723.1706285-10-peter.maydell@linaro.org
-
- Feb 21, 2022
-
-
Peter Maydell authored
The qemu_icache_linesize, qemu_icache_linesize_log, qemu_dcache_linesize, and qemu_dcache_linesize_log variables are not used in many files. Move them out of osdep.h to a new qemu/cacheinfo.h, and document them. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-id: 20220208200856.3558249-5-peter.maydell@linaro.org
-
Philippe Mathieu-Daudé authored
Many files use "qemu/log.h" declarations but neglect to include it (they inherit it via "exec/exec-all.h"). "exec/exec-all.h" is a core component and shouldn't be used that way. Move the "qemu/log.h" inclusion locally to each unit requiring it. Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Acked-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20220207082756.82600-10-f4bug@amsat.org> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
- Feb 09, 2022
-
-
Ivanov Arkady authored
Which provide information about: - start_code. - end_code. - entry. - path to the executable binary. Signed-off-by:
Ivanov Arkady <arkadiy.ivanov@ispras.ru> Message-Id: <163491883461.304355.8210754161847179432.stgit@pc-System-Product-Name> [AJB: reword title, better descriptions, defaults, rm export, fix include] Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220204204335.1689602-22-alex.bennee@linaro.org>
-
- Jan 12, 2022
-
-
Paolo Bonzini authored
--dynamic-list is present on all supported ELF (not Windows or Darwin) platforms, since it dates back to 2006; -exported_symbols_list is likewise present on all supported versions of macOS. Do not bother doing a functional test in configure. Remove the file creation from configure as well: for Darwin, move the the creation of the Darwin-formatted symbols to meson; for ELF, use the file in the source path directly and switch from -Wl, to -Xlinker to not break weird paths that include a comma. Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Nov 29, 2021
-
-
Alex Bennée authored
Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Tested-by:
Stefan Weil <sw@weilnetz.de> Fixes: https://gitlab.com/qemu-project/qemu/-/issues/712 Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20211129140932.4115115-5-alex.bennee@linaro.org>
-
- Oct 12, 2021
-
-
Lukas Jünger authored
Some functions of the plugin API were missing in the symbol list. However, they are all used by the contributed example plugins. QEMU fails to load the plugin if the function symbol is not exported. Signed-off-by:
Lukas Jünger <lukas.junger@greensocs.com> Message-Id: <20210905140939.638928-2-lukas.junger@greensocs.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210917162332.3511179-11-alex.bennee@linaro.org>
-
- Oct 05, 2021
-
-
Richard Henderson authored
Use the MemOpIdx directly, rather than the rearrangement of the same bits currently done by the trace infrastructure. Pass in enum qemu_plugin_mem_rw so that we are able to treat read-modify-write operations as a single operation. Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Paolo Bonzini authored
Meson 0.58.2 does not need b_staticpic=$pie anymore, and has stabilized the keyval module. Remove the workaround and use a few replacements for features deprecated in the 0.57.0 release cycle. One feature that we would like to use is passing dependencies to summary. However, that was broken in 0.59.0 and 0.59.1. Therefore, use the embedded Meson if the host has anything older than 0.59.2, but allow --meson= to use 0.58.2. Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Sep 02, 2021
-
-
Mahmoud Mandour authored
This call will help boolean argument parsing since arguments are now passed to plugins as a name and value. Signed-off-by:
Mahmoud Mandour <ma.mandourr@gmail.com> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210730135817.17816-3-ma.mandourr@gmail.com> [AJB: add to symbols] Signed-off-by:
Alex Bennée <alex.bennee@linaro.org>
-
Mahmoud Mandour authored
Passing arguments to plugins had to be done through "arg=<argname>". This is redundant and introduces confusion especially when the argument has a name and value (e.g. `-plugin plugin_name,arg="argname=argvalue"`). This allows passing plugin arguments directly e.g: `-plugin plugin_name,argname=argvalue` For now, passing arguments through "arg=" is still supports but outputs a deprecation warning. Also, this commit makes boolean arguments passed to plugins in the `argname=on|off` form instead of the deprecated short-boolean form. Signed-off-by:
Mahmoud Mandour <ma.mandourr@gmail.com> Tested-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210730135817.17816-2-ma.mandourr@gmail.com>
-
Alex Bennée authored
This will make it easier to add new exported functions. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org>
-
Paolo Bonzini authored
On Mac --enable-modules and --enable-plugins are currently incompatible, because the Apple -Wl,-exported_symbols_list command line options prevents the export of any symbols needed by the modules. On x86 -Wl,--dynamic-list does not have this effect, but only because the -Wl,--export-dynamic option provided by gmodule-2.0.pc overrides it. On Apple there is no -Wl,--export-dynamic, because it is the default, and thus no override. Either way, when modules are active there is no reason to include the plugin_ldflags. While at it, avoid the useless -Wl,--export-dynamic when --enable-plugins is specified but --enable-modules is not; this way, the GNU and Apple configurations are more similar. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/516 Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> [AJB: fix noexport to no-export] Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210811100550.54714-1-pbonzini@redhat.com> Cc: qemu-stable@nongnu.org
-
- Jul 23, 2021
-
-
Aaron Lindsay authored
The address calculation for IO regions introduced by commit 787148bf Author: Aaron Lindsay <aaron@os.amperecomputing.com> plugins: Expose physical addresses instead of device offsets is not always accurate. Use the more correct MemoryRegionSection.offset_within_address_space. Signed-off-by:
Aaron Lindsay <aaron@os.amperecomputing.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210720195735.3934473-1-aaron@os.amperecomputing.com> Message-Id: <20210720232703.10650-25-alex.bennee@linaro.org>
-
Alex Bennée authored
In user-mode emulation there is a small race between preexit_cleanup and exit_group() which means we may end up calling instrumented instructions before the kernel reaps child threads. To solve this we implement a new helper which ensures the callbacks are flushed along with any translations before we let the host do it's a thing. While we are at it make the documentation of qemu_plugin_register_atexit_cb clearer as to what the user can expect. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Mahmoud Mandour <ma.mandourr@gmail.com> Acked-by:
Warner Losh <imp@bsdimp.com> Message-Id: <20210720232703.10650-21-alex.bennee@linaro.org>
-
- Jul 21, 2021
-
-
Richard Henderson authored
Since the last thing that mem.h does is include mem-internal.h, the symbols are not actually private. Tested-by:
Cole Robinson <crobinso@redhat.com> Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Jul 14, 2021
-
-
Alex Bennée authored
The OSX linker is a lot fussier about these missing symbols. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210714101623.17046-1-alex.bennee@linaro.org>
-
Alex Bennée authored
The compiler rightly complains when we build on 32 bit that casting uint64_t into a void is a bad idea. We are really dealing with a host pointer at this point so treat it as such. This does involve a uintptr_t cast of the result of the TLB addend as we know that has to point to the host memory. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210709143005.1554-28-alex.bennee@linaro.org>
-
- Jun 25, 2021
-
-
Alex Bennée authored
This is a quality of life helper for plugins so they don't need to re-implement symbol lookup when dumping an address. The strings are constant so don't need to be duplicated. One minor tweak is to return NULL instead of a zero length string to show lookup failed. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Mahmoud Mandour <ma.mandourr@gmail.com> Message-Id: <20210608040532.56449-2-ma.mandourr@gmail.com> Message-Id: <20210623102749.25686-8-alex.bennee@linaro.org>
-
- Jun 21, 2021
-
-
Ahmed Abouzied authored
Leading underscores followed by a capital letter or underscore are reserved by the C standard. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/369 Signed-off-by:
Ahmed Abouzied <email@aabouzied.com> Message-Id: <20210605174938.13782-1-email@aabouzied.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
- Jun 19, 2021
-
-
Richard Henderson authored
As noted by qemu-plugins.h, enum qemu_plugin_cb_flags is currently unused -- plugins can neither read nor write guest registers. Tested-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
- May 26, 2021
-
-
Philippe Mathieu-Daudé authored
Only 2 headers require "exec/tb-context.h". Instead of having all files including "exec/exec-all.h" also including it, directly include it where it is required: - accel/tcg/cpu-exec.c - accel/tcg/translate-all.c For plugins/plugin.h, we were implicitly relying on exec/exec-all.h -> exec/tb-context.h -> qemu/qht.h which is now included directly. Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20210524170453.3791436-2-f4bug@amsat.org> [rth: Fix plugins/plugin.h compilation] Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
- May 02, 2021
-
-
Thomas Huth authored
Stop including cpu.h in files that don't need it. Signed-off-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20210416171314.2074665-4-thuth@redhat.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-