4abc8923 | 03-Apr-2024 |
Richard Henderson <richard.henderson@linaro.org> |
plugins: Copy memory in qemu_plugin_insn_data
Instead of returning a host pointer, copy the data into storage provided by the caller.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-
plugins: Copy memory in qemu_plugin_insn_data
Instead of returning a host pointer, copy the data into storage provided by the caller.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
1dfd42c4 | 28-Mar-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/rdma: Remove deprecated pvrdma device and rdmacm-mux helper
The whole RDMA subsystem was deprecated in commit e9a54265f5 ("hw/rdma: Deprecate the pvrdma device and the rdma subsystem") released i
hw/rdma: Remove deprecated pvrdma device and rdmacm-mux helper
The whole RDMA subsystem was deprecated in commit e9a54265f5 ("hw/rdma: Deprecate the pvrdma device and the rdma subsystem") released in v8.2.
Remove: - PVRDMA device - generated vmw_pvrdma/ directory from linux-headers - rdmacm-mux tool from contrib/
Cc: Yuval Shaia <yuval.shaia.ml@gmail.com> Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Message-Id: <20240328130255.52257-2-philmd@linaro.org>
show more ...
|
d5866a7a | 26-Mar-2024 |
Yao Xingtao <yaoxt.fnst@fujitsu.com> |
contrib/plugins/execlog: Fix compiler warning
1. The g_pattern_match_string() is deprecated when glib2 version >= 2.70. Use g_pattern_spec_match_string() instead to avoid this problem.
2. The ty
contrib/plugins/execlog: Fix compiler warning
1. The g_pattern_match_string() is deprecated when glib2 version >= 2.70. Use g_pattern_spec_match_string() instead to avoid this problem.
2. The type of second parameter in g_ptr_array_add() is 'gpointer' {aka 'void *'}, but the type of reg->name is 'const char*'. Cast the type of reg->name to 'gpointer' to avoid this problem.
compiler warning message:
contrib/plugins/execlog.c:330:17: warning: ‘g_pattern_match_string’ is deprecated: Use 'g_pattern_spec_match_string' instead [-Wdeprecated-declarations] 330 | if (g_pattern_match_string(pat, rd->name) || | ^~ In file included from /usr/include/glib-2.0/glib.h:67, from contrib/plugins/execlog.c:9: /usr/include/glib-2.0/glib/gpattern.h:57:15: note: declared here 57 | gboolean g_pattern_match_string (GPatternSpec *pspec, | ^~~~~~~~~~~~~~~~~~~~~~ contrib/plugins/execlog.c:331:21: warning: ‘g_pattern_match_string’ is deprecated: Use 'g_pattern_spec_match_string' instead [-Wdeprecated-declarations] 331 | g_pattern_match_string(pat, rd_lower)) { | ^~~~~~~~~~~~~~~~~~~~~~ /usr/include/glib-2.0/glib/gpattern.h:57:15: note: declared here 57 | gboolean g_pattern_match_string (GPatternSpec *pspec, | ^~~~~~~~~~~~~~~~~~~~~~ contrib/plugins/execlog.c:339:63: warning: passing argument 2 of ‘g_ptr_array_add’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 339 | g_ptr_array_add(all_reg_names, reg->name); | ~~~^~~~~~ In file included from /usr/include/glib-2.0/glib.h:33: /usr/include/glib-2.0/glib/garray.h:198:62: note: expected ‘gpointer’ {aka ‘void *’} but argument is of type ‘const char *’ 198 | gpointer data); | ~~~~~~~~~~~~~~~~~~^~~~
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2210 Signed-off-by: Yao Xingtao <yaoxt.fnst@fujitsu.com> Message-ID: <20240326015257.21516-1-yaoxt.fnst@fujitsu.com> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
show more ...
|
73281023 | 11-Mar-2024 |
Paolo Bonzini <pbonzini@redhat.com> |
tests/plugins: fix use-after-free bug
rec->count.score is inside rec, which is freed before rec->count.score is. Reorder the instructions
Reported by Coverity as CID 1539967.
Cc: Alex Bennée <alex
tests/plugins: fix use-after-free bug
rec->count.score is inside rec, which is freed before rec->count.score is. Reorder the instructions
Reported by Coverity as CID 1539967.
Cc: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
98d16e5f | 07-Mar-2024 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
contrib/elf2dmp: Ensure phdrs fit in file
Callers of elf64_getphdr() and elf_getphdrnum() assume phdrs are accessible.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2202 Signed-off-by: Ak
contrib/elf2dmp: Ensure phdrs fit in file
Callers of elf64_getphdr() and elf_getphdrnum() assume phdrs are accessible.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2202 Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20240307-elf2dmp-v4-19-4f324ad4d99d@daynix.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
9de37c28 | 07-Mar-2024 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
contrib/elf2dmp: Clamp QEMU note to file size
This fixes crashes with truncated dumps.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
contrib/elf2dmp: Clamp QEMU note to file size
This fixes crashes with truncated dumps.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu> Message-id: 20240307-elf2dmp-v4-18-4f324ad4d99d@daynix.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
0c94e32d | 07-Mar-2024 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
contrib/elf2dmp: Use GPtrArray
This removes the need to enumarate QEMUCPUState twice and saves code.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Peter Maydell <peter.maydel
contrib/elf2dmp: Use GPtrArray
This removes the need to enumarate QEMUCPUState twice and saves code.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu> Message-id: 20240307-elf2dmp-v4-17-4f324ad4d99d@daynix.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
f024f503 | 07-Mar-2024 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
contrib/elf2dmp: Use rol64() to decode
rol64() is roubust against too large shift values and fixes UBSan warnings.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Peter Maydell
contrib/elf2dmp: Use rol64() to decode
rol64() is roubust against too large shift values and fixes UBSan warnings.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-id: 20240307-elf2dmp-v4-14-4f324ad4d99d@daynix.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
2aa501af | 07-Mar-2024 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
contrib/elf2dmp: Use lduw_le_p() to read PDB
The relevant value may be unaligned and is little-endian.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Tested-by: Viktor Prutyanov <viktor.pr
contrib/elf2dmp: Use lduw_le_p() to read PDB
The relevant value may be unaligned and is little-endian.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-id: 20240307-elf2dmp-v4-13-4f324ad4d99d@daynix.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
66790947 | 07-Mar-2024 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
contrib/elf2dmp: Ensure segment fits in file
This makes elf2dmp more robust against corrupted inputs.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Peter Maydell <peter.mayde
contrib/elf2dmp: Ensure segment fits in file
This makes elf2dmp more robust against corrupted inputs.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu> Message-id: 20240307-elf2dmp-v4-12-4f324ad4d99d@daynix.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
2aa205f7 | 07-Mar-2024 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
contrib/elf2dmp: Always destroy PA space
Destroy PA space even if paging base couldn't be found, fixing memory leak.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Peter Mayde
contrib/elf2dmp: Always destroy PA space
Destroy PA space even if paging base couldn't be found, fixing memory leak.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu> Message-id: 20240307-elf2dmp-v4-11-4f324ad4d99d@daynix.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
a6a62ef5 | 07-Mar-2024 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
contrib/elf2dmp: Always check for PA resolution failure
Not checking PA resolution failure can result in NULL deference.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Peter M
contrib/elf2dmp: Always check for PA resolution failure
Not checking PA resolution failure can result in NULL deference.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu> Message-id: 20240307-elf2dmp-v4-10-4f324ad4d99d@daynix.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
fbc3d7d2 | 07-Mar-2024 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
contrib/elf2dmp: Fix error reporting style in main.c
include/qapi/error.h says: > We recommend > * bool-valued functions return true on success / false on failure, > ...
Signed-off-by: Akihiko Odak
contrib/elf2dmp: Fix error reporting style in main.c
include/qapi/error.h says: > We recommend > * bool-valued functions return true on success / false on failure, > ...
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20240307-elf2dmp-v4-9-4f324ad4d99d@daynix.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
49760ccf | 07-Mar-2024 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
contrib/elf2dmp: Fix error reporting style in qemu_elf.c
include/qapi/error.h says: > We recommend > * bool-valued functions return true on success / false on failure, > ...
Signed-off-by: Akihiko
contrib/elf2dmp: Fix error reporting style in qemu_elf.c
include/qapi/error.h says: > We recommend > * bool-valued functions return true on success / false on failure, > ...
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20240307-elf2dmp-v4-8-4f324ad4d99d@daynix.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
b1250455 | 07-Mar-2024 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
contrib/elf2dmp: Fix error reporting style in pdb.c
include/qapi/error.h says: > We recommend > * bool-valued functions return true on success / false on failure, > ...
Signed-off-by: Akihiko Odaki
contrib/elf2dmp: Fix error reporting style in pdb.c
include/qapi/error.h says: > We recommend > * bool-valued functions return true on success / false on failure, > ...
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20240307-elf2dmp-v4-7-4f324ad4d99d@daynix.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
1b806c36 | 07-Mar-2024 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
contrib/elf2dmp: Fix error reporting style in download.c
include/qapi/error.h says: > We recommend > * bool-valued functions return true on success / false on failure, > ...
Signed-off-by: Akihiko
contrib/elf2dmp: Fix error reporting style in download.c
include/qapi/error.h says: > We recommend > * bool-valued functions return true on success / false on failure, > ...
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20240307-elf2dmp-v4-6-4f324ad4d99d@daynix.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
a15f9749 | 07-Mar-2024 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
contrib/elf2dmp: Fix error reporting style in addrspace.c
include/qapi/error.h says: > We recommend > * bool-valued functions return true on success / false on failure, > ...
Signed-off-by: Akihiko
contrib/elf2dmp: Fix error reporting style in addrspace.c
include/qapi/error.h says: > We recommend > * bool-valued functions return true on success / false on failure, > ...
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-id: 20240307-elf2dmp-v4-5-4f324ad4d99d@daynix.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
262a0ff8 | 07-Mar-2024 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
contrib/elf2dmp: Change pa_space_create() signature
pa_space_create() used to return an integer to propagate error, but it never fails so let it return void.
Signed-off-by: Akihiko Odaki <akihiko.o
contrib/elf2dmp: Change pa_space_create() signature
pa_space_create() used to return an integer to propagate error, but it never fails so let it return void.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-id: 20240307-elf2dmp-v4-4-4f324ad4d99d@daynix.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
87157ef3 | 07-Mar-2024 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
contrib/elf2dmp: Continue even contexts are lacking
Let fill_context() continue even if it fails to fill contexts of some CPUs. A dump may still contain valuable information even if it lacks context
contrib/elf2dmp: Continue even contexts are lacking
Let fill_context() continue even if it fails to fill contexts of some CPUs. A dump may still contain valuable information even if it lacks contexts of some CPUs due to dump corruption or a failure before starting CPUs.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu> Message-id: 20240307-elf2dmp-v4-3-4f324ad4d99d@daynix.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
a4e58de1 | 07-Mar-2024 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
contrib/elf2dmp: Assume error by default
A common construct in contrib/elf2dmp is to set "err" flag and goto in error paths. In such a construct, there is only one successful path while there are se
contrib/elf2dmp: Assume error by default
A common construct in contrib/elf2dmp is to set "err" flag and goto in error paths. In such a construct, there is only one successful path while there are several error paths, so it will be more simpler to initialize "err" flag set, and clear it in the successful path.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu> Message-id: 20240307-elf2dmp-v4-2-4f324ad4d99d@daynix.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
b48139d0 | 07-Mar-2024 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
contrib/elf2dmp: Remove unnecessary err flags
They are always evaluated to 1.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by
contrib/elf2dmp: Remove unnecessary err flags
They are always evaluated to 1.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu> Message-id: 20240307-elf2dmp-v4-1-4f324ad4d99d@daynix.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
c125a8ab | 05-Mar-2024 |
Pierrick Bouvier <pierrick.bouvier@linaro.org> |
contrib/plugins/howvec: migrate to new per_vcpu API
Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Tested-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Pierrick Bouvier <pierrick.bouvie
contrib/plugins/howvec: migrate to new per_vcpu API
Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Tested-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20240304130036.124418-11-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240305121005.3528075-24-alex.bennee@linaro.org>
show more ...
|
2d0d5514 | 05-Mar-2024 |
Pierrick Bouvier <pierrick.bouvier@linaro.org> |
contrib/plugins/hotblocks: migrate to new per_vcpu API
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20240304130036.124418-10-pierrick.bouvier@linaro.org> Signed-off-by:
contrib/plugins/hotblocks: migrate to new per_vcpu API
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20240304130036.124418-10-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240305121005.3528075-23-alex.bennee@linaro.org>
show more ...
|
af6e4e0a | 27-Feb-2024 |
Alex Bennée <alex.bennee@linaro.org> |
contrib/plugins: extend execlog to track register changes
With the new plugin register API we can now track changes to register values. Currently the implementation is fairly dumb which will slow do
contrib/plugins: extend execlog to track register changes
With the new plugin register API we can now track changes to register values. Currently the implementation is fairly dumb which will slow down if a large number of register values are being tracked. This could be improved by only instrumenting instructions which mention registers we are interested in tracking.
Example usage:
./qemu-aarch64 -D plugin.log -d plugin \ -cpu max,sve256=on \ -plugin contrib/plugins/libexeclog.so,reg=sp,reg=z\* \ ./tests/tcg/aarch64-linux-user/sha512-sve
will display in the execlog any changes to the stack pointer (sp) and the SVE Z registers.
As testing registers every instruction will be quite a heavy operation there is an additional flag which attempts to optimise the register tracking by only instrumenting instructions which are likely to change its value. This relies on the QEMU disassembler showing up the register names in disassembly so is an explicit opt-in.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Cc: Akihiko Odaki <akihiko.odaki@daynix.com> Based-On: <20231025093128.33116-19-akihiko.odaki@daynix.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240227144335.1196131-27-alex.bennee@linaro.org>
show more ...
|
9e096a76 | 27-Feb-2024 |
Alex Bennée <alex.bennee@linaro.org> |
contrib/plugins: fix imatch
We can't directly save the ephemeral imatch from argv as that memory will get recycled.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Philippe Mat
contrib/plugins: fix imatch
We can't directly save the ephemeral imatch from argv as that memory will get recycled.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240227144335.1196131-26-alex.bennee@linaro.org>
show more ...
|