[PATCH v2 1/1] util/uri: do not check argument of uri_free()

2021-06-28 Thread Heinrich Schuchardt
uri_free() checks if its argument is NULL in uri_clean() and g_free(). There is no need to check the argument before the call. Signed-off-by: Heinrich Schuchardt --- v2: remove unrelated subproject change --- block/nfs.c | 4 +--- block/ssh.c | 4 +--- util/uri.c | 22 ++--

Re: [PATCH v2] hw/nvme: fix pin-based interrupt behavior (again)

2021-06-28 Thread Klaus Jensen
On Jun 17 20:55, Klaus Jensen wrote: From: Klaus Jensen Jakub noticed[1] that, when using pin-based interrupts, the device will unconditionally deasssert when any CQEs are acknowledged. However, the pin should not be deasserted if other completion queues still holds unacknowledged CQEs. The bu

Re: [PATCH] hw/nvme: fix missing check for PMR capability

2021-06-28 Thread Klaus Jensen
On Jun 7 11:47, Klaus Jensen wrote: From: Klaus Jensen Qiang Liu reported that an access on an unknown address is triggered in memory_region_set_enabled because a check on CAP.PMRS is missing for the PMRCTL register write when no PMR is configured. Cc: qemu-sta...@nongnu.org Fixes: 75c3c9de96

Re: [PATCH 1/1] util/uri: do not check argument of uri_free()

2021-06-28 Thread Philippe Mathieu-Daudé
On 6/28/21 11:55 PM, Heinrich Schuchardt wrote: > uri_free() checks if its argument is NULL in uri_clean() and g_free(). > There is no need to check the argument before the call. > > Signed-off-by: Heinrich Schuchardt > --- > block/nfs.c | 4 +--- > block/ssh.c | 4 +--- > capstone| 2 +-

Re: [PATCH v6 3/7] qemu-nbd: Use qcrypto_tls_creds_check_endpoint()

2021-06-28 Thread Akihiko Odaki
Tested-by: Akihiko Odaki 2021年6月29日(火) 1:09 Philippe Mathieu-Daudé : > > Avoid accessing QCryptoTLSCreds internals by using > the qcrypto_tls_creds_check_endpoint() helper. > > Signed-off-by: Philippe Mathieu-Daudé > --- > qemu-nbd.c | 19 +++ > 1 file changed, 7 insertions(+),

[PATCH 1/1] util/uri: do not check argument of uri_free()

2021-06-28 Thread Heinrich Schuchardt
uri_free() checks if its argument is NULL in uri_clean() and g_free(). There is no need to check the argument before the call. Signed-off-by: Heinrich Schuchardt --- block/nfs.c | 4 +--- block/ssh.c | 4 +--- capstone| 2 +- util/uri.c | 22 ++ 4 files changed, 9 ins

Re: [PULL 00/10] Block Jobs patches

2021-06-28 Thread Eric Blake
On Mon, Jun 28, 2021 at 07:19:47PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 28.06.2021 19:09, Peter Maydell wrote: > > On Fri, 25 Jun 2021 at 14:00, Vladimir Sementsov-Ogievskiy > > wrote: > > > > > > The following changes since commit > > > e0da9171e02f4534124b9a9e0782b38376c6: > > > >

Re: [PATCH v7 14/16] docs/devel/testing: add -valgrind option to the debug section of QEMU iotests

2021-06-28 Thread Eric Blake
On Mon, Jun 28, 2021 at 02:31:48PM +0200, Emanuele Giuseppe Esposito wrote: > Signed-off-by: Emanuele Giuseppe Esposito > Reviewed-by: Max Reitz > Reviewed-by: Vladimir Sementsov-Ogievskiy > --- > docs/devel/testing.rst | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/docs/devel

Re: [PATCH v7 13/16] qemu-iotests: insert valgrind command line as wrapper for qemu binary

2021-06-28 Thread Eric Blake
On Mon, Jun 28, 2021 at 02:31:47PM +0200, Emanuele Giuseppe Esposito wrote: > If -gdb and -valgrind are both defined, return an error. > > Signed-off-by: Emanuele Giuseppe Esposito > Reviewed-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/iotests.py | 6 +- > 1 file changed, 5

Re: [PATCH v2] hw/nvme: fix pin-based interrupt behavior (again)

2021-06-28 Thread Keith Busch
On Thu, Jun 17, 2021 at 08:55:42PM +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Jakub noticed[1] that, when using pin-based interrupts, the device will > unconditionally deasssert when any CQEs are acknowledged. However, the > pin should not be deasserted if other completion queues still h

