Re: [PATCH 0/5] plugins/cache: L2 cache modelling and a minor leak fix

2021-09-20 Thread Mahmoud Mandour
Ping :-) On Tue, Aug 10, 2021 at 3:48 PM Mahmoud Mandour wrote: > Hello, > > This series implements a simple L2 unified per-core cache emulation, the L2 > cache is not enabled by default and is only enabled on specifying so using > the > plugin arguments. L2 cache is only a

[PATCH] docs/devel: be consistent about example plugin names

2021-08-30 Thread Mahmoud Mandour
Some plugins were prefixed with `.c`, some were not. Since the name is essentially the full-name of the plugin file, it's logical to include the extension. Signed-off-by: Mahmoud Mandour --- docs/devel/tcg-plugins.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs

Re: [PATCH v3] blog: add a post for the new TCG cache modelling plugin

2021-08-17 Thread Mahmoud Mandour
CC Stefan Hajnoczi and Thomas Huth On Mon, Aug 9, 2021 at 6:46 PM Mahmoud Mandour wrote: > This post introduces the new TCG plugin `cache` that's used for cache > modelling. This plugin is a part of my GSoC 2021 participation. > > Signed-off-by: Mahmoud Mandour > --- > >

Re: [PATCH 0/5] plugins/cache: L2 cache modelling and a minor leak fix

2021-08-10 Thread Mahmoud Mandour
On Tue, Aug 10, 2021 at 3:48 PM Mahmoud Mandour wrote: > Hello, > > This series implements a simple L2 unified per-core cache emulation, the L2 > cache is not enabled by default and is only enabled on specifying so using > the > plugin arguments. L2 cache is only accessed if L

[PATCH 3/5] plugins/cache: split command line arguments into name and value

2021-08-10 Thread Mahmoud Mandour
This way of handling args is more lenient and sets a better framework to parse boolean command line arguments. Signed-off-by: Mahmoud Mandour --- contrib/plugins/cache.c | 57 ++--- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/contrib

[PATCH 2/5] plugins/cache: implement unified L2 cache emulation

2021-08-10 Thread Mahmoud Mandour
to maintain the number of L2 misses per instruction. The default cache parameters of L2 caches is: 2MB cache size 16-way associativity 64-byte blocks Signed-off-by: Mahmoud Mandour --- contrib/plugins/cache.c | 256 +++- 1 file changed, 175 insertions

[PATCH 1/5] plugins/cache: freed heap-allocated mutexes

2021-08-10 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- contrib/plugins/cache.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index a1e03ca882..a255e26e25 100644 --- a/contrib/plugins/cache.c +++ b/contrib/plugins/cache.c @@ -614,6 +614,9 @@ static void

[PATCH 5/5] docs/tcg-plugins: add L2 arguments to cache docs

2021-08-10 Thread Mahmoud Mandour
to match other plugins. Signed-off-by: Mahmoud Mandour --- docs/devel/tcg-plugins.rst | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index fcc460bf7b..ee3fab75bd 100644 --- a/docs/devel/tcg

[PATCH 4/5] plugins/cache: make L2 emulation optional through args

2021-08-10 Thread Mahmoud Mandour
By default L2 is not enabled and is enabled by either using the newly-introduced "l2" boolean argument, or by setting any of the L2 cache parameters using args. On specifying "l2=on", the default cache configuration is used. Signed-off-by: Mahmoud Mandour --- contrib/

[PATCH 0/5] plugins/cache: L2 cache modelling and a minor leak fix

2021-08-10 Thread Mahmoud Mandour
ing a line usually looks ugly when not sufficiently long(?) LMK if I need to fix this :) Mahmoud Mandour (5): plugins/cache: freed heap-allocated mutexes plugins/cache: implement unified L2 cache emulation plugins/cache: split command line arguments into name and value plugins/cache: make L2

[PATCH v3] blog: add a post for the new TCG cache modelling plugin

2021-08-09 Thread Mahmoud Mandour
This post introduces the new TCG plugin `cache` that's used for cache modelling. This plugin is a part of my GSoC 2021 participation. Signed-off-by: Mahmoud Mandour --- v2 -> v3: Added a prologue briefly explaining the importance of caching. Explained the multi-threaded linux-u

Re: [PATCH v5 0/2] plugins/cache: multicore cache modelling

