Re: [RFC PATCH 0/6] vhost-user: Shutdown/Flush slave channel properly

2021-03-14 Thread Michael S. Tsirkin
On Mon, Jan 25, 2021 at 01:01:09PM -0500, Vivek Goyal wrote: > Hi, > > We are working on DAX support in virtiofs and have some patches out of > the tree hosted here. > > https://gitlab.com/virtio-fs/qemu/-/commits/virtio-fs-dev ping anyone wants to pick this up and post a non-rfc version? > The

Re: [RFC PATCH 0/6] vhost-user: Shutdown/Flush slave channel properly

2021-03-14 Thread Vivek Goyal
On Sun, Mar 14, 2021 at 06:21:04PM -0400, Michael S. Tsirkin wrote: > On Mon, Jan 25, 2021 at 01:01:09PM -0500, Vivek Goyal wrote: > > Hi, > > > > We are working on DAX support in virtiofs and have some patches out of > > the tree hosted here. > > > > https://gitlab.com/virtio-fs/qemu/-/commits/v

Re: [PATCH v3] fuzz: map all BARs and enable PCI devices

2021-03-14 Thread Philippe Mathieu-Daudé
On 12/21/20 7:12 PM, Alexander Bulekov wrote: > Prior to this patch, the fuzzer found inputs to map PCI device BARs and > enable the device. While it is nice that the fuzzer can do this, it > added significant overhead, since the fuzzer needs to map all the > BARs (regenerating the memory topology)

[PATCH] qtest/libqos/meson: Restrict architecture specific objects

2021-03-14 Thread Philippe Mathieu-Daudé
Various libqos files are architecture specific. Restrict the ARM/PPC/X86 units to their targets. Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/libqos/meson.build | 51 ++ 1 file changed, 34 insertions(+), 17 deletions(-) diff --git a/tests/qtest/libqos/me

[PATCH] fuzz: check machine, before PC-specific code

2021-03-14 Thread Alexander Bulekov
We enumerate PCI devices on PC machines, but this breaks the fuzzer for non-PC machines and architectures. Add checks to avoid this. Reported-by: Philippe Mathieu-Daudé Signed-off-by: Alexander Bulekov --- tests/qtest/fuzz/generic_fuzz.c | 11 --- 1 file changed, 8 insertions(+), 3 dele

Re: [PATCH] fuzz: check machine, before PC-specific code

2021-03-14 Thread Alexander Bulekov
On 210314 1910, Alexander Bulekov wrote: > We enumerate PCI devices on PC machines, but this breaks the fuzzer for > non-PC machines and architectures. Add checks to avoid this. > > Reported-by: Philippe Mathieu-Daudé > Signed-off-by: Alexander Bulekov > --- > tests/qtest/fuzz/generic_fuzz.c |

Re: [PATCH v2 1/3] memory: add a sparse memory device for fuzzing

2021-03-14 Thread Alexander Bulekov
On 210313 1818, Alexander Bulekov wrote: > For testing, it can be useful to simulate an enormous amount of memory > (e.g. 2^64 RAM). This adds an MMIO device that acts as sparse memory. > When something writes a nonzero value to a sparse-mem address, we > allocate a block of memory. This block is k

Re: [PATCH] fuzz: check machine, before PC-specific code

2021-03-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210314231015.29166-1-alx...@bu.edu/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210314231015.29166-1-alx...@bu.edu Subject: [PATCH] fuzz: check machine, before PC-specific co

Re: [PATCH] qtest/libqos/meson: Restrict architecture specific objects

2021-03-14 Thread Alexander Bulekov
On 210314 2353, Philippe Mathieu-Daudé wrote: > Various libqos files are architecture specific. > Restrict the ARM/PPC/X86 units to their targets. > > Signed-off-by: Philippe Mathieu-Daudé > --- I thought qos-test is reused for all the machines, and all the arch checking is done at runtime. Also

[RFC PATCH 0/8] softmmu: Restrict CPU I/O instructions

2021-03-14 Thread Philippe Mathieu-Daudé
An attempt to restrict CPU I/O instructions to targets where it makes sense. If it does, I'll send the next series which restrict the I/O address space to X86/AVR. Based-on: <20210314225308.2582284-1-f4...@amsat.org> Philippe Mathieu-Daudé (8): softmmu/physmem: Rename io_mem_unassigned -> unass

