278035fc | 13-Aug-2024 |
Pierrick Bouvier <pierrick.bouvier@linaro.org> |
plugins: fix race condition with scoreboards
A deadlock can be created if a new vcpu (a) triggers a scoreboard reallocation, and another vcpu (b) wants to create a new scoreboard at the same time.
plugins: fix race condition with scoreboards
A deadlock can be created if a new vcpu (a) triggers a scoreboard reallocation, and another vcpu (b) wants to create a new scoreboard at the same time.
In this case, (a) holds the plugin lock, and starts an exclusive section, waiting for (b). But at the same time, (b) is waiting for plugin lock.
The solution is to drop the lock before entering the exclusive section.
This bug can be easily reproduced by creating a callback for any tb exec, that allocates a new scoreboard. In this case, as soon as we reach more than 16 vcpus, the deadlock occurs.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2344 Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20240812220748.95167-2-pierrick.bouvier@linaro.org> [AJB: tweak var position to meet coding style] Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20240813202329.1237572-22-alex.bennee@linaro.org>
show more ...
|
0f3974b6 | 05-Jul-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
accel/tcg: Move qemu_plugin_vcpu_init__async() to plugins/
Calling qemu_plugin_vcpu_init__async() on the vCPU thread is a detail of plugins, not relevant to TCG vCPU management.
Signed-off-by: Phil
accel/tcg: Move qemu_plugin_vcpu_init__async() to plugins/
Calling qemu_plugin_vcpu_init__async() on the vCPU thread is a detail of plugins, not relevant to TCG vCPU management.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20240606124010.2460-4-philmd@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240705084047.857176-30-alex.bennee@linaro.org>
show more ...
|
ca7d7f42 | 20-Jun-2024 |
Pierrick Bouvier <pierrick.bouvier@linaro.org> |
plugins: fix inject_mem_cb rw masking
These are not booleans, but masks. Issue found by Richard Henderson.
Fixes: f86fd4d8721 ("plugins: distinct types for callbacks") Signed-off-by: Richard Hender
plugins: fix inject_mem_cb rw masking
These are not booleans, but masks. Issue found by Richard Henderson.
Fixes: f86fd4d8721 ("plugins: distinct types for callbacks") Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20240612195147.93121-3-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240620152220.2192768-12-alex.bennee@linaro.org>
show more ...
|
50803653 | 20-Jun-2024 |
Alex Bennée <alex.bennee@linaro.org> |
plugins: add migration blocker
If the plugin in controlling time there is some state that might be missing from the plugin tracking it. Migration is unlikely to work in this case so lets put a migra
plugins: add migration blocker
If the plugin in controlling time there is some state that might be missing from the plugin tracking it. Migration is unlikely to work in this case so lets put a migration blocker in to let the user know if they try.
Suggested-by: Dr. David Alan Gilbert <dave@treblig.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240620152220.2192768-10-alex.bennee@linaro.org>
show more ...
|
09afe967 | 14-May-2024 |
Pierrick Bouvier <pierrick.bouvier@linaro.org> |
plugins: remove op from qemu_plugin_inline_cb
This field is not needed as the callback type already holds this information.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-
plugins: remove op from qemu_plugin_inline_cb
This field is not needed as the callback type already holds this information.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20240502211522.346467-10-pierrick.bouvier@linaro.org> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240514174253.694591-12-alex.bennee@linaro.org>
show more ...
|
f86fd4d8 | 14-May-2024 |
Pierrick Bouvier <pierrick.bouvier@linaro.org> |
plugins: distinct types for callbacks
To prevent errors when writing new types of callbacks or inline operations, we split callbacks data to distinct types.
Reviewed-by: Richard Henderson <richard.
plugins: distinct types for callbacks
To prevent errors when writing new types of callbacks or inline operations, we split callbacks data to distinct types.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20240502211522.346467-8-pierrick.bouvier@linaro.org> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240514174253.694591-10-alex.bennee@linaro.org>
show more ...
|
7de77d37 | 14-May-2024 |
Pierrick Bouvier <pierrick.bouvier@linaro.org> |
plugins: conditional callbacks
Extend plugins API to support callback called with a given criteria (evaluated inline).
Added functions: - qemu_plugin_register_vcpu_tb_exec_cond_cb - qemu_plugin_reg
plugins: conditional callbacks
Extend plugins API to support callback called with a given criteria (evaluated inline).
Added functions: - qemu_plugin_register_vcpu_tb_exec_cond_cb - qemu_plugin_register_vcpu_insn_exec_cond_cb
They expect as parameter a condition, a qemu_plugin_u64_t (op1) and an immediate (op2). Callback is called if op1 |cond| op2 is true.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20240502211522.346467-6-pierrick.bouvier@linaro.org> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> [AJB: fix re-base conflict with tb_is_mem_only()] Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240514174253.694591-8-alex.bennee@linaro.org>
show more ...
|
36a1d8e7 | 14-May-2024 |
Pierrick Bouvier <pierrick.bouvier@linaro.org> |
plugins: add new inline op STORE_U64
This new operation can store an immediate u64 value to a given scoreboard.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Pierrick
plugins: add new inline op STORE_U64
This new operation can store an immediate u64 value to a given scoreboard.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20240502211522.346467-4-pierrick.bouvier@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240514174253.694591-6-alex.bennee@linaro.org>
show more ...
|
e5013259 | 03-Apr-2024 |
Richard Henderson <richard.henderson@linaro.org> |
plugins: Read mem_only directly from TB cflags
Do not pass around a boolean between multiple structures, just read it from the TranslationBlock in the TCGContext.
Reviewed-by: Philippe Mathieu-Daud
plugins: Read mem_only directly from TB cflags
Do not pass around a boolean between multiple structures, just read it from the TranslationBlock in the TCGContext.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
36bc99bc | 03-Apr-2024 |
Richard Henderson <richard.henderson@linaro.org> |
plugins: Use translator_st for qemu_plugin_insn_data
Use the bytes that we record for the entire TB, rather than a per-insn GByteArray. Record the length of the insn in plugin_gen_insn_end rather t
plugins: Use translator_st for qemu_plugin_insn_data
Use the bytes that we record for the entire TB, rather than a per-insn GByteArray. Record the length of the insn in plugin_gen_insn_end rather than infering from the length of the array.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
e096d370 | 24-Apr-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
plugins: Update stale comment
"plugin_mask" was renamed as "event_mask" in commit c006147122 ("plugins: create CPUPluginState and migrate plugin_mask").
Signed-off-by: Philippe Mathieu-Daudé <philm
plugins: Update stale comment
"plugin_mask" was renamed as "event_mask" in commit c006147122 ("plugins: create CPUPluginState and migrate plugin_mask").
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20240427155714.53669-3-philmd@linaro.org>
show more ...
|