2021-08-04 Thread Mahmoud Mandour
On Tue, Aug 3, 2021 at 11:10 PM Alex Bennée wrote: > > Mahmoud Mandour writes: > > > Hello, > > > > This series introduce multicore cache modelling in > contrib/plugins/cache.c > > > > Multi-core cache modelling is handled such that for ful

[PATCH] plugins/execlog: removed unintended "s" at the end of log lines.

2021-08-03 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- contrib/plugins/execlog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/plugins/execlog.c b/contrib/plugins/execlog.c index 2de9f0d7d4..a5275dcc15 100644 --- a/contrib/plugins/execlog.c +++ b/contrib/plugins/execlog.c @@ -67,7

[PATCH v5 2/2] docs/devel/tcg-plugins: added cores arg to cache plugin

2021-08-03 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- docs/devel/tcg-plugins.rst | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index 7e54f12837..863828809d 100644 --- a/docs/devel/tcg-plugins.rst +++ b/docs/devel/tcg

[PATCH v5 1/2] plugins/cache: supported multicore cache modelling

2021-08-03 Thread Mahmoud Mandour
cores, they'll thrash each other Signed-off-by: Mahmoud Mandour --- contrib/plugins/cache.c | 176 ++-- 1 file changed, 132 insertions(+), 44 deletions(-) diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index 066ea6d8ec..a1e03ca882 100644

[PATCH v5 0/2] plugins/cache: multicore cache modelling

2021-08-03 Thread Mahmoud Mandour
her. 2. Used atomic increment to access hashtable entries instead of locking. 3. Renamed mtx to hashtable_lock to reflect its job more explicitly. 4. Dropped the usage of CoreStats, embedded stats in the cache structure. 4. append_stats_line now takes the stats explicitly. Mahm

[PATCH v5] docs/deprecated: deprecate passing plugin args through `arg=`

2021-08-02 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- v4 -> v5: 1. Mentioned that short-form booleans are still usable but not preferable. docs/system/deprecated.rst | 10 ++ 1 file changed, 10 insertions(+) diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index e2e0090

[PATCH v4 2/2] docs/devel/tcg-plugins: added cores arg to cache plugin

2021-08-02 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- docs/devel/tcg-plugins.rst | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index 7e54f12837..863828809d 100644 --- a/docs/devel/tcg-plugins.rst +++ b/docs/devel/tcg

[PATCH v4 1/2] plugins/cache: supported multicore cache modelling

2021-08-02 Thread Mahmoud Mandour
cores, they'll thrash each other Signed-off-by: Mahmoud Mandour --- contrib/plugins/cache.c | 154 +++- 1 file changed, 119 insertions(+), 35 deletions(-) diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index 066ea6d8ec..971569cc9d 100644

[PATCH v4 0/2] plugins/cache: multicore cache modelling

2021-08-02 Thread Mahmoud Mandour
ent master. 2. Dropped the patches that were already merged. Mahmoud Mandour (2): plugins/cache: supported multicore cache modelling docs/devel/tcg-plugins: added cores arg to cache plugin contrib/plugins/cache.c| 154 - docs/devel/tcg-plugins.rst |

[PATCH v4 10/13] tests/plugins/insn: made arg inline not positional and parse it as bool

2021-07-30 Thread Mahmoud Mandour
Made argument "inline" not positional, this has two benefits. First is that we adhere to how QEMU passes args generally, by taking the last value of an argument and drop the others. And the second is that this sets up a framework for potentially adding new args easily. Signed-off-b

[PATCH v4 13/13] docs/deprecated: deprecate passing plugin args through `arg=`

2021-07-30 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- docs/system/deprecated.rst | 7 +++ 1 file changed, 7 insertions(+) diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index e2e0090878..7ae6f1f727 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -126,6 +126,13

[PATCH v4 09/13] tests/plugins/bb: adapt to the new arg passing scheme

2021-07-30 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour Reviewed-by: Alex Bennée --- tests/plugin/bb.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/plugin/bb.c b/tests/plugin/bb.c index de09bdde4e..7d470a1011 100644 --- a/tests/plugin/bb.c +++ b/tests/plugin/bb.c @@ -104,10

[PATCH v4 12/13] tests/plugins/syscalls: adhere to new arg-passing scheme

2021-07-30 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour Reviewed-by: Alex Bennée --- tests/plugin/syscall.c | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/tests/plugin/syscall.c b/tests/plugin/syscall.c index 6dd71092e1..484b48de49 100644 --- a/tests/plugin/syscall.c +++ b