[RFC PATCH 1/8] softmmu/physmem: Rename io_mem_unassigned -> unassigned_mr

2021-03-14 Thread Philippe Mathieu-Daudé
'io_mem_unassigned' memory region is not specific to I/O, rename it using a more generic 'unassigned_mr', matching the '_mr' suffix pattern used in various places in the code base. Signed-off-by: Philippe Mathieu-Daudé --- softmmu/physmem.c | 12 ++-- 1 file changed, 6 insertions(+), 6 d

[RFC PATCH 3/8] target: Introduce TARGET_HAS_IOPORT

2021-03-14 Thread Philippe Mathieu-Daudé
Have target architectures providing CPU access to I/O bus define TARGET_HAS_IOPORT. Signed-off-by: Philippe Mathieu-Daudé --- default-configs/targets/avr-softmmu.mak| 1 + default-configs/targets/i386-softmmu.mak | 1 + default-configs/targets/x86_64-softmmu.mak | 1 + 3 files changed, 3 i

[RFC PATCH 2/8] exec: Extract CPU I/O instructions to "cpu-io.h"

2021-03-14 Thread Philippe Mathieu-Daudé
Not all architectures use an I/O bus. Extract the CPU I/O instruction helpers into a specific unit named cpu-io.c (and its equivalent "cpu-io.h" header). Signed-off-by: Philippe Mathieu-Daudé --- include/exec/cpu-io.h | 30 +++ include/exec/ioport.h | 7 --- hw/i

[RFC PATCH 4/8] qtest/fuzz: Restrict CPU I/O instructions

2021-03-14 Thread Philippe Mathieu-Daudé
Restrict CPU I/O instructions to architectures providing I/O bus. Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/fuzz/generic_fuzz.c | 16 ++-- tests/qtest/fuzz/qtest_wrappers.c | 4 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/tests/qtest/fuzz/gener

[RFC PATCH 6/8] qtest: Restrict CPU I/O instructions

2021-03-14 Thread Philippe Mathieu-Daudé
Restrict CPU I/O instructions to architectures providing I/O bus. Signed-off-by: Philippe Mathieu-Daudé --- softmmu/qtest.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/softmmu/qtest.c b/softmmu/qtest.c index ff253068657..51fe256297a 100644 --- a/softmmu/qtest.c

[RFC PATCH 5/8] qtest/libqos: Restrict CPU I/O instructions

2021-03-14 Thread Philippe Mathieu-Daudé
Restrict CPU I/O instructions to architectures providing I/O bus. Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/libqos/fw_cfg.h | 3 +++ tests/qtest/libqos/fw_cfg.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/tests/qtest/libqos/fw_cfg.h b/tests/qtest/libqos/fw_cfg.h index c6a7

[RFC PATCH 7/8] monitor: Restrict CPU I/O instructions

2021-03-14 Thread Philippe Mathieu-Daudé
Restrict CPU I/O instructions to architectures providing I/O bus. Signed-off-by: Philippe Mathieu-Daudé --- monitor/misc.c | 4 hmp-commands.hx | 2 ++ 2 files changed, 6 insertions(+) diff --git a/monitor/misc.c b/monitor/misc.c index d40c7d5afc0..b59f11433eb 100644 --- a/monitor/misc.c

[RFC PATCH 8/8] softmmu: Restrict CPU I/O instructions

2021-03-14 Thread Philippe Mathieu-Daudé
Restrict CPU I/O instructions to architectures providing I/O bus. Signed-off-by: Philippe Mathieu-Daudé --- softmmu/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/softmmu/meson.build b/softmmu/meson.build index ebf063b8990..3df196917a0 100644 --- a/softmmu/meson.

Re: [PATCH] fuzz: check machine, before PC-specific code

2021-03-14 Thread Philippe Mathieu-Daudé
On 3/15/21 12:13 AM, Alexander Bulekov wrote: > On 210314 1910, Alexander Bulekov wrote: >> We enumerate PCI devices on PC machines, but this breaks the fuzzer for >> non-PC machines and architectures. Add checks to avoid this. >> >> Reported-by: Philippe Mathieu-Daudé >> Signed-off-by: Alexander

Re: [Virtio-fs] [PATCH 2/3] virtiofsd: Convert some functions to return bool