Re: [PATCH] hw/nvme: fix missing check for PMR capability

2021-06-28 Thread Keith Busch
On Mon, Jun 07, 2021 at 11:47:57AM +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Qiang Liu reported that an access on an unknown address is triggered in > memory_region_set_enabled because a check on CAP.PMRS is missing for the > PMRCTL register write when no PMR is configured. > > Cc: qem

Re: [PULL 00/10] Block Jobs patches

2021-06-28 Thread Peter Maydell
On Fri, 25 Jun 2021 at 14:00, Vladimir Sementsov-Ogievskiy wrote: > > The following changes since commit e0da9171e02f4534124b9a9e0782b38376c6: > > Merge remote-tracking branch 'remotes/kraxel/tags/ui-20210624-pull-request' > into staging (2021-06-25 09:10:37 +0100) > > are available in the

Re: [PATCH v6 3/7] qemu-nbd: Use qcrypto_tls_creds_check_endpoint()

2021-06-28 Thread Eric Blake
On Mon, Jun 28, 2021 at 06:09:10PM +0200, Philippe Mathieu-Daudé wrote: > Avoid accessing QCryptoTLSCreds internals by using > the qcrypto_tls_creds_check_endpoint() helper. > > Signed-off-by: Philippe Mathieu-Daudé > --- > qemu-nbd.c | 19 +++ > 1 file changed, 7 insertions(+),

Re: [PATCH v2 3/6] block: Clarify that @bytes is no limit on *pnum