[PATCH v4 08/13] docs/tcg-plugins: new passing parameters scheme for cache docs

2021-07-30 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour Reviewed-by: Alex Bennée --- docs/devel/tcg-plugins.rst | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index 9377bc51d8..7b1a3921b6 100644 --- a/docs/devel/tcg

[PATCH v4 11/13] tests/plugins/mem: introduce "track" arg and make args not positional

2021-07-30 Thread Mahmoud Mandour
rguments not positional and we only care about the last value specified for a certain argument. callback/inline args are now supplied separately as bool arguments so that both can be enabled individually. Signed-off-by: Mahmoud Mandour Reviewed-by: Alex Bennée --- tests/plugin/mem.c | 47 +

[PATCH v4 06/13] plugins/hwprofile: adapt to the new plugin arguments scheme

2021-07-30 Thread Mahmoud Mandour
ch" argument. Signed-off-by: Mahmoud Mandour --- contrib/plugins/hwprofile.c | 39 + docs/devel/tcg-plugins.rst | 8 2 files changed, 31 insertions(+), 16 deletions(-) diff --git a/contrib/plugins/hwprofile.c b/contrib/plugins/hwprofile.c index

[PATCH v4 07/13] plugins/howvec: adapting to the new argument passing scheme

2021-07-30 Thread Mahmoud Mandour
Correctly parsing plugin argument since they now must be provided as full-form boolean parameters, e.g.: -plugin ./contrib/plugins/libhowvec.so,verbose=on,inline=on Also, introduced the argument "count" that accepts one opt to count individually at a time. Signed-off-by: Mahmo

[PATCH v4 04/13] plugins/hotblocks: Added correct boolean argument parsing

2021-07-30 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour Reviewed-by: Alex Bennée --- contrib/plugins/hotblocks.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c index 4b08340143..062200a7a4 100644 --- a/contrib/plugins

[PATCH v4 02/13] plugins/api: added a boolean parsing plugin api

2021-07-30 Thread Mahmoud Mandour
This call will help boolean argument parsing since arguments are now passed to plugins as a name and value. Signed-off-by: Mahmoud Mandour --- include/qemu/qemu-plugin.h | 13 + plugins/api.c | 5 + 2 files changed, 18 insertions(+) diff --git a/include/qemu/qemu

[PATCH v4 05/13] plugins/lockstep: make socket path not positional & parse bool arg

2021-07-30 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour Reviewed-by: Alex Bennée --- contrib/plugins/lockstep.c | 31 ++- docs/devel/tcg-plugins.rst | 2 +- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c index

[PATCH v4 03/13] plugins/hotpages: introduce sortby arg and parsed bool args correctly

2021-07-30 Thread Mahmoud Mandour
Since plugin arguments now expect boolean arguments, a plugin argument name "sortby" now expects a value of "read", "write", or "address". "io" arg is now expected to be passed as a full-form boolean parameter, i.e. "io=on|true|yes|off|false

[PATCH v4 01/13] plugins: allow plugin arguments to be passed directly

2021-07-30 Thread Mahmoud Mandour
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 M

[PATCH v4 00/13] new plugin argument passing scheme

2021-07-30 Thread Mahmoud Mandour
hes. v2 -> v3: 1. Protected calling `qapi_bool_parse` by ensuring name & value are not NULL. 2. Updated the docs for the hotpages plugin to include its arguments 3. Typo in tests/plugins/mem (hadrr -> haddr) 4. Reword the deprecation entry in deprecated.rst Mahmoud M

Re: [PATCH v3 00/13] new plugin argument passing scheme

2021-07-23 Thread Mahmoud Mandour
On Thu, Jul 22, 2021 at 9:12 AM Mahmoud Mandour wrote: > Hello, > > This series removes passing arguments to plugins through "arg=" since > it's redundant and reduces readability especially when the argument > itself is composed of a name and a value. > > Also,

[PATCH v3 13/13] docs/deprecated: deprecate passing plugin args through `arg=`

2021-07-22 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- docs/system/deprecated.rst | 7 +++ 1 file changed, 7 insertions(+) diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index e2e0090878..7ae6f1f727 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -126,6 +126,13

[PATCH v3 10/13] tests/plugins/insn: made arg inline not positional and parse it as bool

2021-07-22 Thread Mahmoud Mandour
Made argument "inline" not positional, this has two benefits. First is that we adhere to how QEMU passes args generally, by taking the last value of an argument and drop the others. And the second is that this sets up a framework for potentially adding new args easily. Signed-off-b