2021-03-14 Thread Vivek Goyal
On Fri, Mar 12, 2021 at 03:10:02PM +0100, Greg Kurz wrote: > Both currently only return 0 or 1. > > Signed-off-by: Greg Kurz Looks good to me. Reviewed-by: Vivek Goyal Vivek > --- > tools/virtiofsd/passthrough_ll.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --gi

Re: [Virtio-fs] [PATCH 3/3] virtiofsd: Don't allow empty filenames

2021-03-14 Thread Vivek Goyal
On Fri, Mar 12, 2021 at 03:10:03PM +0100, Greg Kurz wrote: > POSIX.1-2017 clearly stipulates that empty filenames aren't > allowed ([1] and [2]). Since virtiofsd is supposed to mirror > the host file system hierarchy and the host can be assumed to > be linux, we don't really expect clients to pass

Re: [Virtio-fs] [PATCH 1/3] virtiofsd: Don't allow empty paths in lookup_name()

2021-03-14 Thread Vivek Goyal
On Fri, Mar 12, 2021 at 03:10:01PM +0100, Greg Kurz wrote: > When passed an empty filename, lookup_name() returns the inode of > the parent directory, unless the parent is the root in which case > the st_dev doesn't match and lo_find() returns NULL. This is > because lookup_name() passes AT_EMPTY_P

Re: [PATCH 03/11] hw/avr: Add limited support for avr gpio registers

2021-03-14 Thread Philippe Mathieu-Daudé
On 3/14/21 11:26 AM, Mark Cave-Ayland wrote: > On 13/03/2021 16:54, Philippe Mathieu-Daudé wrote: > >> From: Heecheol Yang >> >> Add some of these features for AVR GPIO: >> >>    - GPIO I/O : PORTx registers >>    - Data Direction : DDRx registers >>    - DDRx toggling : PINx registers >> >> Foll

Re: [PATCH 00/11] AVR patch queue for QEMU 6.0

2021-03-14 Thread Philippe Mathieu-Daudé
On 3/13/21 5:54 PM, Philippe Mathieu-Daudé wrote: > Hi, > > This series contains all the AVR patches I could find on the list. > > Niteesh, I fixed minor issues. Do you mind reviewing on top? > > Pull request planned for Monday if no problem arises. > > Thanks, > > Phil. > > G S Niteesh Babu

[PULL 0/4] AVR patches for 2021-03-15

2021-03-14 Thread Philippe Mathieu-Daudé
The following changes since commit 6157b0e19721aadb4c7fdcfe57b2924af6144b14: Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-6.0-pull-request' into staging (2021-03-14 17:47:49 +) are available in the Git repository at: https://github.com/philmd/qemu.git tags/avr-2021

[PULL 2/4] hw/avr/arduino: List board schematic links

2021-03-14 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Michael Rolnik Message-Id: <20210313165445.2113938-3-f4...@amsat.org> --- hw/avr/arduino.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/hw/avr/arduino.c b/hw/avr/arduin

[PULL 4/4] target/avr: Fix interrupt execution

2021-03-14 Thread Philippe Mathieu-Daudé
From: Ivanov Arkasha Only one interrupt is in progress at the moment. It is only necessary to set to reset interrupt_request after all interrupts have been executed. Signed-off-by: Ivanov Arkasha Message-Id: <20210312164754.18437-1-arkaisp2...@gmail.com> Signed-off-by: Philippe Mathieu-Daudé R

[PULL 1/4] hw/misc/led: Add yellow LED

2021-03-14 Thread Philippe Mathieu-Daudé
Add the yellow "lime" LED. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Michael Rolnik Message-Id: <20210313165445.2113938-2-f4...@amsat.org> --- include/hw/misc/led.h | 1 + hw/misc/led.c | 1 + 2 files changed, 2 insertions(+) diff --git a/includ

[PULL 3/4] target/avr: Fix some comment spelling errors

2021-03-14 Thread Philippe Mathieu-Daudé
From: Lichang Zhao I found that there are many spelling errors in the comments of qemu/target/avr. I used spellcheck to check the spelling errors and found some errors in the folder. Signed-off-by: Lichang Zhao Reviewed-by: David Edmondson Reviewed-by: Philippe Mathieu-Daude Message-Id: <2020

[PATCH] utils: Use fma in qemu_strtosz

