- 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>
-
Thomas Huth authored
Stop including sysemu/sysemu.h in files that don't need it. Signed-off-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20210416171314.2074665-2-thuth@redhat.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
- Mar 17, 2021
-
-
Yonggang Luo authored
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>
-
Aaron Lindsay authored
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>
-
- Feb 18, 2021
-
-
Alex Bennée authored
When icount is enabled and we recompile an MMIO access we end up double counting the instruction execution. To avoid this we introduce the CF_MEMI cflag which only allows memory instrumentation for the next TB (which won't yet have been counted). As this is part of the hashed compile flags we will only execute the generated TB while coming out of a cpu_io_recompile. While we are at it delete the old TODO. We might as well keep the translation handy as it's likely you will repeatedly hit it on each MMIO access. Reported-by:
Aaron Lindsay <aaron@os.amperecomputing.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Tested-by:
Aaron Lindsay <aaron@os.amperecomputing.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210213130325.14781-21-alex.bennee@linaro.org>
-
Alex Bennée authored
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>
-
- Jan 02, 2021
-
-
Daniele Buono authored
LLVM/Clang, supports runtime checks for forward-edge Control-Flow Integrity (CFI). CFI on indirect function calls (cfi-icall) ensures that, in indirect function calls, the function called is of the right signature for the pointer type defined at compile time. For this check to work, the code must always respect the function signature when using function pointer, the function must be defined at compile time, and be compiled with link-time optimization. This rules out, for example, shared libraries that are dynamically loaded (given that functions are not known at compile time), and code that is dynamically generated at run-time. This patch: 1) Introduces the CONFIG_CFI flag to support cfi in QEMU 2) Introduces a decorator to allow the definition of "sensitive" functions, where a non-instrumented function may be called at runtime through a pointer. The decorator will take care of disabling cfi-icall checks on such functions, when cfi is enabled. 3) Marks functions currently in QEMU that exhibit such behavior, in particular: - The function in TCG that calls pre-compiled TBs - The function in TCI that interprets instructions - Functions in the plugin infrastructures that jump to callbacks - Functions in util that directly call a signal handler Signed-off-by:
Daniele Buono <dbuono@linux.vnet.ibm.com> Acked-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20201204230615.2392-3-dbuono@linux.vnet.ibm.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Dec 15, 2020
-
-
Paolo Bonzini authored
qemu_finish_machine_init currently can only exit QEMU if it fails. Prepare for giving it proper error propagation, and possibly for adding a plugin_add monitor command that calls an accelerator method. While at it, make all errors from plugin_load look the same. Reviewed-by:
Igor Mammedov <imammedo@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Oct 13, 2020
-
-
Thomas Huth authored
Since we are now always doing out-of-tree builds, these gitignore files should not be necessary anymore. Message-Id: <20200919133637.72744-1-thuth@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
- Oct 09, 2020
-
-
Yonggang Luo authored
Signed-off-by:
Yonggang Luo <luoyonggang@gmail.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20201001163429.1348-2-luoyonggang@gmail.com> Message-Id: <20201007160038.26953-20-alex.bennee@linaro.org>
-
- Aug 21, 2020
-
-
Paolo Bonzini authored
The binaries move to the root directory, e.g. qemu-system-i386 or qemu-arm. This requires changes to qtests, CI, etc. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
For now link arguments end up in Makefile.target, they will move to the right place soon. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- May 15, 2020
-
-
Philippe Mathieu-Daudé authored
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>
-
- Mar 17, 2020
-
-
Stefan Hajnoczi authored
The polymorphic locking macros don't support QemuRecMutex yet. Add it so that lock guards can be used with QemuRecMutex. Convert TCG plugins functions that benefit from these macros. Manual qemu_rec_mutex_lock/unlock() callers are left unmodified in cases where clarity would not improve by switching to the macros. Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Feb 25, 2020
-
-
Emilio G. Cota authored
Fixes: 54cb65d8 Reported-by:
Robert Henry <robhenry@microsoft.com> 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> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20200105072940.32204-1-cota@braap.org> Cc: qemu-stable@nongnu.org Message-Id: <20200225124710.14152-12-alex.bennee@linaro.org>
-
- Jan 16, 2020
-
-
Richard Henderson authored
Code movement in an upcoming patch will show that this file was implicitly depending on trace/mem.h being included beforehand. Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reported-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Nov 12, 2019
-
-
Alex Bennée authored
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>
-