[PATCH v3 08/13] docs/tcg-plugins: new passing parameters scheme for cache docs

2021-07-22 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- docs/devel/tcg-plugins.rst | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index 9377bc51d8..7b1a3921b6 100644 --- a/docs/devel/tcg-plugins.rst +++ b/docs/devel/tcg

[PATCH v3 07/13] plugins/howvec: Adapting to the new argument passing scheme.

2021-07-22 Thread Mahmoud Mandour
Correctly parsing plugin argument since they now must be provided as full-form boolean parameters, e.g.: -plugin ./contrib/plugins/libhowvec.so,verbose=on,inline=on Also, introduced the argument "count" that accepts one opt to count individually at a time. Signed-off-by: Mahmo

[PATCH v3 09/13] tests/plugins/bb: adapt to the new arg passing scheme

2021-07-22 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- tests/plugin/bb.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/plugin/bb.c b/tests/plugin/bb.c index de09bdde4e..7d470a1011 100644 --- a/tests/plugin/bb.c +++ b/tests/plugin/bb.c @@ -104,10 +104,17

[PATCH v3 03/13] plugins/hotpages: introduce sortby arg and parsed bool args correctly

2021-07-22 Thread Mahmoud Mandour
Since plugin arguments now expect boolean arguments, a plugin argument name "sortby" now expects a value of "read", "write", or "address". "io" arg is now expected to be passed as a full-form boolean parameter, i.e. "io=on|true|yes|off|

[PATCH v3 06/13] plugins/hwprofile: adapt to the new plugin arguments scheme

2021-07-22 Thread Mahmoud Mandour
ch" argument. Signed-off-by: Mahmoud Mandour --- contrib/plugins/hwprofile.c | 39 + docs/devel/tcg-plugins.rst | 8 2 files changed, 31 insertions(+), 16 deletions(-) diff --git a/contrib/plugins/hwprofile.c b/contrib/plugins/hwprofile.c index

[PATCH v3 05/13] plugins/lockstep: make socket path not positional & parse bool arg

2021-07-22 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- contrib/plugins/lockstep.c | 31 ++- docs/devel/tcg-plugins.rst | 2 +- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c index 7fd35eb669..a41ffe83fa 100644

[PATCH v3 12/13] tests/plugins/syscalls: adhere to new arg-passing scheme

2021-07-22 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- tests/plugin/syscall.c | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/tests/plugin/syscall.c b/tests/plugin/syscall.c index 6dd71092e1..484b48de49 100644 --- a/tests/plugin/syscall.c +++ b/tests/plugin/syscall.c

[PATCH v3 01/13] plugins: allow plugin arguments to be passed directly

2021-07-22 Thread Mahmoud Mandour
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 Mandou

[PATCH v3 02/13] plugins/api: added a boolean parsing plugin api

2021-07-22 Thread Mahmoud Mandour
This call will help boolean argument parsing since arguments are now passed to plugins as a name and value. Signed-off-by: Mahmoud Mandour --- include/qemu/qemu-plugin.h | 13 + plugins/api.c | 5 + 2 files changed, 18 insertions(+) diff --git a/include/qemu/qemu

[PATCH v3 11/13] tests/plugins/mem: introduce "track" arg and make args not positional

2021-07-22 Thread Mahmoud Mandour
rguments not positional and we only care about the last value specified for a certain argument. callback/inline args are now supplied separately as bool arguments so that both can be enabled individually. Signed-off-by: Mahmoud Mandour --- tests/plugin/mem.c | 47 ++

[PATCH v3 04/13] plugins/hotblocks: Added correct boolean argument parsing

2021-07-22 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- contrib/plugins/hotblocks.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c index 4b08340143..062200a7a4 100644 --- a/contrib/plugins/hotblocks.c +++ b/contrib/plugins

[PATCH v3 00/13] new plugin argument passing scheme

2021-07-22 Thread Mahmoud Mandour
eed review: plugins/api: added a boolean parsing plugin api docs/deprecated: deprecate passing plugin args through `arg=` v2 -> v3: 1. Protected calling `qapi_bool_parse` by ensuring name & value are not NULL. 2. Updated the docs for the hotpages plugin to include its

[PATCH v3 3/5] plugins/cache: Supported multicore cache modelling