2021-03-14 Thread Richard Henderson
Use fma to simulatneously scale and round up fraction. The libm function will always return a properly rounded double precision value, which will eliminate any extra precision the x87 co-processor may give us, which will keep the output predictable vs other hosts. Adding DBL_EPSILON while scaling

Re: [RFC PATCH 4/8] qtest/fuzz: Restrict CPU I/O instructions

2021-03-14 Thread Alexander Bulekov
On 210315 0029, Philippe Mathieu-Daudé wrote: > Restrict CPU I/O instructions to architectures providing > I/O bus. > > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/qtest/fuzz/generic_fuzz.c | 16 ++-- > tests/qtest/fuzz/qtest_wrappers.c | 4 > 2 files changed, 14 inse

Re: [PATCH] fuzz: check machine, before PC-specific code

2021-03-14 Thread Alexander Bulekov
On 210315 0031, Philippe Mathieu-Daudé wrote: > On 3/15/21 12:13 AM, Alexander Bulekov wrote: > > On 210314 1910, Alexander Bulekov wrote: > >> We enumerate PCI devices on PC machines, but this breaks the fuzzer for > >> non-PC machines and architectures. Add checks to avoid this. > >> > >> Reporte

RE: [PATCH v8 27/35] Hexagon (target/hexagon) TCG for instructions with multiple definitions

2021-03-14 Thread Taylor Simpson
> -Original Message- > From: Richard Henderson > Sent: Sunday, March 14, 2021 1:02 PM > To: Taylor Simpson ; qemu-devel@nongnu.org > Cc: phi...@redhat.com; alex.ben...@linaro.org; laur...@vivier.eu; > a...@rev.ng; Brian Cain > Subject: Re: [PATCH v8 27/35] Hexagon (target/hexagon) TCG f

[Bug 1910723] Re: NULL pointer dereference issues in am53c974 SCSI host bus adapter

2021-03-14 Thread Alexander Bulekov
QTest Reproducer for the second: /* * Autogenerated Fuzzer Test Case * * This work is licensed under the terms of the GNU GPL, version 2 or * later. See the COPYING file in the top-level directory. */ #include "qemu/osdep.h" #include "libqos/libqtest.h" /* * cat << EOF | ./qemu-system-i386

[Bug 1910723] Re: NULL pointer dereference issues in am53c974 SCSI host bus adapter

2021-03-14 Thread Alexander Bulekov
QTest Reproducer for the first: /* * Autogenerated Fuzzer Test Case * * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. */ #include "qemu/osdep.h" #include "libqos/libqtest.h" /* * cat << EOF | ./qemu-system-i386

[Bug 1919036] Re: Assertion failure in fifo8_push_all() through am53c974

2021-03-14 Thread Alexander Bulekov
QTest Reproducer: /* * Autogenerated Fuzzer Test Case * * This work is licensed under the terms of the GNU GPL, version 2 or * later. See the COPYING file in the top-level directory. */ #include "qemu/osdep.h" #include "libqos/libqtest.h" /* * cat << EOF | ./qemu-system-i386 -display none

RE: [PATCH v8 29/35] Hexagon (target/hexagon) translation

2021-03-14 Thread Taylor Simpson
> -Original Message- > From: Richard Henderson > Sent: Saturday, March 13, 2021 7:44 PM > To: Taylor Simpson ; qemu-devel@nongnu.org > Cc: phi...@redhat.com; alex.ben...@linaro.org; laur...@vivier.eu; > a...@rev.ng; Brian Cain > Subject: Re: [PATCH v8 29/35] Hexagon (target/hexagon) tran

RE: [PATCH v8 26/35] Hexagon (target/hexagon) TCG generation

2021-03-14 Thread Taylor Simpson
> -Original Message- > From: Richard Henderson > Sent: Saturday, March 13, 2021 7:40 PM > To: Taylor Simpson ; qemu-devel@nongnu.org > Cc: phi...@redhat.com; alex.ben...@linaro.org; laur...@vivier.eu; > a...@rev.ng; Brian Cain > Subject: Re: [PATCH v8 26/35] Hexagon (target/hexagon) TCG

[Bug 1919035] Re: Assertion failure in fifo8_pop_buf() through am53c974

