[PATCH RFC] hw/misc/pc-testdev: add support for ioregionfd testing

2021-03-01 Thread Elena Afanasova
Signed-off-by: Elena Afanasova --- hw/misc/pc-testdev.c | 74 +++ include/sysemu/kvm.h | 4 +-- linux-headers/linux/kvm.h | 24 + 3 files changed, 100 insertions(+), 2 deletions(-) diff --git a/hw/misc/pc-testdev.c b/hw/misc/pc

[PATCH v2] softmmu/memory: fix memory_region_ioeventfd_equal()

2020-10-19 Thread Elena Afanasova
Eventfd can be registered with a zero length when fast_mmio is true. Handle this case properly when dispatching through QEMU. Signed-off-by: Elena Afanasova --- softmmu/memory.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/softmmu/memory.c b/softmmu/memory.c

[PATCH] accel/kvm: add PIO ioeventfds only in case kvm_eventfds_allowed is true

2020-10-17 Thread Elena Afanasova
Signed-off-by: Stefan Hajnoczi Signed-off-by: Elena Afanasova --- accel/kvm/kvm-all.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 9ef5daf4c5..baaa54249d 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c

[PATCH] softmmu/memory: fix memory_region_ioeventfd_equal()

2020-10-17 Thread Elena Afanasova
Eventfd can be registered with a zero length when fast_mmio is true. Handle this case properly when dispatching through QEMU. Signed-off-by: Elena Afanasova --- softmmu/memory.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/softmmu/memory.c b/softmmu

[PATCH] block/qcow2-cluster: remove dead code

2020-10-15 Thread Elena Afanasova
Since handle_dependencies() returns 0 or -EAGAIN the following case can be removed. Spotted by PVS-Studio. Signed-off-by: Elena Afanasova --- block/qcow2-cluster.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index aa87d3e99b..e2e0db0cc9

Re: [PATCH] hw/net: move allocation to the heap due to very large stack frame

2020-10-14 Thread Elena Afanasova
On Tue, 2020-10-13 at 16:32 +1100, David Gibson wrote: > On Mon, Oct 12, 2020 at 03:45:02PM +0200, Paolo Bonzini wrote: > > On 12/10/20 12:44, Thomas Huth wrote: > > > I think this is one of the tasks from: > > > > > > > > >

[PATCH] hw/scsi: remove dead code

2020-10-12 Thread Elena Afanasova
Since MEGASAS_MAX_SGE is defined to be 128 the following if statement can be removed. Spotted by PVS-Studio. Signed-off-by: Elena Afanasova --- hw/scsi/megasas.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index e24c12d7ee..6dcaad55fa 100644

Re: [PATCH] hw/net: move allocation to the heap due to very large stack frame

2020-10-10 Thread Elena Afanasova
On Sat, 2020-10-10 at 17:07 +1100, David Gibson wrote: > On Fri, Oct 09, 2020 at 07:02:56AM -0700, Elena Afanasova wrote: > > > From 09905773a00e417d3a37c12350d9e55466fdce8a Mon Sep 17 00:00:00 > > > 2001 > > From: Elena Afanasova > > Date: Fri, 9 Oct 2020 06:41

[PATCH] block/blkdebug: fix memory leak

2020-10-09 Thread Elena Afanasova
Spotted by PVS-Studio Signed-off-by: Elena Afanasova --- block/blkdebug.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/blkdebug.c b/block/blkdebug.c index eecbf3e5c4..54da719dd1 100644 --- a/block/blkdebug.c +++ b/block/blkdebug.c @@ -215,6 +215,7 @@ static int add_rule(void

[PATCH] hw/net: move allocation to the heap due to very large stack frame

2020-10-09 Thread Elena Afanasova
>From 09905773a00e417d3a37c12350d9e55466fdce8a Mon Sep 17 00:00:00 2001 From: Elena Afanasova Date: Fri, 9 Oct 2020 06:41:36 -0700 Subject: [PATCH] hw/net: move allocation to the heap due to very large stack frame Signed-off-by: Elena Afanasova --- hw/net/spapr_llan.c | 5 +++-- 1 f

[PATCH v2] bsd-user/elfload: use g_new/g_malloc

2020-10-07 Thread Elena Afanasova
Signed-off-by: Elena Afanasova --- bsd-user/elfload.c | 88 -- 1 file changed, 30 insertions(+), 58 deletions(-) diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c index 32378af7b2..f1be01c410 100644 --- a/bsd-user/elfload.c +++ b/bsd-user/elfload.c

Re: [PATCH v2] elfload: use g_new/g_malloc and g_autofree

2020-10-06 Thread Elena Afanasova
Since bsd user space emulation doesn't work for me I can only use 'gmake check'... But some tests don't seem to be supported. On Mon, 2020-10-05 at 10:55 +0100, Peter Maydell wrote: > On Sun, 4 Oct 2020 at 13:22, Elena Afanasova > wrote: > > Subject: [PATCH v2] elfload: use g_

Re: [PATCH v2] elfload: use g_new/g_malloc and g_autofree

2020-10-04 Thread Elena Afanasova
Subject: [PATCH v2] elfload: use g_new/g_malloc and g_autofree Signed-off-by: Elena Afanasova --- bsd-user/elfload.c | 79 -- 1 file changed, 14 insertions(+), 65 deletions(-) diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c index 32378af7b2

[PATCH] elfload: use g_new instead of malloc

2020-10-01 Thread Elena Afanasova
Signed-off-by: Elena Afanasova --- bsd-user/elfload.c | 92 +++--- 1 file changed, 30 insertions(+), 62 deletions(-) diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c index 32378af7b2..e10ca54eb7 100644 --- a/bsd-user/elfload.c +++ b/bsd-user/elfload.c

Re: [PATCH] job: delete job_{lock,unlock} functions and replace them with lock guard

2020-09-30 Thread Elena Afanasova
On Tue, 2020-09-29 at 14:04 -0400, John Snow wrote: > On 9/29/20 9:42 AM, Elena Afanasova wrote: > > Signed-off-by: Elena Afanasova > > Hi, can I have a commit message here, please? > > > --- > > job.c | 46 +- >

[PATCH] job: delete job_{lock, unlock} functions and replace them with lock guard

2020-09-29 Thread Elena Afanasova
Signed-off-by: Elena Afanasova --- job.c | 46 +- 1 file changed, 17 insertions(+), 29 deletions(-) diff --git a/job.c b/job.c index 8fecf38960..89ceb53434 100644 --- a/job.c +++ b/job.c @@ -79,16 +79,6 @@ struct JobTxn { * job_enter. */ static