2021-07-22 Thread Mahmoud Mandour
cores, they'll thrash each other Signed-off-by: Mahmoud Mandour --- contrib/plugins/cache.c | 154 +++- 1 file changed, 119 insertions(+), 35 deletions(-) diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index 695fb969dc..496d6e7d49 100644

[PATCH v3 2/5] plugins/cache: limited the scope of a mutex lock

2021-07-22 Thread Mahmoud Mandour
It's not necessary to lock the address translation portion of the vcpu_mem_access callback. Signed-off-by: Mahmoud Mandour --- contrib/plugins/cache.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index 4a71602639

[PATCH v3 0/5] plugins/cache: multicore cache modelling and minor tweaks

2021-07-22 Thread Mahmoud Mandour
ormance data as a post-processing step. 3. Refactored appending core data to it's own function Mahmoud Mandour (5): plugins/cache: Fixed a bug with destroying FIFO metadata plugins/cache: limited the scope of a mutex lock plugins/cache: Supported multicore cache modelling docs/devel/tcg-pl

[PATCH v3 5/5] plugins/cache: Fixed "function decl. is not a prototype" warnings

2021-07-22 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- contrib/plugins/cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index 496d6e7d49..cc9020b2d5 100644 --- a/contrib/plugins/cache.c +++ b/contrib/plugins/cache.c @@ -535,7 +535,7

[PATCH v3 4/5] docs/devel/tcg-plugins: added cores arg to cache plugin

2021-07-22 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- docs/devel/tcg-plugins.rst | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index 595b8e0ea4..370c11373f 100644 --- a/docs/devel/tcg-plugins.rst +++ b/docs/devel/tcg

[PATCH v3 1/5] plugins/cache: Fixed a bug with destroying FIFO metadata

2021-07-22 Thread Mahmoud Mandour
This manifests itself when associativity degree is greater than the number of sets and FIFO is used, otherwise it's also a memory leak whenever FIFO was used. Signed-off-by: Mahmoud Mandour --- contrib/plugins/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib

[PATCH v2 5/5] plugins/cache: Fixed "function decl. is not a prototype" warnings

2021-07-21 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- contrib/plugins/cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index 496d6e7d49..cc9020b2d5 100644 --- a/contrib/plugins/cache.c +++ b/contrib/plugins/cache.c @@ -535,7 +535,7

[PATCH v2 4/5] docs/devel/tcg-plugins: added cores arg to cache plugin

2021-07-21 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- docs/devel/tcg-plugins.rst | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index 595b8e0ea4..370c11373f 100644 --- a/docs/devel/tcg-plugins.rst +++ b/docs/devel/tcg

plugins/cache: multicore cache modelling and minor tweaks

2021-07-21 Thread Mahmoud Mandour
ere) 2. Summed cache performance data as a post-processing step. 3. Refactored appending core data to it's own function Mahmoud Mandour (5): plugins/cache: Fixed a bug with destroying FIFO metadata plugins/cache: limited the scope of a mutex lock plugins/cache: Supported multicore ca

[PATCH v2 3/5] plugins/cache: Supported multicore cache modelling

2021-07-21 Thread Mahmoud Mandour
cores, they'll thrash each other Signed-off-by: Mahmoud Mandour --- contrib/plugins/cache.c | 154 +++- 1 file changed, 119 insertions(+), 35 deletions(-) diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index 695fb969dc..496d6e7d49 100644

[PATCH v2 2/5] plugins/cache: limited the scope of a mutex lock

2021-07-21 Thread Mahmoud Mandour
It's not necessary to lock the address translation portion of the vcpu_mem_access callback. Signed-off-by: Mahmoud Mandour --- contrib/plugins/cache.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index 4a71602639

[PATCH v2 1/5] plugins/cache: Fixed a bug with destroying FIFO metadata

2021-07-21 Thread Mahmoud Mandour
This manifests itself when associativity degree is greater than the number of sets and FIFO is used, otherwise it's also a memory leak whenever FIFO was used. Signed-off-by: Mahmoud Mandour --- contrib/plugins/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib

Re: [RFC PATCH] tcg/plugins: implement a qemu_plugin_user_exit helper

2021-07-20 Thread Mahmoud Mandour
reat to me and I cannot reproduce the race with it installed in. With calling `qemu_plugin_disable_mem_helpers`: Reviewed-by: Mahmoud Mandour --- > include/qemu/plugin.h | 12 > include/qemu/qemu-plugin.h | 13 + > bsd-user/syscall.c | 6 +++--- >