2021-03-14 Thread Alexander Bulekov
QTest reproducer: /* * Autogenerated Fuzzer Test Case * * This work is licensed under the terms of the GNU GPL, version 2 or * later. See the COPYING file in the top-level directory. */ #include "qemu/osdep.h" #include "libqos/libqtest.h" /* * cat << EOF | ./qemu-system-i386 -display none

[Bug 1909247] Re: QEMU: use after free vulnerability in esp_do_dma() in hw/scsi/esp.c

2021-03-14 Thread Alexander Bulekov
Looks the same, or very similar to this one: /* * Autogenerated Fuzzer Test Case * * This work is licensed under the terms of the GNU GPL, version 2 or * later. See the COPYING file in the top-level directory. */ #include "qemu/osdep.h" #include "libqos/libqtest.h" /* * cat << EOF | ./qemu

[Bug 1907909] Re: assertion failure in am53c974

2021-03-14 Thread Alexander Bulekov
It looks like this reproducer triggers the same bug as #1919036, as of 3f8d1885e -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1907909 Title: assertion failure in am53c974 Status in QEMU: New

[Bug 1919036] Re: Assertion failure in fifo8_push_all() through am53c974

2021-03-14 Thread Cheolwoo,Myung
Hello Mark, I tested on fixed version, and checked that it does not trigger the assertion failure. Thanks, - Cheolwoo Myung -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1919036 Title: Assertion

Re: [PULL 00/16] Net patches

2021-03-14 Thread Jason Wang
> 2021年3月14日 下午7:37,Peter Maydell 写道: > > On Fri, 12 Mar 2021 at 06:16, Jason Wang > wrote: >> >> The following changes since commit f4abdf32714d1845b7c01ec136dd2b04c2f7db47: >> >> Merge remote-tracking branch >> 'remotes/stsquad/tags/pull-testing-docs-xen-updat

[PATCH] Hexagon (target/hexagon) translation changes

2021-03-14 Thread Taylor Simpson
Change cpu_ldl_code to translator_ldl Don't end the TB after every packet when HEX_DEBUG is on Make gen_check_store_width a simple call Address feedback from Richard Henderson < Signed-off-by: Taylor Simpson --- target/hexagon/translate.c | 26 +- 1 file changed, 9 inser

[PATCH] Hexagon (target/hexagon) remove unnecessary checks in find_iclass_slots

2021-03-14 Thread Taylor Simpson
Address feedback from Richard Henderson < Signed-off-by: Taylor Simpson --- target/hexagon/iclass.c | 4 1 file changed, 4 deletions(-) diff --git a/target/hexagon/iclass.c b/target/hexagon/iclass.c index 378d8a6..6091286 100644 --- a/target/hexagon/iclass.c +++ b/target/hexagon/iclass.c @

[PATCH] Hexagon (target/hexagon) change DECODE_MAPPED_REG operand name to OPNUM

2021-03-14 Thread Taylor Simpson
Address feedback from Richard Henderson < Signed-off-by: Taylor Simpson --- target/hexagon/decode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/hexagon/decode.c b/target/hexagon/decode.c index c9bacaa..1c9c074 100644 --- a/target/hexagon/decode.c +++ b/target/h

[PATCH] Hexagon (target/hexagon) remove unnecessary semicolons

2021-03-14 Thread Taylor Simpson
Address feedback from Richard Henderson < Signed-off-by: Taylor Simpson --- target/hexagon/gen_tcg.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/hexagon/gen_tcg.h b/target/hexagon/gen_tcg.h index e044dea..a30048e 100644 --- a/target/hexagon/gen_tcg.h +++ b/targ

[PATCH] Hexagon (target/hexagon) TCG generation cleanup

2021-03-14 Thread Taylor Simpson
Simplify TCG generation of hex_reg_written Address feedback from Richard Henderson < Signed-off-by: Taylor Simpson --- target/hexagon/genptr.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/target/hexagon/genptr.c b/target/hexagon/genptr.c index 7481f4c..0ad63f

Re: [PATCH V3 1/8] hw/block/nvme: support namespace detach

2021-03-14 Thread Keqian Zhu
Hi, I don't dig into code logic, just some nit below. On 2021/3/1 0:10, Minwoo Im wrote: > Given that now we have nvme-subsys device supported, we can manage > namespace allocated, but not attached: detached. This patch introduced s/introduced/introduces > a parameter for nvme-ns device named '

[PATCH] Hexagon (target/hexagon) fix typo in comment

