On 14/06/2021 11:01, Alexandre Iooss wrote:
Log instruction execution and memory access to a file.
This plugin can be used for reverse engineering or for side-channel analysis
using QEMU.
Signed-off-by: Alexandre Iooss
---
MAINTAINERS | 1 +
contrib/plugins/Makefile | 1
ot; arguments and sticked to the last
one.
Alex Bennée (1):
plugins/api: expose symbol lookup to plugins
Mahmoud Mandour (3):
plugins: Added a new cache modelling plugin.
plugins/cache: Enabled cache parameterization
plugins/cache: Added FIFO and LRU eviction policies.
contrib/plugins/Mak
-by: Alex Bennée
Message-Id: <20210601145824.3849-1-alex.ben...@linaro.org>
Signed-off-by: Mahmoud Mandour
---
include/qemu/qemu-plugin.h | 9 +
plugins/api.c | 6 ++
2 files changed, 15 insertions(+)
diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-pl
Added a cache modelling plugin that uses a static configuration used in
many of the commercial microprocessors and uses random eviction policy.
The purpose of the plugin is to identify the most cache-thrashing
instructions for both instruction cache and data cache.
Signed-off-by: Mahmoud Mandour
Implemented FIFO and LRU eviction policies.
Now one of the three eviction policies can be chosen as an argument. On
not specifying an argument, LRU is used by default.
Signed-off-by: Mahmoud Mandour
---
contrib/plugins/cache.c | 205 +---
1 file changed, 192
Made both icache and dcache configurable through plugin arguments.
Signed-off-by: Mahmoud Mandour
---
contrib/plugins/cache.c | 44 +++--
1 file changed, 42 insertions(+), 2 deletions(-)
diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c
index
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
---
v1 -> v2:
Elaborated some more in the introduction and broken up some
sentences.
Changed the example of bloc
On Wed, Jun 23, 2021 at 2:55 PM Mahmoud Mandour
wrote:
> Signed-off-by: Mahmoud Mandour
> ---
> docs/devel/tcg-plugins.rst | 60 ++
> 1 file changed, 60 insertions(+)
>
> diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst
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
Added a cache modelling plugin that uses a static configuration used in
many of the commercial microprocessors and uses random eviction policy.
The purpose of the plugin is to identify the most cache-thrashing
instructions for both instruction cache and data cache.
Signed-off-by: Mahmoud Mandour
Implemented FIFO and LRU eviction policies. Now one of the three
eviction policies can be chosen as an argument. On not specifying an
argument, LRU is used by default.
Signed-off-by: Mahmoud Mandour
---
contrib/plugins/cache.c | 203 +---
1 file changed, 190
Enabled configuring both icache and dcache parameters using plugin
parameters.
Signed-off-by: Mahmoud Mandour
---
contrib/plugins/cache.c | 47 -
1 file changed, 46 insertions(+), 1 deletion(-)
diff --git a/contrib/plugins/cache.c b/contrib/plugins
Signed-off-by: Mahmoud Mandour
---
docs/devel/tcg-plugins.rst | 60 ++
1 file changed, 60 insertions(+)
diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst
index 18c6581d85..9d90110cbf 100644
--- a/docs/devel/tcg-plugins.rst
+++ b/docs/devel
elf as a reviewer for TCG plugins.
(Ignore if not appropriate of course)
Mahmoud Mandour (5):
plugins: Added a new cache modelling plugin
plugins/cache: Enable cache parameterization
plugins/cache: Added FIFO and LRU eviction policies
docs/devel: Added cache plugin to the plugins d
name". In either case, the
argument is passed to the plugin as only the name, omitting the "=on"
part.
Signed-off-by: Mahmoud Mandour
---
plugins/loader.c | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/plugins/loader.c b/plugins/loader.c
index 05df40
name". In either case, the
argument is passed to the plugin as only the name, omitting the "=on"
part.
Signed-off-by: Mahmoud Mandour
---
plugins/loader.c | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/plugins/loader.c b/plugins/loader.c
index 05df40
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
---
This initial RFC patch reflects the latest version that I have for the
plugin (the multi-core part is not yet reviewed
Added a table-like output which contains the total number of calls
for each used syscall along with the number of errors that occurred.
Per-call tracing is still available through supplying the argument
``print`` to the plugin.
Signed-off-by: Mahmoud Mandour
---
v3 -> v4: Added a miss
CC'ing Emilio
On Sun, May 30, 2021 at 8:37 AM Mahmoud Mandour
wrote:
> Made both icache and dcache configurable through plugin arguments
> and added memory trace printing in a separate file.
>
> Signed-off-by: Mahmoud Mandour
> ---
> contrib/pl
On Tue, Jun 1, 2021 at 1:12 PM Alex Bennée wrote:
>
> Mahmoud Mandour writes:
>
> > Added a cache modelling plugin that uses a static configuration used in
> > many of the commercial microprocessors and uses random eviction policy.
> >
> > Signed-off-by: Mahm
On Sun, May 30, 2021 at 8:37 AM Mahmoud Mandour
wrote:
> Added a cache modelling plugin that uses a static configuration used in
> many of the commercial microprocessors and uses random eviction policy.
>
> Signed-off-by: Mahmoud Mandour
> ---
> contrib/plugins/Makefile
On Tue, Jun 1, 2021 at 1:29 PM Alex Bennée wrote:
>
> (Stefan CC'ed for tracing discussion)
>
> Mahmoud Mandour writes:
>
> > Made both icache and dcache configurable through plugin arguments
> > and added memory trace printing in a separate file.
>
> Please kee
On Sun, May 30, 2021 at 8:37 AM Mahmoud Mandour
wrote:
> Now one of the three eviction policies can be chosen as an argument. On
> not specifying an argument, LRU is used by default.
>
> Signed-off-by: Mahmoud Mandour
> ---
> contrib/plu
On Tue, Jun 1, 2021 at 3:27 PM Alex Bennée wrote:
>
> Mahmoud Mandour writes:
>
> > Now one of the three eviction policies can be chosen as an argument. On
> > not specifying an argument, LRU is used by default.
> >
> > Signed-off-by: Mahmoud Mandour
> >
On Tue, Jun 1, 2021 at 3:32 PM Alex Bennée wrote:
>
> Mahmoud Mandour writes:
>
> > In this RFC patch series, I propose an initial cache modelling TCG
> > plugin. As of now, it models separate L1 data cache and L1 instruction
> > cache. It supports three eviction poli
On Tue, Jun 1, 2021 at 4:58 PM Alex Bennée wrote:
> 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
Added a cache modelling plugin that uses a static configuration used in
many of the commercial microprocessors and uses random eviction policy.
Signed-off-by: Mahmoud Mandour
---
contrib/plugins/Makefile | 1 +
contrib/plugins/cache.c | 398 +++
2 files
Made both icache and dcache configurable through plugin arguments
and added memory trace printing in a separate file.
Signed-off-by: Mahmoud Mandour
---
contrib/plugins/cache.c | 68 +++--
1 file changed, 66 insertions(+), 2 deletions(-)
diff --git a/contrib
In this RFC patch series, I propose an initial cache modelling TCG
plugin. As of now, it models separate L1 data cache and L1 instruction
cache. It supports three eviction policies: LRU, random, and FIFO. Once
a policy is chosen, it's used for both instruction and data caches.
Mahmoud Mandour (3
Now one of the three eviction policies can be chosen as an argument. On
not specifying an argument, LRU is used by default.
Signed-off-by: Mahmoud Mandour
---
contrib/plugins/cache.c | 159
1 file changed, 146 insertions(+), 13 deletions(-)
diff --git
On Sun, May 30, 2021 at 8:37 AM Mahmoud Mandour
wrote:
> In this RFC patch series, I propose an initial cache modelling TCG
> plugin. As of now, it models separate L1 data cache and L1 instruction
> cache. It supports three eviction policies: LRU, random, and FIFO. Once
> a poli
Made both icache and dcache configurable through plugin arguments
and added memory trace printing in a separate file.
Signed-off-by: Mahmoud Mandour
---
contrib/plugins/cache.c | 68 +++--
1 file changed, 66 insertions(+), 2 deletions(-)
diff --git a/contrib
Thank you, I'll also CC Emilio in the v2 of this series.
On Sun, May 30, 2021 at 8:36 AM Philippe Mathieu-Daudé
wrote:
> Cc'ing Emilio too.
>
> On 5/29/21 5:22 PM, Mahmoud Mandour wrote:
> > In this RFC patch series, I propose an initial cache modelling TCG
> > plugin.
Added a cache modelling plugin that uses a static configuration used in
many of the commercial microprocessors and uses random eviction policy.
Signed-off-by: Mahmoud Mandour
---
contrib/plugins/Makefile | 1 +
contrib/plugins/cache.c | 398 +++
2 files
le-free it.
How do I mitigate this? I need to free the InsnData passed to
vcpu_mem_access only once if we find out that it's an IO
access since we do not need it anymore and it will early
return every time.
Mahmoud Mandour (3):
plugins: Added a new cache modelling
Now one of the three eviction policies can be chosen as an argument. On
not specifying an argument, LRU is used by default.
Signed-off-by: Mahmoud Mandour
---
contrib/plugins/cache.c | 159
1 file changed, 146 insertions(+), 13 deletions(-)
diff --git
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
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
On Tue, Apr 27, 2021 at 12:25 PM Dr. David Alan Gilbert
wrote:
> * Mahmoud Mandour (ma.mando...@gmail.com) wrote:
> > Replaced the calls to malloc()/calloc() and their respective
> > calls to free() of iovec structs with GLib's allocation and
> > deallocation functions.
On Tue, Apr 27, 2021 at 1:01 PM Dr. David Alan Gilbert
wrote:
> * Mahmoud Mandour (ma.mando...@gmail.com) wrote:
> > On Tue, Apr 27, 2021 at 12:25 PM Dr. David Alan Gilbert <
> dgilb...@redhat.com>
> > wrote:
> >
> > > * Mahmoud Mandour (ma.mando...@gmail
. Not g_new0()
because the buffer is immediately overwritten using memcpy.
Signed-off-by: Mahmoud Mandour
---
v2 -> v3:
* Removed a wrongful combination of g_autofree and g_steel_pointer().
* Removed some goto paths that IMHO were not so useful any more.
* In v2, I allocated in_sg_cpy thro
On Tue, Apr 27, 2021 at 1:33 PM Dr. David Alan Gilbert
wrote:
> * Mahmoud Mandour (ma.mando...@gmail.com) wrote:
> > On Tue, Apr 27, 2021 at 1:01 PM Dr. David Alan Gilbert <
> dgilb...@redhat.com>
> > wrote:
> >
> > > * Mahmoud Mandour (ma.mando...@gmail.c
Previously, on configuring with --enable-virtiofsd and specifying
a target list that does not contain a full-system emulation target,
a spurious error message is emitted. This patch introduces a
meaningful error message for such case.
Signed-off-by: Mahmoud Mandour
---
tools/meson.build | 4
On Wed, May 5, 2021 at 3:19 PM Alex Bennée wrote:
>
> Mahmoud Mandour writes:
>
> > Added a table-like output which contains the total number of calls
> > for each used syscall along with the number of errors that occurred.
> >
> > Per-call tracing is
On Wed, Apr 28, 2021 at 3:56 PM Connor Kuehl wrote:
> On 4/28/21 8:35 AM, Mahmoud Mandour wrote:
> > Previously, on configuring with --enable-virtiofsd and specifying
> > a target list that does not contain a full-system emulation target,
> > a spurious error message i
On Wed, Apr 28, 2021 at 4:29 PM Connor Kuehl wrote:
> On 4/28/21 9:13 AM, Mahmoud Mandour wrote:
> >> I am not entirely sure if this is true. The error message before this
> >> patch is applied is:
> >>
> >> ../tools/meson.build:12:6
Replaced the allocation and deallocation of fuse_session structs
from calloc() and free() calls to g_try_new0() and g_free().
Signed-off-by: Mahmoud Mandour
---
tools/virtiofsd/fuse_lowlevel.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/virtiofsd
On Wed, Mar 24, 2021 at 2:57 PM Stefan Hajnoczi wrote:
> Please use Reply-All on mailing list emails so that the mailing like and
> all other CC email addresses are included in the discussion.
>
That's my bad, hopefully this won't happen again in the future.
Mahmoud
:23 PM Vladimir Sementsov-Ogievskiy <
vsement...@virtuozzo.com> wrote:
> 11.03.2021 06:15, Mahmoud Mandour wrote:
> > Replaced various qemu_mutex_lock/qemu_mutex_unlock calls with
> > lock guard macros (QEMU_LOCK_GUARD() and WITH_QEMU_LOCK_GUARD).
> > This slightly simplif
at 1:59 PM Christian Schoenebeck <
qemu_...@crudebyte.com> wrote:
> On Donnerstag, 11. März 2021 12:52:45 CET Greg Kurz wrote:
> > On Thu, 11 Mar 2021 11:49:06 +0100
> >
> > Christian Schoenebeck wrote:
> > > On Donnerstag, 11. März 2021 04:15:37 CET Mahmoud Ma
Replaced calls to malloc(), and free() to their equivalent
allocation functions from GLib.
Also added checking for null after ENV_CURVE allocation
following the same pattern of checking on preceeding
table allocations.
Signed-off-by: Mahmoud Mandour
---
hw/audio/fmopl.c | 41
Replaced a malloc() call and its respective free() call with
GLib's g_try_malloc() and g_free(). Also, did slight styling
changes that were producing errors using the checkpatch.pl
script.
Signed-off-by: Mahmoud Mandour
---
util/compatfd.c | 10 +-
1 file changed, 5 insertions(+), 5
Fixed style errors on the relevant lines in which
I will introduce changes.
Signed-off-by: Mahmoud Mandour
---
hw/audio/fmopl.c | 52
1 file changed, 26 insertions(+), 26 deletions(-)
diff --git a/hw/audio/fmopl.c b/hw/audio/fmopl.c
index
Replaced a malloc() call and its respective free() with
GLib's g_try_malloc() and g_free() calls.
Signed-off-by: Mahmoud Mandour
---
tools/virtiofsd/fuse_opt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/virtiofsd/fuse_opt.c b/tools/virtiofsd/fuse_opt.c
index
Replaced the calls to malloc(), realloc(), and free() to their
equivalents in GLib's allocation functions in various places.
Signed-off-by: Mahmoud Mandour
---
bsd-user/elfload.c | 74 +++---
1 file changed, 37 insertions(+), 37 deletions(-)
diff --git
to free().
Mahmoud Mandour (9):
bsd-user/elfload.c: Replaced calls to malloc/free with GLib variants
hw/audio/fmopl.c: Fixing some style errors.
hw/audio/fmopl.c: Replaced calls to malloc with GLib's variants
pc-bios/s390-ccw/netmain.c: Changed a malloc/free to GLib's variants
target/xtensa
Changed a call to malloc() and its respective calls free() with
GLib's allocation and deallocation functions.
Signed-off-by: Mahmoud Mandour
---
pc-bios/s390-ccw/netmain.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pc-bios/s390-ccw/netmain.c b/pc-bios/s390-ccw
Replaced a call to calloc() and its respective free() call
with GLib's g_try_new0() and g_free() calls.
Signed-off-by: Mahmoud Mandour
---
tools/virtiofsd/buffer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/virtiofsd/buffer.c b/tools/virtiofsd/buffer.c
index
established through GLib's functions.
Signed-off-by: Mahmoud Mandour
---
tools/virtiofsd/fuse_lowlevel.c | 30 ++--
tools/virtiofsd/fuse_virtio.c| 34
tools/virtiofsd/passthrough_ll.c | 32 +++---
3 files changed, 48
Replaced the calls to malloc() and their respective calls to
free() with GLib's allocation and deallocation functions.
Signed-off-by: Mahmoud Mandour
---
target/xtensa/xtensa-isa.c | 28 ++--
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/target/xtensa
>
> If it's unrelated, then maybe better do it in a separate patch.
>
I thought so but I didn't know whether it was a so-small change
that it didn't require its own patch or not. I will amend that.
Since this is only a very small allocation, I think it would be better to
> use g_malloc() here
in a healthy system.
Otherwise, the system is already in a critical state.
Subsequently, removed NULL-checking after g_malloc().
Signed-off-by: Mahmoud Mandour
---
util/compatfd.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/util/compatfd.c b/util/compatfd.c
index 174f394533
is already small and its better
if the system aborts on failure of such small allocations.
Mahmoud Mandour (2):
util/compatfd.c: Fixed style issues
util/compatfd.c: Replaced a malloc call with g_malloc.
util/compatfd.c | 14 +-
1 file changed, 5 insertions(+), 9 deletions
Fixed two styling issues that caused checkpatch.pl errors.
Signed-off-by: Mahmoud Mandour
---
util/compatfd.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/util/compatfd.c b/util/compatfd.c
index ee47dd8089..174f394533 100644
--- a/util/compatfd.c
+++ b/util
On Mon, Mar 15, 2021 at 1:13 PM Philippe Mathieu-Daudé
wrote:
> Hi Mahmoud,
>
> On 3/15/21 11:58 AM, Mahmoud Mandour wrote:
> > Replaced a call to malloc() and its respective call to free()
> > with g_malloc() and g_free().
> >
> > g_malloc() is preferred m
On Mon, Mar 15, 2021 at 12:01 PM Stefan Hajnoczi
wrote:
> On Sun, Mar 14, 2021 at 05:23:24AM +0200, Mahmoud Mandour wrote:
> > @@ -130,7 +130,7 @@ static struct fuse_req *fuse_ll_alloc_req(struct
> fuse_session *se)
> > {
> > struct fuse_req *req;
> >
&
Replaced the allocation and deallocation of fuse_req structs
using calloc()/free() call pairs to a GLib's g_try_new0()
and g_free().
Signed-off-by: Mahmoud Mandour
---
tools/virtiofsd/fuse_lowlevel.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/virtiofsd
On Fri, Mar 19, 2021 at 3:25 PM Mahmoud Mandour
wrote:
> Replaced allocations done using malloc(), calloc(), and realloc()
> to their equivalent functions in GLib.
>
> Memory that is allocated locally and freed when the function exits
> are annotated g_autofree so that t
patch had some errors. Also, I thought
that it's better to split the patch into smaller pieces.
The previous patch can be found here:
https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg05153.html
Mahmoud Mandour (8):
virtiofsd: Changed allocations of fuse_req to GLib functions
virtiofds
-by: Mahmoud Mandour
---
tools/virtiofsd/fuse_lowlevel.c | 10 +++---
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/tools/virtiofsd/fuse_lowlevel.c b/tools/virtiofsd/fuse_lowlevel.c
index 45527ff703..b0e9ef29a7 100644
--- a/tools/virtiofsd/fuse_lowlevel.c
+++ b/tools/virtiofsd
Changed allocation of fuse_pollhandle structs to GLib's g_new().
Removed the null checking as allocating such a small memory segment
should always succeed on a healthy system. Otherwise, the system
is already in a critical state.
Signed-off-by: Mahmoud Mandour
---
tools/virtiofsd
Replaced the allocation of local variables from malloc() to
GLib allocation functions.
In one instance, dropped the usage to an assert after a malloc()
call and used g_malloc() instead.
Signed-off-by: Mahmoud Mandour
---
tools/virtiofsd/fuse_virtio.c | 9 -
1 file changed, 4 insertions
Replaced (re)allocation of lo_map_elem structs from realloc() to
GLib's g_try_realloc_n() and replaced the respective free() call
with a g_free().
Signed-off-by: Mahmoud Mandour
---
tools/virtiofsd/passthrough_ll.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools
ucts and
fv_QueueInfo structs.
Signed-off-by: Mahmoud Mandour
---
tools/virtiofsd/fuse_virtio.c | 19 ++-
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c
index 07e5d91a9f..5828b9a76f 100644
--- a/t
to the calling function and still auto-frees the memory when the calling
function finishes (maintaining the symantics of previous code).
Signed-off-by: Mahmoud Mandour
---
tools/virtiofsd/fuse_lowlevel.c | 19 +++
tools/virtiofsd/fuse_virtio.c | 6 +-
2 files changed, 8
Changed the allocations of some local variables to GLib's allocation
functions, such as g_try_malloc0(), and annotated those variables
as g_autofree. Subsequently, I was able to remove the calls to free().
Signed-off-by: Mahmoud Mandour
---
tools/virtiofsd/passthrough_ll.c | 17
l make the
changes again and properly, split the patch, and then send it as a
series regarding this file.
Thanks
Mahmoud Mandour
checks
for the tables
to be dropped. And that's because of the cruciality of this initialization
code.
Can you please elaborate more on how I would employ g_autofree in this
code? Are
you talking about the memory allocated for ``ptr`` in OPLCreate here?
Thanks
Mahmoud Mandour
established through GLib's functions.
Signed-off-by: Mahmoud Mandour
---
tools/virtiofsd/fuse_lowlevel.c | 30 ++--
tools/virtiofsd/fuse_virtio.c| 34
tools/virtiofsd/passthrough_ll.c | 32 +++---
3 files changed, 48
Replaced a call to calloc() and its respective free() call
with GLib's g_try_new0() and g_free() calls.
Signed-off-by: Mahmoud Mandour
---
tools/virtiofsd/buffer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/virtiofsd/buffer.c b/tools/virtiofsd/buffer.c
index
going to resend it (after
amending those problems). Therefore I'm going to exclude this commit.
On Sat, Mar 13, 2021 at 8:50 PM Christian Borntraeger <
borntrae...@de.ibm.com> wrote:
> On 13.03.21 17:36, Mahmoud Mandour wrote:
> > Changed a call to malloc() and its respective calls fre
Replaced calls to malloc(), and free() to their equivalent
allocation functions from GLib.
Also added checking for null after ENV_CURVE allocation
following the same pattern of checking on preceeding
table allocations.
Signed-off-by: Mahmoud Mandour
---
hw/audio/fmopl.c | 42
Replaced the calls to malloc() and their respective calls to
free() with GLib's allocation and deallocation functions.
Removed null checking before calling g_free() because it's
not necessary and generates style errors.
Signed-off-by: Mahmoud Mandour
---
target/xtensa/xtensa-isa.c | 53
Fixed style errors on the relevant lines in which
I will introduce changes.
Signed-off-by: Mahmoud Mandour
---
hw/audio/fmopl.c | 58 ++--
1 file changed, 32 insertions(+), 26 deletions(-)
diff --git a/hw/audio/fmopl.c b/hw/audio/fmopl.c
index
Replaced a malloc() call and its respective free() call with
GLib's g_try_malloc() and g_free().
Also, did slight styling changes that were producing
style errors when using the checkpatch.pl script against
the file.
Signed-off-by: Mahmoud Mandour
---
util/compatfd.c | 10 +-
1 file
Replaced a malloc() call and its respective free() with
GLib's g_try_malloc() and g_free() calls.
Signed-off-by: Mahmoud Mandour
---
tools/virtiofsd/fuse_opt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/virtiofsd/fuse_opt.c b/tools/virtiofsd/fuse_opt.c
index
Replaced the calls to malloc(), realloc(), and free() to their
equivalents in GLib's allocation functions in various places.
Signed-off-by: Mahmoud Mandour
---
bsd-user/elfload.c | 74 +++---
1 file changed, 37 insertions(+), 37 deletions(-)
diff --git
to free().
This series was resent due to some previous problems that are hopefully
resolved in this series.
Mahmoud Mandour (8):
bsd-user/elfload.c: Replaced calls to malloc/free with GLib variants
hw/audio/fmopl.c: Fixing some style errors
hw/audio/fmopl.c: Replaced calls to malloc with GLib's
Replaced some calls to qemu_mutex_lock and their respective
qemu_mutex_unlock calls with QEMU_LOCK_GUARD macro. This simplifies
the code by removing the calls to qemu_mutex_unlock and eliminates
goto paths.
Signed-off-by: Mahmoud Mandour
---
hw/hyperv/vmbus.c | 13 +
1 file changed
Removed various qemu_mutex_lock calls and their respective
qemu_mutex_unlock calls and used QEMU_LOCK_GUARD. This simplifies
the code by eliminating various goto paths and removes
qemu_mutex_unlock calls.
Signed-off-by: Mahmoud Mandour
---
util/filemonitor-inotify.c | 24
Replaced various qemu_mutex_lock calls and their respective
qemu_mutex_unlock calls with QEMU_LOCK_GUARD macro. This simplifies
the code by eliminating the respective qemu_mutex_unlock calls.
Signed-off-by: Mahmoud Mandour
---
migration/migration.c | 6 ++
migration/ram.c | 6
Replaced a call to qemu_mutex_lock and its respective call to
qemu_mutex_unlock and used QEMU_LOCK_GUARD macro in their place.
This simplifies the code by removing the call required to unlock
and also eliminates goto paths.
Signed-off-by: Mahmoud Mandour
---
hw/9pfs/9p-synth.c | 12
In various places, qemu_mutex_lock calls and their respective
calls to qemu_mutex_unlock are replaced with QEMU_LOCK_GUARD macros.
This simplifies the code by removing the calls to
qemu_mutex_unlock and eliminates goto paths.
Signed-off-by: Mahmoud Mandour
---
hw/virtio/virtio-iommu.c | 78
Replaced various qemu_mutex_lock/qemu_mutex_unlock calls with
lock guard macros (QEMU_LOCK_GUARD() and WITH_QEMU_LOCK_GUARD).
This slightly simplifies the code by eliminating calls to
qemu_mutex_unlock and eliminates goto paths.
Signed-off-by: Mahmoud Mandour
---
block/curl.c | 13 ++--
block
Removed a qemu_mutex_lock() and its respective qemu_mutex_unlock()
and used QEMU_LOCK_GUARD instead. This simplifies the code by
eliminiating gotos and removing the qemu_mutex_unlock() calls.
Signed-off-by: Mahmoud Mandour
---
backends/tpm/tpm_emulator.c | 8 +++-
1 file changed, 3
to
qemu_mutex_lock/unlock are a matching pair.
Mahmoud Mandour (9):
tpm: Changed a qemu_mutex_lock to QEMU_LOCK_GUARD
block: Replaced qemu_mutex_lock calls with QEMU_LOCK_GUARD
char: Replaced a qemu_mutex_lock with QEMU_LOCK_GUARD
util: Replaced qemu_mutex_lock with QEMU_LOCK_GUARDs
Removed a pair of qemu_mutex_lock and its respective qemu_mutex_unlock
and used a QEMU_LOCK_GUARD instead. This improves readability by
removing the call to qemu_mutex_unlock.
Signed-off-by: Mahmoud Mandour
---
chardev/char.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git
Removed various qemu_mutex_lock and their respective qemu_mutex_unlock
calls and used lock guard macros (QEMU_LOCK_GUARD and
WITH_QEMU_LOCK_GUARD). This simplifies the code by
eliminating qemu_mutex_unlock calls.
Signed-off-by: Mahmoud Mandour
---
monitor/monitor.c | 8 ++--
monitor/qmp.c
Added a table-like output which contains the total number of calls
for each used syscall along with the number of errors that occurred.
Per-call tracing is still available through supplying the argument
``print`` to the plugin.
Signed-off-by: Mahmoud Mandour
---
tests/plugin/syscall.c | 94
Added a table-like output which contains the total number of calls
for each used syscall along with the number of errors that occurred.
Per-call tracing is still available through supplying the argument
``print`` to the plugin.
Signed-off-by: Mahmoud Mandour
---
v2 -> v3: * Locked shared h
1 - 100 of 217 matches
Mail list logo