Re: [PATCH 3/6] plugins/cache: Fixed a use-after-free bug with multithreaded usermode

2021-07-19 Thread Mahmoud Mandour
On Mon, Jul 19, 2021 at 1:08 PM Alex Bennée wrote: > > Mahmoud Mandour writes: > > > On Mon, Jul 19, 2021 at 11:48 AM Alex Bennée > wrote: > > > > Mahmoud Mandour writes: > > > > > Since callbacks may be interleaved because of multithreaded exe

Re: [PATCH 3/6] plugins/cache: Fixed a use-after-free bug with multithreaded usermode

2021-07-19 Thread Mahmoud Mandour
On Mon, Jul 19, 2021 at 11:48 AM Alex Bennée wrote: > > Mahmoud Mandour writes: > > > Since callbacks may be interleaved because of multithreaded execution, > > we should not make assumptions about `plugin_exit` either. The problem > > with `plugin_exit` is that it f

Re: [PATCH 00/13] new plugin argument passing scheme

2021-07-17 Thread Mahmoud Mandour
On Sat, Jul 17, 2021, 15:31 Alex Bennée wrote: > > Mahmoud Mandour writes: > > > Hello, > > > > This series removes passing arguments to plugins through "arg=" since > > it's redundant and reduces readability especially when the argument > > i

[PATCH 05/13] plugins/lockstep: make socket path not positional & parse bool arg

2021-07-17 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- contrib/plugins/lockstep.c | 31 ++- docs/devel/tcg-plugins.rst | 2 +- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c index 7fd35eb669..a41ffe83fa 100644

[PATCH 13/13] docs/deprecated: deprecate passing plugin args through `arg=`

2021-07-17 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- docs/system/deprecated.rst | 6 ++ 1 file changed, 6 insertions(+) diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index e2e0090878..aaf0ee5777 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -126,6 +126,12

[PATCH 04/13] plugins/hotblocks: Added correct boolean argument parsing

2021-07-17 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- contrib/plugins/hotblocks.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c index 4b08340143..062200a7a4 100644 --- a/contrib/plugins/hotblocks.c +++ b/contrib/plugins

[PATCH 09/13] tests/plugins/bb: adapt to the new arg passing scheme

2021-07-17 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- tests/plugin/bb.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/plugin/bb.c b/tests/plugin/bb.c index de09bdde4e..7d470a1011 100644 --- a/tests/plugin/bb.c +++ b/tests/plugin/bb.c @@ -104,10 +104,17

[PATCH 08/13] docs/tcg-plugins: new passing parameters scheme for cache docs

2021-07-17 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- docs/devel/tcg-plugins.rst | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index 4ab9dc4bb1..be1256d50c 100644 --- a/docs/devel/tcg-plugins.rst +++ b/docs/devel/tcg

[PATCH 07/13] plugins/howvec: Adapting to the new argument passing scheme.

2021-07-17 Thread Mahmoud Mandour
Correctly parsing plugin argument since they now must be provided as full-form boolean parameters, e.g.: -plugin ./contrib/plugins/libhowvec.so,verbose=on,inline=on Also, introduced the argument "count" that accepts one opt to count individually at a time. Signed-off-by: Mahmo

[PATCH 11/13] tests/plugins/mem: introduce "track" arg and make args not positional

2021-07-17 Thread Mahmoud Mandour
rguments not positional and we only care about the last value specified for a certain argument. callback/inline args are now supplied separately as bool arguments so that both can be enabled individually. Signed-off-by: Mahmoud Mandour --- tests/plugin/mem.c | 47 ++

[PATCH 10/13] tests/plugins/insn: made arg inline not positional and parse it as bool

2021-07-17 Thread Mahmoud Mandour
Made argument "inline" not positional, this has two benefits. First is that we adhere to how QEMU passes args generally, by taking the last value of an argument and drop the others. And the second is that this sets up a framework for potentially adding new args easily. Signed-off-b

[PATCH 03/13] plugins/hotpages: introduce sortby arg and parsed bool args correctly

2021-07-17 Thread Mahmoud Mandour
Since plugin arguments now expect boolean arguments, a plugin argument name "sortby" now expects a value of "read", "write", or "address". "io" arg is now expected to be passed as a full-form boolean parameter, i.e. "io=on|true|yes|off|

[PATCH 02/13] plugins/api: added a boolean parsing plugin api