2021-03-14 Thread Taylor Simpson
Signed-of-by: Taylor Simpson --- target/hexagon/op_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/hexagon/op_helper.c b/target/hexagon/op_helper.c index 9f19007..7361a07 100644 --- a/target/hexagon/op_helper.c +++ b/target/hexagon/op_helper.c @@ -297,7 +297,7

Re: [PATCH] Hexagon (target/hexagon) fix typo in comment

2021-03-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/1615784115-26559-1-git-send-email-tsimp...@quicinc.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 1615784115-26559-1-git-send-email-tsimp...@quicinc.com Subject: [PATCH] Hexag

Re: [RFC PATCH 4/8] qtest/fuzz: Restrict CPU I/O instructions

2021-03-14 Thread Thomas Huth
On 15/03/2021 00.29, Philippe Mathieu-Daudé wrote: Restrict CPU I/O instructions to architectures providing I/O bus. Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/fuzz/generic_fuzz.c | 16 ++-- tests/qtest/fuzz/qtest_wrappers.c | 4 2 files changed, 14 insertions

Re: [PATCH] utils: Use fma in qemu_strtosz

2021-03-14 Thread Thomas Huth
On 15/03/2021 00.48, Richard Henderson wrote: Use fma to simulatneously scale and round up fraction. The libm function will always return a properly rounded double precision value, which will eliminate any extra precision the x87 co-processor may give us, which will keep the output predictable v

Re: [RFC] nbd: decouple reconnect from drain

2021-03-14 Thread Roman Kagan
On Fri, Mar 12, 2021 at 03:35:25PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 10.03.2021 12:32, Roman Kagan wrote: > > NBD connect coroutine takes an extra in_flight reference as if it's a > > request handler. This prevents drain from completion until the > > connection coroutine is releases the

Re: [PULL 00/16] Net patches

2021-03-14 Thread Thomas Huth
On 14/03/2021 12.37, Peter Maydell wrote: On Fri, 12 Mar 2021 at 06:16, Jason Wang wrote: The following changes since commit f4abdf32714d1845b7c01ec136dd2b04c2f7db47: Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-docs-xen-updates-100321-2' into staging (2021-03-11 16:20

Re: [PATCH v3] multi-process: Initialize variables declared with g_auto*

2021-03-14 Thread Miroslav Rezanina
On Fri, Mar 12, 2021 at 07:21:43PM +0800, Zenghui Yu wrote: > Quote docs/devel/style.rst (section "Automatic memory deallocation"): > > * Variables declared with g_auto* MUST always be initialized, > otherwise the cleanup function will use uninitialized stack memory > > Initialize @name properl

Re: [PATCH] replay: don't wait in run_on_cpu

2021-03-14 Thread Pavel Dovgalyuk
ping On 11.03.2021 10:14, Pavel Dovgalyuk wrote: In record/replay mode waiting for vCPU to execute the task scheduled by run_on_cpu may lead to deadlock, because when run_on_cpu is executed in main_loop (e.g., in loadvm processing) it holds replay mutex. This patch allows running scheduled task

Re: [PATCH] hw/virtio: enable ioeventfd configuring for mmio

2021-03-14 Thread Pavel Dovgalyuk
ping On 24.02.2021 16:33, Pavel Dovgalyuk wrote: This patch adds ioeventfd flag for virtio-mmio configuration. It allows switching ioeventfd on and off. Signed-off-by: Pavel Dovgalyuk --- hw/virtio/virtio-mmio.c | 11 ++- include/hw/virtio/virtio-mmio.h |5 + 2 fi

Re: [PATCH v2] replay: notify CPU on event

2021-03-14 Thread Pavel Dovgalyuk
ping On 16.02.2021 12:34, Pavel Dovgalyuk wrote: This patch enables vCPU notification to wake it up when new async event comes in replay mode. The motivation of this patch is the following. Consider recorded block async event. It is saved into the log with one of the checkpoints. This checkpoin

[PATCH 0/7] block/nbd: decouple reconnect from drain

2021-03-14 Thread Roman Kagan
The reconnection logic doesn't need to stop while in a drained section. Moreover it has to be active during the drained section, as the requests that were caught in-flight with the connection to the server broken can only usefully get drained if the connection is restored. Otherwise such requests

[PATCH 6/7] block/nbd: decouple reconnect from drain