2021-06-28 Thread Eric Blake
> > > +++ b/include/block/block_int.h > > > @@ -347,6 +347,11 @@ struct BlockDriver { > > >    * clamped to bdrv_getlength() and aligned to request_alignment, > > >    * as well as non-NULL pnum, map, and file; in turn, the driver > > >    * must return an error or set pnum to an aligne

Re: [PATCH v2 2/1] qemu-img: Add "backing":true to unallocated map segments

2021-06-28 Thread Eric Blake
On Wed, Jun 23, 2021 at 06:04:19PM +0200, Kevin Wolf wrote: > > This is fine, but it means that this flag will present in all ranges, > > instead of only in unallocated ranges (what this patch is doing). > > An argument for always having the flag would be that it's probably > useful for a tool to

Re: [PATCH v2 00/11] hw/nvme: reimplement all multi-aio commands with custom aiocbs

2021-06-28 Thread Klaus Jensen
On Jun 17 21:06, Klaus Jensen wrote: From: Klaus Jensen This series reimplements flush, dsm, copy, zone reset and format nvm to allow cancellation. I posted an RFC back in March ("hw/block/nvme: convert ad-hoc aio tracking to aiocb") and I've applied some feedback from Stefan and reimplemented

Re: [PATCH v3 1/2] hw/nvme: fix endianess conversion and add controller list

2021-06-28 Thread Klaus Jensen
On Jun 17 11:31, Klaus Jensen wrote: On Jun 14 21:59, Gollu Appalanaidu wrote: Add the controller identifiers list CNS 0x13, available list of ctrls in NVM Subsystem that may or may not be attached to namespaces. In Identify Ctrl List of the CNS 0x12 and 0x13 no endian conversion for the nsid f

Re: [PATCH] tests/qtest/nvme-test: add persistent memory region test

2021-06-28 Thread Klaus Jensen
On Jun 18 16:04, Gollu Appalanaidu wrote: This will test the PMR functionality. Signed-off-by: Gollu Appalanaidu --- tests/qtest/nvme-test.c | 78 - 1 file changed, 77 insertions(+), 1 deletion(-) diff --git a/tests/qtest/nvme-test.c b/tests/qtest/nvme-te

Re: [PATCH v3 0/2] hw/nvme: namespace parameter for EUI-64

2021-06-28 Thread Klaus Jensen
On Jun 14 22:18, Heinrich Schuchardt wrote: The EUI-64 field is the only identifier for NVMe namespaces in UEFI device paths. Add a new namespace property "eui64", that provides the user the option to specify the EUI-64. v3: use 52-54-00-00-00-00-00-00 as starting values for generating

Re: [PATCH] hw/nvme: fix missing check for PMR capability

2021-06-28 Thread Klaus Jensen
On Jun 17 21:17, Klaus Jensen wrote: On Jun 7 11:47, Klaus Jensen wrote: From: Klaus Jensen Qiang Liu reported that an access on an unknown address is triggered in memory_region_set_enabled because a check on CAP.PMRS is missing for the PMRCTL register write when no PMR is configured. Cc: qe

Re: [PATCH v2] hw/nvme: fix pin-based interrupt behavior (again)

2021-06-28 Thread Klaus Jensen
On Jun 17 20:55, Klaus Jensen wrote: From: Klaus Jensen Jakub noticed[1] that, when using pin-based interrupts, the device will unconditionally deasssert when any CQEs are acknowledged. However, the pin should not be deasserted if other completion queues still holds unacknowledged CQEs. The bu

Re: [PATCH v7 00/16] qemu_iotests: improve debugging options

2021-06-28 Thread John Snow
On Mon, Jun 28, 2021 at 8:32 AM Emanuele Giuseppe Esposito < eespo...@redhat.com> wrote: > This series adds the option to attach gdbserver and valgrind > to the QEMU binary running in qemu_iotests. > It also allows to redirect QEMU binaries output of the python tests > to the stdout, instead of a

Re: [PATCH v2 11/11] Partially revert "hw/block/nvme: drain namespaces on sq deletion"

2021-06-28 Thread Klaus Jensen
On Jun 28 09:00, Keith Busch wrote: On Thu, Jun 17, 2021 at 09:06:57PM +0200, Klaus Jensen wrote: From: Klaus Jensen This partially reverts commit 98f84f5a4eca5c03e32fff20f246d9b4b96d6422. Since all "multi aio" commands are now reimplemented to properly track the nested aiocbs, we can revert

Re: [PULL 00/10] Block Jobs patches

2021-06-28 Thread Vladimir Sementsov-Ogievskiy
28.06.2021 19:09, Peter Maydell wrote: On Fri, 25 Jun 2021 at 14:00, Vladimir Sementsov-Ogievskiy wrote: The following changes since commit e0da9171e02f4534124b9a9e0782b38376c6: Merge remote-tracking branch 'remotes/kraxel/tags/ui-20210624-pull-request' into staging (2021-06-25 09:10:

[PATCH v6 3/7] qemu-nbd: Use qcrypto_tls_creds_check_endpoint()

2021-06-28 Thread Philippe Mathieu-Daudé
Avoid accessing QCryptoTLSCreds internals by using the qcrypto_tls_creds_check_endpoint() helper. Signed-off-by: Philippe Mathieu-Daudé --- qemu-nbd.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index 93ef4e288fd..26ffbf15af0 1

[PATCH v6 1/7] crypto/tlscreds: Introduce qcrypto_tls_creds_check_endpoint() helper

2021-06-28 Thread Philippe Mathieu-Daudé
Introduce the qcrypto_tls_creds_check_endpoint() helper to access QCryptoTLSCreds internal 'endpoint' field. Reviewed-by: Richard Henderson Reviewed-by: Daniel P. Berrangé Signed-off-by: Philippe Mathieu-Daudé --- include/crypto/tlscreds.h | 14 ++ crypto/tlscreds.c | 12 ++

[PATCH v6 7/7] crypto: Make QCryptoTLSCreds* structures private

2021-06-28 Thread Philippe Mathieu-Daudé
Code consuming the "crypto/tlscreds*.h" APIs doesn't need to access its internals. Move the structure definitions to the "tlscredspriv.h" private header (only accessible by implementations). The public headers (in include/) still forward-declare the structures typedef. Note, tlscreds.c and 3 of th

[PATCH v6 6/7] ui/vnc: Use qcrypto_tls_creds_check_endpoint()

2021-06-28 Thread Philippe Mathieu-Daudé
Avoid accessing QCryptoTLSCreds internals by using the qcrypto_tls_creds_check_endpoint() helper. Signed-off-by: Philippe Mathieu-Daudé --- ui/vnc.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index f0a1550d58c..0e5fcb278f3 100644 --- a/ui/vnc.c

[PATCH v6 2/7] block/nbd: Use qcrypto_tls_creds_check_endpoint()

2021-06-28 Thread Philippe Mathieu-Daudé
Avoid accessing QCryptoTLSCreds internals by using the qcrypto_tls_creds_check_endpoint() helper. Reviewed-by: Richard Henderson Reviewed-by: Daniel P. Berrangé Signed-off-by: Philippe Mathieu-Daudé --- block/nbd.c| 6 +++--- blockdev-nbd.c | 6 +++--- 2 files changed, 6 insertions(+), 6 d

[PATCH v6 0/7] crypto: Make QCryptoTLSCreds* structures private

2021-06-28 Thread Philippe Mathieu-Daudé
Missing review: #3 (qemu-nbd) Follow Daniel suggestion to simplify qcrypto TLS implementations, aiming to solve the OSX build failure. Since v5: - Also convert qemu-nbd (Akihiko Odaki) Since v4: - Do not introduce qcrypto_tls_session_check_role (Richard, Daniel) - Added R-b tags Since v3: - Add

Re: [PULL 0/6] Floppy patches

2021-06-28 Thread Peter Maydell
On Fri, 25 Jun 2021 at 13:56, John Snow wrote: > > The following changes since commit e0da9171e02f4534124b9a9e0782b38376c6: > > Merge remote-tracking branch 'remotes/kraxel/tags/ui-20210624-pull-request' > into staging (2021-06-25 09:10:37 +0100) > > are available in the Git repository at:

[PATCH v6 5/7] migration/tls: Use qcrypto_tls_creds_check_endpoint()

2021-06-28 Thread Philippe Mathieu-Daudé
Avoid accessing QCryptoTLSCreds internals by using the qcrypto_tls_creds_check_endpoint() helper. Reviewed-by: Richard Henderson Reviewed-by: Daniel P. Berrangé Signed-off-by: Philippe Mathieu-Daudé --- migration/tls.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/mi

Re: [PULL 00/10] Block Jobs patches

2021-06-28 Thread Peter Maydell
On Fri, 25 Jun 2021 at 14:00, Vladimir Sementsov-Ogievskiy wrote: > > The following changes since commit e0da9171e02f4534124b9a9e0782b38376c6: > > Merge remote-tracking branch 'remotes/kraxel/tags/ui-20210624-pull-request' > into staging (2021-06-25 09:10:37 +0100) > > are available in the

[PATCH v6 4/7] chardev/socket: Use qcrypto_tls_creds_check_endpoint()

2021-06-28 Thread Philippe Mathieu-Daudé
Avoid accessing QCryptoTLSCreds internals by using the qcrypto_tls_creds_check_endpoint() helper. Reviewed-by: Richard Henderson Reviewed-by: Daniel P. Berrangé Signed-off-by: Philippe Mathieu-Daudé --- chardev/char-socket.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletion

Re: [PATCH v2 11/11] Partially revert "hw/block/nvme: drain namespaces on sq deletion"

2021-06-28 Thread Keith Busch
On Thu, Jun 17, 2021 at 09:06:57PM +0200, Klaus Jensen wrote: > From: Klaus Jensen > > This partially reverts commit 98f84f5a4eca5c03e32fff20f246d9b4b96d6422. > > Since all "multi aio" commands are now reimplemented to properly track > the nested aiocbs, we can revert the "hack" that was introdu

Re: [PATCH v6 0/9] Allow changing bs->file on reopen

2021-06-28 Thread Kevin Wolf
Am 10.06.2021 um 14:05 hat Vladimir Sementsov-Ogievskiy geschrieben: > Note that this is only "subject" part of original Alberto's > "[PATCH v4 0/6] Allow changing bs->file on reopen" which also included > multiple reopen and dropping x- prefix of reopen together with some > refactoring. > > v6: r

[PATCH v7 14/16] docs/devel/testing: add -valgrind option to the debug section of QEMU iotests

2021-06-28 Thread Emanuele Giuseppe Esposito
Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy --- docs/devel/testing.rst | 7 +++ 1 file changed, 7 insertions(+) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index 8b24e6fb47..fa85592a38 100644 --- a/docs/devel/t

[PATCH v7 11/16] qemu-iotests: extend QMP socket timeout when using valgrind

2021-06-28 Thread Emanuele Giuseppe Esposito
As with gdbserver, valgrind delays the test execution, so the default QMP socket timeout and the generic class Timeout in iotests.py timeouts too soon. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 6 +++--- 1 file change

[PATCH v7 10/16] qemu-iotests: extend the check script to prepare supporting valgrind for python tests

2021-06-28 Thread Emanuele Giuseppe Esposito
Currently, the check script only parses the option and sets the VALGRIND_QEMU environmental variable to "y". Add another local python variable that prepares the command line, identical to the one provided in the test scripts. Because the python script does not know in advance the valgrind PID to a

[PATCH v7 06/16] qemu-iotests: delay QMP socket timers

2021-06-28 Thread Emanuele Giuseppe Esposito
Attaching gdbserver implies that the qmp socket should wait indefinitely for an answer from QEMU. Signed-off-by: Emanuele Giuseppe Esposito --- tests/qemu-iotests/iotests.py | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotest

[PATCH v7 15/16] qemu-iotests: add option to show qemu binary logs on stdout

2021-06-28 Thread Emanuele Giuseppe Esposito
Using the flag -p, allow the qemu binary to print to stdout. Also create the common function _close_qemu_log_file() to avoid accessing machine.py private fields directly and have duplicate code. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy --- python/qemu

[PATCH v7 16/16] docs/devel/testing: add -p option to the debug section of QEMU iotests

2021-06-28 Thread Emanuele Giuseppe Esposito
Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy --- docs/devel/testing.rst | 4 1 file changed, 4 insertions(+) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index fa85592a38..28a0b37b84 100644 --- a/docs/devel/testing.rst +++ b/docs/devel

[PATCH v7 02/16] python: Reduce strictness of pylint's duplicate-code check

2021-06-28 Thread Emanuele Giuseppe Esposito
From: John Snow Pylint prior to 2.8.3 (We pin at >= 2.8.0) includes function and method signatures as part of its duplicate checking algorithm. This check does not listen to pragmas, so the only way to disable it is to turn it off completely or increase the minimum duplicate lines so that it does

[PATCH v7 12/16] qemu-iotests: allow valgrind to read/delete the generated log file

2021-06-28 Thread Emanuele Giuseppe Esposito
When using -valgrind on the script tests, it generates a log file in $TEST_DIR that is either read (if valgrind finds problems) or otherwise deleted. Provide the same exact behavior when using -valgrind on the python tests. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov

[PATCH v7 13/16] qemu-iotests: insert valgrind command line as wrapper for qemu binary

2021-06-28 Thread Emanuele Giuseppe Esposito
If -gdb and -valgrind are both defined, return an error. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iote

[PATCH v7 09/16] docs/devel/testing: add -gdb option to the debugging section of QEMU iotests

2021-06-28 Thread Emanuele Giuseppe Esposito
Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy --- docs/devel/testing.rst | 11 +++ 1 file changed, 11 insertions(+) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index 9d6a8f8636..8b24e6fb47 100644 --- a/docs/devel/testing.rst +++ b/d

[PATCH v7 01/16] python: qemu: add timer parameter for qmp.accept socket

2021-06-28 Thread Emanuele Giuseppe Esposito
Also add a new _qmp_timer field to the QEMUMachine class. Let's change the default socket timeout to None, so that if a subclass needs to add a timer, it can be done by modifying this private field. At the same time, restore the timer to be 15 seconds in iotests.py, to give an upper bound to the

[PATCH v7 07/16] qemu_iotests: insert gdbserver command line as wrapper for qemu binary

2021-06-28 Thread Emanuele Giuseppe Esposito
Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index e176a84620..e7e3d92d3e 100644 --- a/test

[PATCH v7 08/16] qemu-iotests: add gdbserver option to script tests too

2021-06-28 Thread Emanuele Giuseppe Esposito
Remove read timer in test script when GDB_OPTIONS are set, so that the bash tests won't timeout while running gdb. The only limitation here is that running a script with gdbserver will make the test output mismatch with the expected results, making the test fail. Signed-off-by: Emanuele Giuseppe

[PATCH v7 05/16] qemu-iotests: add option to attach gdbserver

2021-06-28 Thread Emanuele Giuseppe Esposito
Define -gdb flag and GDB_OPTIONS environment variable to python tests to attach a gdbserver to each qemu instance. This patch only adds and parses this flag, it does not yet add the implementation for it. if -gdb is not provided but $GDB_OPTIONS is set, ignore the environment variable. Signed-off

[PATCH v7 04/16] docs/devel/testing: add debug section to the QEMU iotests chapter

2021-06-28 Thread Emanuele Giuseppe Esposito
Introduce the "Debugging a test case" section, in preparation to the additional flags that will be added in the next patches. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy --- docs/devel/testing.rst | 8 1 file changed, 8 insertions(+) diff --git

[PATCH v7 03/16] python: qemu: pass the wrapper field from QEMUQtestmachine to QEMUMachine

2021-06-28 Thread Emanuele Giuseppe Esposito
Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Reviewed-by: Max Reitz --- python/qemu/machine/qtest.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/qemu/machine/qtest.py b/python/qemu/machine/qtest.py

[PATCH v7 00/16] qemu_iotests: improve debugging options

2021-06-28 Thread Emanuele Giuseppe Esposito
This series adds the option to attach gdbserver and valgrind to the QEMU binary running in qemu_iotests. It also allows to redirect QEMU binaries output of the python tests to the stdout, instead of a log file. Patches 1-9 introduce the -gdb option to both python and bash tests, 10-14 extend the

[PATCH v2 2/2] block/commit: use QEMU_AUTO_VFREE

2021-06-28 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/commit.c | 25 + 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/block/commit.c b/block/commit.c index b7f0c7c061..42792b4556 100644 --- a/block/commit.c +++ b/block/commit.c @@ -119,24 +119,24 @@ static

[PATCH v2 0/2] introduce QEMU_AUTO_VFREE

2021-06-28 Thread Vladimir Sementsov-Ogievskiy
Hi all! There is a good movement to use g_autofree macro, that helps to automatically call g_free on exit from code block. We lack similar possibility for qemu_memalign() functions family. Let's add, it seems rather simple with help of "cleanup" attribute. v2: rewrite 01 (as first version was ju

[PATCH v2 1/2] introduce QEMU_AUTO_VFREE

2021-06-28 Thread Vladimir Sementsov-Ogievskiy
Introduce a convenient macro, that works for qemu_memalign() like g_autofree works with g_malloc. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/qemu/osdep.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 0a54bf7be8

Re: [PATCH 0/2] introduce QEMU_AUTO_VFREE

2021-06-28 Thread Vladimir Sementsov-Ogievskiy
28.06.2021 13:08, Kevin Wolf wrote: Am 23.06.2021 um 12:34 hat Kevin Wolf geschrieben: Am 19.06.2021 um 16:21 hat Vladimir Sementsov-Ogievskiy geschrieben: Hi all! There is a good movement to use g_autofree macro, that helps to automatically call g_free on exit from code block. We lack simila

Re: [RFC PATCH 04/10] hw/sd: Introduce sd_cmd_handler type

2021-06-28 Thread Philippe Mathieu-Daudé
On 6/28/21 9:29 AM, Cédric Le Goater wrote: > On 6/24/21 4:22 PM, Philippe Mathieu-Daudé wrote: >> Add 2 command handler arrays in SDProto, for CMD and ACMD. >> Have sd_normal_command() / sd_app_command() use these arrays: >> if an command handler is registered, call it, otherwise fall >> back to c

Re: [PATCH 0/2] introduce QEMU_AUTO_VFREE

2021-06-28 Thread Kevin Wolf
Am 23.06.2021 um 12:34 hat Kevin Wolf geschrieben: > Am 19.06.2021 um 16:21 hat Vladimir Sementsov-Ogievskiy geschrieben: > > Hi all! > > > > There is a good movement to use g_autofree macro, that helps to > > automatically call g_free on exit from code block. > > > > We lack similar possibility

Re: [RFC PATCH 00/10] hw/sd: Start splitting SD vs SPI protocols

2021-06-28 Thread Cédric Le Goater
On 6/24/21 4:21 PM, Philippe Mathieu-Daudé wrote: > Hi Cédric, > > After our discussion yesterday about how to add support for MMC > (and eMMC) I looked at how to easily add these bus protocols, > which might have commands quite different, avoiding to have big > unreadable if/else statements. > >

Re: [RFC PATCH 05/10] hw/sd: Add sd_cmd_illegal() handler

2021-06-28 Thread Cédric Le Goater
On 6/24/21 4:22 PM, Philippe Mathieu-Daudé wrote: > Log illegal commands as GUEST_ERROR. > > Note: we are logging back the SDIO commands (CMD5, CMD52-54). > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/sd/sd.c | 57 ++ > 1 file changed,

Re: [RFC PATCH 04/10] hw/sd: Introduce sd_cmd_handler type

2021-06-28 Thread Cédric Le Goater
On 6/24/21 4:22 PM, Philippe Mathieu-Daudé wrote: > Add 2 command handler arrays in SDProto, for CMD and ACMD. > Have sd_normal_command() / sd_app_command() use these arrays: > if an command handler is registered, call it, otherwise fall > back to current code base. > > Signed-off-by: Philippe Mat

Re: [RFC PATCH 03/10] hw/sd: Move proto_name to SDProto structure

2021-06-28 Thread Cédric Le Goater
On 6/24/21 4:22 PM, Philippe Mathieu-Daudé wrote: > Introduce a new structure to hold the bus protocol specific > fields: SDProto. The first field is the protocol name. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/sd/sd.c | 28 > 1 file changed, 20 insertions