2021-07-17 Thread Mahmoud Mandour
This call will help boolean argument parsing since arguments are now passed to plugins as a name and value. Signed-off-by: Mahmoud Mandour --- include/qemu/qemu-plugin.h | 13 + plugins/api.c | 5 + 2 files changed, 18 insertions(+) diff --git a/include/qemu/qemu

[PATCH 12/13] tests/plugins/syscalls: adhere to new arg-passing scheme

2021-07-17 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- tests/plugin/syscall.c | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/tests/plugin/syscall.c b/tests/plugin/syscall.c index 6dd71092e1..484b48de49 100644 --- a/tests/plugin/syscall.c +++ b/tests/plugin/syscall.c

[PATCH 00/13] new plugin argument passing scheme

2021-07-17 Thread Mahmoud Mandour
arguements in howvec Based-on: <20210714172151.8494-1-ma.mando...@gmail.com> However, the dependency is so light and it should only be in the patch docs/tcg-plugins: new passing parameters scheme for cache docs where it depends on docs/devel/tcg-plugins: added cores arg to cache pl

[PATCH 06/13] plugins/hwprofile: adapt to the new plugin arguments scheme

2021-07-17 Thread Mahmoud Mandour
ch" argument. Signed-off-by: Mahmoud Mandour --- contrib/plugins/hwprofile.c | 39 + docs/devel/tcg-plugins.rst | 8 2 files changed, 31 insertions(+), 16 deletions(-) diff --git a/contrib/plugins/hwprofile.c b/contrib/plugins/hwprofile.c index

[PATCH 01/13] plugins: allow plugin arguments to be passed directly

2021-07-17 Thread Mahmoud Mandour
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 Mandou

Re: [PATCH 0/9] new plugin argument passing scheme

2021-07-16 Thread Mahmoud Mandour
On Fri, Jul 16, 2021 at 10:04 AM Mahmoud Mandour wrote: > Hello, > > This series removes passing arguments to plugins through "arg=" since > it's redundant and reduces readability especially when the argument > itself is composed of a name and a value. > > Also,

[PATCH 7/9] plugins/howvec: Adapting to the new argument passing scheme.

2021-07-16 Thread Mahmoud Mandour
Correctly parsing plugin argument since they now must be provided as full-form boolean parameters, e.g.: -plugin ./contrib/plugins/libhowvec.so,verbose=on,inline=on Also, introduced the argument "count" that accepts one opt to count individually at a time. Signed-off-by: Mahmo

[PATCH 6/9] plugins/hwprofile: adapt to the new plugin arguments scheme

2021-07-16 Thread Mahmoud Mandour
ch" argument. Signed-off-by: Mahmoud Mandour --- contrib/plugins/hwprofile.c | 39 + docs/devel/tcg-plugins.rst | 8 2 files changed, 31 insertions(+), 16 deletions(-) diff --git a/contrib/plugins/hwprofile.c b/contrib/plugins/hwprofile.c index

[PATCH 9/9] docs/deprecated: deprecate passing plugin args through `arg=`

2021-07-16 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- docs/system/deprecated.rst | 6 ++ 1 file changed, 6 insertions(+) diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index e2e0090878..aaf0ee5777 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -126,6 +126,12

[PATCH 5/9] plugins/lockstep: make socket path not positional & parse bool arg

2021-07-16 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- contrib/plugins/lockstep.c | 31 ++- docs/devel/tcg-plugins.rst | 2 +- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c index 7fd35eb669..a41ffe83fa 100644

[PATCH 8/9] docs/tcg-plugins: new passing parameters scheme for cache docs

2021-07-16 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- docs/devel/tcg-plugins.rst | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index 4ab9dc4bb1..be1256d50c 100644 --- a/docs/devel/tcg-plugins.rst +++ b/docs/devel/tcg

[PATCH 3/9] plugins/hotpages: introduce sortby arg and parsed bool args correctly

2021-07-16 Thread Mahmoud Mandour
Since plugin arguments now expect boolean arguments, a plugin argument name "sortby" now expects a value of "read", "write", or "address". "io" arg is now expected to be passed as a full-form boolean parameter, i.e. "io=on|true|yes|off|

[PATCH 4/9] plugins/hotblocks: Added correct boolean argument parsing

2021-07-16 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- contrib/plugins/hotblocks.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c index 4b08340143..062200a7a4 100644 --- a/contrib/plugins/hotblocks.c +++ b/contrib/plugins