2021-03-14 Thread Roman Kagan
The reconnection logic doesn't need to stop while in a drained section. Moreover it has to be active during the drained section, as the requests that were caught in-flight with the connection to the server broken can only usefully get drained if the connection is restored. Otherwise such requests

[PATCH 3/7] block/nbd: assert attach/detach runs in the proper context

2021-03-14 Thread Roman Kagan
Document (via a comment and an assert) that nbd_client_detach_aio_context and nbd_client_attach_aio_context_bh run in the desired aio_context. Signed-off-by: Roman Kagan --- block/nbd.c | 12 1 file changed, 12 insertions(+) diff --git a/block/nbd.c b/block/nbd.c index 1d8edb5b21..

[PATCH 7/7] block/nbd: stop manipulating in_flight counter

2021-03-14 Thread Roman Kagan
As the reconnect logic no longer interferes with drained sections, it appears unnecessary to explicitly manipulate the in_flight counter. Fixes: 5ad81b4946 ("nbd: Restrict connection_co reentrance") Signed-off-by: Roman Kagan --- block/nbd.c | 6 -- nbd/client.c | 2 -- 2 files changed, 8 d

[PATCH 5/7] block/nbd: better document a case in nbd_co_establish_connection

2021-03-14 Thread Roman Kagan
Cosmetic: adjust the comment and the return value in nbd_co_establish_connection where it's entered while the connection thread is still running. Signed-off-by: Roman Kagan --- block/nbd.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index

[PATCH 2/7] block/nbd: use uniformly nbd_client_connecting_wait

2021-03-14 Thread Roman Kagan
Use nbd_client_connecting_wait uniformly all over the block/nbd.c. While at this, drop the redundant check for nbd_client_connecting_wait in reconnect_delay_timer_init, as all its callsites do this check too. Signed-off-by: Roman Kagan --- block/nbd.c | 34 +++--- 1

Re: [PATCH 5/8] util/compatfd.c: Replaced a malloc with GLib's variant

2021-03-14 Thread Thomas Huth
On 14/03/2021 04.23, Mahmoud Mandour wrote: 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. If it's unrelated, then maybe bet

[PATCH 4/7] block/nbd: transfer reconnection stuff across aio_context switch

2021-03-14 Thread Roman Kagan
Make varios pieces of reconnection logic correctly survive the transition of the BDRVNBDState from one aio_context to another. In particular, - cancel the reconnect_delay_timer and rearm it in the new context; - cancel the sleep of the connection_co between reconnect attempt so that it continue

[PATCH 1/7] block/nbd: avoid touching freed connect_thread

2021-03-14 Thread Roman Kagan
When the NBD connection is being torn down, the connection thread gets canceled and "detached", meaning it is about to get freed. If this happens while the connection coroutine yielded waiting for the connection thread to complete, when it resumes it may access the invalidated connection thread da

Re: [PATCH v3] multi-process: Initialize variables declared with g_auto*

2021-03-14 Thread Zenghui Yu
On 2021/3/15 13:48, Miroslav Rezanina wrote: Missing declaration without initialization in hw/s390x/s390-pci-vfio.c othwerwise correct. Will you send v4 with missing initialization or should I send then as another patch? I'd prefer the latter so that subsystem maintainers can take the separate

Re: [PATCH v3] multi-process: Initialize variables declared with g_auto*

2021-03-14 Thread Miroslav Rezanina
On Mon, Mar 15, 2021 at 02:20:10PM +0800, Zenghui Yu wrote: > On 2021/3/15 13:48, Miroslav Rezanina wrote: > > Missing declaration without initialization in hw/s390x/s390-pci-vfio.c > > othwerwise correct. Will you send v4 with missing initialization or > > should I send then as another patch? > >

Re: Questions about timer interrupt handling in QEMU

2021-03-14 Thread Pavel Dovgalyuk
On 14.03.2021 12:04, Arnabjyoti Kalita wrote: Hello all, This is a continuation of some of the questions I had about the clock record-replay handling process in QEMU. My previous post is here - https://www.mail-archive.com/qemu-discuss@nongnu.org/msg06231.html

Re: [PATCH 5/8] util/compatfd.c: Replaced a malloc with GLib's variant

2021-03-14 Thread Mahmoud Mandour
> > 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 and

<    1   2