[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 03/12] tests/plugin: add test plugin for inline operations
From: |
Alex Bennée |
Subject: |
Re: [PATCH 03/12] tests/plugin: add test plugin for inline operations |
Date: |
Fri, 12 Jan 2024 17:20:07 +0000 |
User-agent: |
mu4e 1.11.27; emacs 29.1 |
Pierrick Bouvier <pierrick.bouvier@linaro.org> writes:
> On 1/11/24 19:57, Philippe Mathieu-Daudé wrote:
>> Hi Pierrick,
>> On 11/1/24 15:23, Pierrick Bouvier wrote:
>>> For now, it simply performs instruction, bb and mem count, and ensure
>>> that inline vs callback versions have the same result. Later, we'll
>>> extend it when new inline operations are added.
>>>
>>> Use existing plugins to test everything works is a bit cumbersome, as
>>> different events are treated in different plugins. Thus, this new one.
>>>
>>> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
>>> ---
>>> tests/plugin/inline.c | 183 +++++++++++++++++++++++++++++++++++++++
>>> tests/plugin/meson.build | 2 +-
>>> 2 files changed, 184 insertions(+), 1 deletion(-)
>>> create mode 100644 tests/plugin/inline.c
>>
>>> +#define MAX_CPUS 8
>> Where does this value come from?
>>
>
> The plugin tests/plugin/insn.c had this constant, so I picked it up
> from here.
>
>> Should the pluggin API provide a helper to ask TCG how many
>> vCPUs are created?
>
> In user mode, we can't know how many simultaneous threads (and thus
> vcpu) will be triggered by advance. I'm not sure if additional cpus
> can be added in system mode.
>
> One problem though, is that when you register an inline op with a
> dynamic array, when you resize it (when detecting a new vcpu), you
> can't change it afterwards. So, you need a storage statically sized
> somewhere.
>
> Your question is good, and maybe we should define a MAX constant that
> plugins should rely on, instead of a random amount.
For user-mode it can be infinite. The existing plugins do this by
ensuring vcpu_index % max_vcpu. Perhaps we just ensure that for the
scoreboard as well? Of course that does introduce a trap for those using
user-mode...
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
- Re: [PATCH 01/12] plugins: implement inline operation with cpu_index offset, (continued)
[PATCH 04/12] tests/plugin/inline: migrate to new per_vcpu API, Pierrick Bouvier, 2024/01/11
[PATCH 03/12] tests/plugin: add test plugin for inline operations, Pierrick Bouvier, 2024/01/11
- Re: [PATCH 03/12] tests/plugin: add test plugin for inline operations, Philippe Mathieu-Daudé, 2024/01/11
- Re: [PATCH 03/12] tests/plugin: add test plugin for inline operations, Pierrick Bouvier, 2024/01/11
- Re: [PATCH 03/12] tests/plugin: add test plugin for inline operations,
Alex Bennée <=
- Re: [PATCH 03/12] tests/plugin: add test plugin for inline operations, Pierrick Bouvier, 2024/01/13
- Re: [PATCH 03/12] tests/plugin: add test plugin for inline operations, Alex Bennée, 2024/01/13
- Re: [PATCH 03/12] tests/plugin: add test plugin for inline operations, Pierrick Bouvier, 2024/01/15
- Re: [PATCH 03/12] tests/plugin: add test plugin for inline operations, Alex Bennée, 2024/01/15
- Re: [PATCH 03/12] tests/plugin: add test plugin for inline operations, Pierrick Bouvier, 2024/01/16
[PATCH 05/12] tests/plugin/mem: fix race condition with callbacks, Pierrick Bouvier, 2024/01/11
[PATCH 02/12] plugins: add inline operation per vcpu, Pierrick Bouvier, 2024/01/11
[PATCH 06/12] tests/plugin/mem: migrate to new per_vcpu API, Pierrick Bouvier, 2024/01/11