[PATCH 2/9] plugins/api: added a boolean parsing plugin api

2021-07-16 Thread Mahmoud Mandour
This call will help boolean argument parsing since arguments are now passed to plugins as a name and value. Signed-off-by: Mahmoud Mandour --- include/qemu/qemu-plugin.h | 13 + plugins/api.c | 5 + 2 files changed, 18 insertions(+) diff --git a/include/qemu/qemu

[PATCH 0/9] new plugin argument passing scheme

2021-07-16 Thread Mahmoud Mandour
"arg" and it's a boolean parameter. (will be passed to plugin as "arg=on") The docs are updated accordingly and a deprecation notice is put in the deprecated.rst file. Mahmoud Mandour (9): plugins: allow plugin arguments to be passed directly plugins/api: add

[PATCH 1/9] plugins: allow plugin arguments to be passed directly

2021-07-16 Thread Mahmoud Mandour
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 Mandou

Re: [PATCH v2 20/21] contrib/gitdm: add a new interns group-map for GSoC/Outreachy work

2021-07-15 Thread Mahmoud Mandour
On Wed, Jul 14, 2021 at 8:28 PM Alex Bennée wrote: > It makes sense to put our various interns in a group so we can see the > overall impact of GSoC and Outreachy on the project. > > Signed-off-by: Alex Bennée > Cc: Ahmed Karaman > Cc: Mahmoud Mandour > Cc: César

[PATCH 6/6] plugins/cache: Fixed "function decl. is not a prototype" warnings

2021-07-14 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- contrib/plugins/cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index 60f7be208b..f82a8310dc 100644 --- a/contrib/plugins/cache.c +++ b/contrib/plugins/cache.c @@ -541,7 +541,7

[PATCH 4/6] plugins/cache: Supported multicore cache modelling

2021-07-14 Thread Mahmoud Mandour
cores, they'll thrash each other Signed-off-by: Mahmoud Mandour --- contrib/plugins/cache.c | 156 ++-- 1 file changed, 117 insertions(+), 39 deletions(-) diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index a452aba01c..60f7be208b 100644

[PATCH 5/6] docs/devel/tcg-plugins: added cores arg to cache plugin

2021-07-14 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- docs/devel/tcg-plugins.rst | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index 595b8e0ea4..370c11373f 100644 --- a/docs/devel/tcg-plugins.rst +++ b/docs/devel/tcg

[PATCH 2/6] plugins/cache: limited the scope of a mutex lock

2021-07-14 Thread Mahmoud Mandour
It's not necessary to lock the address translation portion of the vcpu_mem_access callback. Signed-off-by: Mahmoud Mandour --- contrib/plugins/cache.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index 4a71602639

[PATCH 3/6] plugins/cache: Fixed a use-after-free bug with multithreaded usermode

2021-07-14 Thread Mahmoud Mandour
are freed, and if so, immediately exit. It's okay to immediately exit and don't account for those callbacks since they won't be accounted for anyway since `plugin_exit` is already called once and reported the statistics. Signed-off-by: Mahmoud Mandour --- contrib/plugins/cache.c | 31

[PATCH 1/6] plugins/cache: Fixed a bug with destroying FIFO metadata

2021-07-14 Thread Mahmoud Mandour
This manifests itself when associativity degree is greater than the number of sets and FIFO is used, otherwise it's also a memory leak whenever FIFO was used. Signed-off-by: Mahmoud Mandour --- contrib/plugins/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib

[PATCH 0/6] plugins/cache: multicore cache emulation and minor

2021-07-14 Thread Mahmoud Mandour
that callbacks can check whether plugin_exit has been called already or not. Also, raising the levels of warnings (by the time this is sent, it's not yet upstreamed but it's in the process of getting merged) induced some warnings, this is fixed in its own patch. Mahmoud Mandour (6): plugins/cache: Fixed

[PATCH v5] MAINTAINERS: Added myself as a reviewer for TCG Plugins

2021-07-07 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 5f55404f2f..1c4970c88b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2966,6 +2966,7 @@ F: include/tcg/ TCG Plugins M: Alex Bennée +R: Mahmoud Mandour S

[PATCH v5] docs/devel: Added cache plugin to the plugins docs

2021-06-27 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- v4 -> v5: Fixed the illustrated command since it has path problems... docs/devel/tcg-plugins.rst | 59 ++ 1 file changed, 59 insertions(+) diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst in

  1   2   3   >