Re: [PATCH v2 19/22] qapi: Inline and remove QERR_PROPERTY_VALUE_OUT_OF_RANGE definition

2023-10-20 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Address the comment added in commit 4629ed1e98 > ("qerror: Finally unused, clean up"), from 2015: > > /* >* These macros will go away, please don't use >* in new code, and do not add new ones! >*/ > > Mechanical transformation using sed, manually >

Re: [PATCH v2 20/22] qapi: Inline and remove QERR_QGA_COMMAND_FAILED definition

2023-10-20 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Address the comment added in commit 4629ed1e98 > ("qerror: Finally unused, clean up"), from 2015: > > /* >* These macros will go away, please don't use >* in new code, and do not add new ones! >*/ > > Mechanical transformation using the following >

Re: [PATCH v2 18/22] qapi: Inline and remove QERR_PROPERTY_VALUE_BAD definition

2023-10-20 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Address the comment added in commit 4629ed1e98 > ("qerror: Finally unused, clean up"), from 2015: > > /* >* These macros will go away, please don't use >* in new code, and do not add new ones! >*/ > > Manual change. Remove the definition in >

Re: [PATCH v2 16/22] qapi: Inline QERR_MISSING_PARAMETER definition (constant parameter)

2023-10-20 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Address the comment added in commit 4629ed1e98 > ("qerror: Finally unused, clean up"), from 2015: > > /* >* These macros will go away, please don't use >* in new code, and do not add new ones! >*/ > > Mechanical transformation using the following >

Re: [PATCH v2 14/22] qapi: Inline and remove QERR_IO_ERROR definition

2023-10-20 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Address the comment added in commit 4629ed1e98 > ("qerror: Finally unused, clean up"), from 2015: > > /* >* These macros will go away, please don't use >* in new code, and do not add new ones! >*/ > > Mechanical transformation using: > > $ sed -i

Re: [PATCH v2 11/22] qapi: Inline QERR_INVALID_PARAMETER_VALUE definition (constant value)

2023-10-20 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > vcpu_dirty_limit > > Address the comment added in commit 4629ed1e98 > ("qerror: Finally unused, clean up"), from 2015: > > /* >* These macros will go away, please don't use >* in new code, and do not add new ones! >*/ > > Mechanical transformation

Re: [PATCH v2 10/22] qapi: Correct error message for 'vcpu_dirty_limit' parameter

2023-10-20 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > QERR_INVALID_PARAMETER_VALUE is defined as: > > #define QERR_INVALID_PARAMETER_VALUE \ > "Parameter '%s' expects %s" > > The current error is formatted as: > > "Parameter 'vcpu_dirty_limit' expects is invalid, it must greater then 1 > MB/s" > > Replace

Re: [PATCH v2 07/22] qapi: Inline QERR_INVALID_PARAMETER_TYPE definition (constant param)

2023-10-20 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Address the comment added in commit 4629ed1e98 > ("qerror: Finally unused, clean up"), from 2015: > > /* >* These macros will go away, please don't use >* in new code, and do not add new ones! >*/ > > Mechanical transformation using the following >

Re: [PATCH v2 06/22] qapi: Inline and remove QERR_INVALID_PARAMETER definition

2023-10-20 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Address the comment added in commit 4629ed1e98 > ("qerror: Finally unused, clean up"), from 2015: > > /* >* These macros will go away, please don't use >* in new code, and do not add new ones! >*/ > > Mechanical transformation using: > > $ sed -i

Re: [PATCH v2 05/22] qapi: Inline QERR_INVALID_PARAMETER definition (constant parameter)

2023-10-20 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Address the comment added in commit 4629ed1e98 > ("qerror: Finally unused, clean up"), from 2015: > > /* >* These macros will go away, please don't use >* in new code, and do not add new ones! >*/ > > Mechanical transformation using the following >

Re: [PATCH v2 04/22] qapi: Inline and remove QERR_DEVICE_NO_HOTPLUG definition

2023-10-20 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Address the comment added in commit 4629ed1e98 > ("qerror: Finally unused, clean up"), from 2015: > > /* >* These macros will go away, please don't use >* in new code, and do not add new ones! >*/ > > Mechanical transformation using sed, manually >

Re: [PATCH v2 02/22] qapi: Inline and remove QERR_DEVICE_HAS_NO_MEDIUM definition

2023-10-20 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Address the comment added in commit 4629ed1e98 > ("qerror: Finally unused, clean up"), from 2015: > > /* >* These macros will go away, please don't use >* in new code, and do not add new ones! >*/ > > Mechanical transformation using sed, manually >

Re: [PATCH v2 01/22] qapi: Inline and remove QERR_BUS_NO_HOTPLUG definition

2023-10-19 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Address the comment added in commit 4629ed1e98 > ("qerror: Finally unused, clean up"), from 2015: > > /* >* These macros will go away, please don't use >* in new code, and do not add new ones! >*/ > > Mechanical transformation using sed, manually >

Re: [PATCH 4/4] qapi: introduce CONFIG_READ event

2023-10-19 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Wed, Oct 18, 2023 at 02:02:08PM +0200, Markus Armbruster wrote: >> Daniel P. Berrangé writes: >> >> > On Wed, Oct 18, 2023 at 06:51:41AM -0400, Michael S. Tsirkin wrote: >> >> On Wed, Oct 18, 2023 at 12:36:10PM +0200, Markus

Re: [PATCH 4/4] qapi: introduce CONFIG_READ event

2023-10-19 Thread Markus Armbruster
"Dr. David Alan Gilbert" writes: > Using x- for events makes sense to me; the semantics of events can be > quite subtle; often you don't find out how broken they are until you > wire them through libvirt and up the stack; so it's not impossible > you might need to change it - but then without

Re: [PATCH 4/4] qapi: introduce CONFIG_READ event

2023-10-19 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > On 18.10.23 15:02, Markus Armbruster wrote: >> Daniel P. Berrangé writes: >> >>> On Wed, Oct 18, 2023 at 06:51:41AM -0400, Michael S. Tsirkin wrote: >>>> On Wed, Oct 18, 2023 at 12:36:10PM +0200, Markus Arm

Re: [PATCH v8 4/7] qapi: add x-blockdev-replace command

2023-10-18 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > On 18.10.23 13:45, Markus Armbruster wrote: >> Vladimir Sementsov-Ogievskiy writes: >> >>> Add a command that can replace bs in following BdrvChild structures: >>> >>> - qdev blk root child >>>

Re: [PATCH 4/4] qapi: introduce CONFIG_READ event

2023-10-18 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Wed, Oct 18, 2023 at 06:51:41AM -0400, Michael S. Tsirkin wrote: >> On Wed, Oct 18, 2023 at 12:36:10PM +0200, Markus Armbruster wrote: >> > > x- seems safer for management tool that doesn't know about "unstable" >> > >

Re: [PATCH v8 4/7] qapi: add x-blockdev-replace command

2023-10-18 Thread Markus Armbruster
> --- /dev/null > +++ b/stubs/blk-by-qdev-id.c > @@ -0,0 +1,9 @@ > +#include "qemu/osdep.h" > +#include "qapi/error.h" > +#include "sysemu/block-backend.h" > + > +BlockBackend *blk_by_qdev_id(const char *id, Error **errp) > +{ > +error_setg(errp, "blk '%s' not found", id); Is this expected to happen? > +return NULL; > +} [...] QAPI schema Acked-by: Markus Armbruster

Re: [PATCH 4/4] qapi: introduce CONFIG_READ event

2023-10-18 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > On 18.10.23 09:47, Markus Armbruster wrote: >> Vladimir Sementsov-Ogievskiy writes: >> >>> On 17.10.23 18:00, Markus Armbruster wrote: >>>> Vladimir Sementsov-Ogievskiy writes: >>>> >>>>

Re: [PATCH v3 0/9] mirror: allow switching from background to active mode

2023-10-18 Thread Markus Armbruster
Fiona Ebner writes: > Changes in v3: > * unlock the job mutex when calling the new block job driver > 'query' handler > * squash patch adapting iotest output into patch that changes the > output > * turn accesses to copy_mode and actively_synced atomic > * slightly

Re: [PATCH v3 5/9] mirror: implement mirror_change method

2023-10-18 Thread Markus Armbruster
Fiona Ebner writes: > which allows switching the @copy-mode from 'background' to > 'write-blocking'. > > This is useful for management applications, so they can start out in > background mode to avoid limiting guest write speed and switch to > active mode when certain criteria are fulfilled. > >

Re: [PATCH v3 6/9] qapi/block-core: use JobType for BlockJobInfo's type

2023-10-18 Thread Markus Armbruster
m makes sense whether we need enum for a union or not. Reviewed-by: Markus Armbruster

Re: [PATCH v6 2/5] migration: migrate 'inc' command option is deprecated.

2023-10-18 Thread Markus Armbruster
Juan Quintela writes: > Use blockdev-mirror with NBD instead. > > Reviewed-by: Thomas Huth > Acked-by: Stefan Hajnoczi > Reviewed-by: Markus Armbruster > Signed-off-by: Juan Quintela > --- > docs/about/deprecated.rst | 9 + > qapi/mi

Re: [PATCH v5 5/7] migration: Deprecate old compression method

2023-10-18 Thread Markus Armbruster
Juan Quintela writes: > Markus Armbruster wrote: >> Juan Quintela writes: >> >>> Signed-off-by: Juan Quintela >>> Acked-by: Stefan Hajnoczi >>> Acked-by: Peter Xu > > >>> # @deprecated: Member @disk is deprecated because block m

Re: [PATCH v5 2/7] migration: migrate 'inc' command option is deprecated.

2023-10-18 Thread Markus Armbruster
Juan Quintela writes: > Markus Armbruster wrote: >> Juan Quintela writes: >> >>> Use blockdev-mirror with NBD instead. >>> >>> Reviewed-by: Thomas Huth >>> Acked-by: Stefan Hajnoczi >>> Signed-off-by: Juan Quintela >&g

Re: [PATCH 4/4] qapi: introduce CONFIG_READ event

2023-10-18 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > On 17.10.23 18:00, Markus Armbruster wrote: >> Vladimir Sementsov-Ogievskiy writes: >> >>> Send a new event when guest reads virtio-pci config after >>> virtio_notify_config() call. >>> >>> That's

Re: [PATCH 2/4] qapi: introduce device-sync-config

2023-10-18 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > On 17.10.23 17:57, Markus Armbruster wrote: >> Vladimir Sementsov-Ogievskiy writes: >> >>> Add command to sync config from vhost-user backend to the device. It >>> may be helpful when VHOST_USER_SLAVE_CONFIG_CHANG

Re: [PATCH 4/4] qapi: introduce CONFIG_READ event

2023-10-17 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Send a new event when guest reads virtio-pci config after > virtio_notify_config() call. > > That's useful to check that guest fetched modified config, for example > after resizing disk backend. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- >

Re: [PATCH 2/4] qapi: introduce device-sync-config

2023-10-17 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Add command to sync config from vhost-user backend to the device. It > may be helpful when VHOST_USER_SLAVE_CONFIG_CHANGE_MSG failed or not > triggered interrupt to the guest or just not available (not supported > by vhost-user server). > > Signed-off-by:

Re: [PATCH v5 5/7] migration: Deprecate old compression method

2023-10-17 Thread Markus Armbruster
_CLONE() instead of duplicating it inline */ > > if (params->has_compress_level) { > +warn_report("Old compression is deprecated. " > +"Use multifd compression methods instead."); > s->parameters.compress_level = params->compress_level; > } > > if (params->has_compress_threads) { > +warn_report("Old compression is deprecated. " > +"Use multifd compression methods instead."); > s->parameters.compress_threads = params->compress_threads; > } > > if (params->has_compress_wait_thread) { > +warn_report("Old compression is deprecated. " > +"Use multifd compression methods instead."); > s->parameters.compress_wait_thread = params->compress_wait_thread; > } > > if (params->has_decompress_threads) { > +warn_report("Old compression is deprecated. " > +"Use multifd compression methods instead."); > s->parameters.decompress_threads = params->decompress_threads; > } Other than that Reviewed-by: Markus Armbruster

Re: [PATCH v5 4/7] migration: Deprecate block migration

2023-10-17 Thread Markus Armbruster
gt; +error_append_hint(errp, "Use blockdev-mirror with NBD instead.\n"); > return false; > } > #endif > +if (new_caps[MIGRATION_CAPABILITY_BLOCK]) { > + warn_report("Block migration is deprecated. " > +"Use blockdev-mirror with NBD instead."); Likewise. > +} > > #ifndef CONFIG_REPLICATION > if (new_caps[MIGRATION_CAPABILITY_X_COLO]) { > @@ -1386,6 +1391,8 @@ static void migrate_params_apply(MigrateSetParameters > *params, Error **errp) > } > > if (params->has_block_incremental) { > +warn_report("Block migration is deprecated. " > +"Use blockdev-mirror with NBD instead."); Likewise. > s->parameters.block_incremental = params->block_incremental; > } > if (params->has_multifd_channels) { Other than that Reviewed-by: Markus Armbruster

Re: [PATCH v5 3/7] migration: migrate 'blk' command option is deprecated.

2023-10-17 Thread Markus Armbruster
" NBD instead"); > +} Capability? Isn't this a parameter? "'blk" lacks a closing single quote. I figure we want warn_report("parameter 'blk' is deprecated;" " use blockdev-mirror with NBD instead."); > + > if (resume) { > if (s->state != MIGRATION_STATUS_POSTCOPY_PAUSED) { > error_setg(errp, "Cannot resume if there is no " Other than that Reviewed-by: Markus Armbruster

Re: [PATCH v5 2/7] migration: migrate 'inc' command option is deprecated.

2023-10-17 Thread Markus Armbruster
repare(MigrationState *s, bool > blk, bool blk_inc, > { > Error *local_err = NULL; > > +if (blk_inc) { > + warn_report("parameter 'inc' is deprecated. Use blockdev-mirror > with" > +" NBD instead"); Likewise. > +} > + > if (resume) { > if (s->state != MIGRATION_STATUS_POSTCOPY_PAUSED) { > error_setg(errp, "Cannot resume if there is no " Other than that Reviewed-by: Markus Armbruster

Re: [PATCH v4 03/10] migration: migrate 'inc' command option is deprecated.

2023-10-16 Thread Markus Armbruster
Juan Quintela writes: > Markus Armbruster wrote: >> Juan Quintela writes: >> >>> Markus Armbruster wrote: >>>> Juan Quintela writes: >>> So what I want, I want to remove -i/-b in the next version (9.0?). For >>> the other, I wan

Re: [PATCH v4 03/10] migration: migrate 'inc' command option is deprecated.

2023-10-16 Thread Markus Armbruster
Juan Quintela writes: > Markus Armbruster wrote: >> Juan Quintela writes: >> >>> Set the 'block_incremental' migration parameter to 'true' instead. >>> >>> Reviewed-by: Thomas Huth >>> Acked-by: Stefan Hajnoczi >>> Signed-off-

Re: [PATCH v2 1/2] qdev: add IOThreadVirtQueueMappingList property type

2023-10-14 Thread Markus Armbruster
Stefan Hajnoczi writes: > virtio-blk and virtio-scsi devices will need a way to specify the > mapping between IOThreads and virtqueues. At the moment all virtqueues > are assigned to a single IOThread or the main loop. This single thread > can be a CPU bottleneck, so it is necessary to allow

Re: [PATCH v4 04/10] migration: migrate 'blk' command option is deprecated.

2023-10-13 Thread Markus Armbruster
Juan Quintela writes: > Set the 'block' migration capability to 'true' instead. > > Signed-off-by: Juan Quintela > Acked-by: Stefan Hajnoczi > Reviewed-by: Thomas Huth > > --- > > Improve documentation and style (markus) > --- > docs/about/deprecated.rst | 7 +++ > qapi/migration.json

Re: [PATCH v4 03/10] migration: migrate 'inc' command option is deprecated.

2023-10-13 Thread Markus Armbruster
Juan Quintela writes: > Set the 'block_incremental' migration parameter to 'true' instead. > > Reviewed-by: Thomas Huth > Acked-by: Stefan Hajnoczi > Signed-off-by: Juan Quintela > > --- > > Improve documentation and style (thanks Markus) > --- > docs/about/deprecated.rst | 7 +++ >

Re: [PATCH v4 01/10] migration: Improve json and formatting

2023-10-13 Thread Markus Armbruster
2.4) > # > -# @events: generate events for each migration state change (since 2.4 > -# ) > +# @events: generate events for each migration state change (since 2.4) > # > # @auto-converge: If enabled, QEMU will automatically throttle down > # the guest to speed up convergence of RAM migration. (since 1.6) Reviewed-by: Markus Armbruster

Re: [RFC PATCH 01/78] include/qemu/compiler.h: replace QEMU_FALLTHROUGH with fallthrough

2023-10-13 Thread Markus Armbruster
The commit message needs to explain why. Emmanouil Pitsidianakis writes: > Signed-off-by: Emmanouil Pitsidianakis > --- > audio/pwaudio.c | 8 > hw/arm/smmuv3.c | 2 +- > include/qemu/compiler.h | 30 +++--- >

Re: [PATCH v3 4/4] migration: Deprecate old compression method

2023-10-12 Thread Markus Armbruster
Juan Quintela writes: > Signed-off-by: Juan Quintela > Acked-by: Peter Xu > --- > docs/about/deprecated.rst | 8 +++ > qapi/migration.json | 102 -- > migration/options.c | 13 + > 3 files changed, 86 insertions(+), 37 deletions(-) > >

Re: [PATCH v3 3/4] migration: Deprecate block migration

2023-10-12 Thread Markus Armbruster
Juan Quintela writes: > It is obsolete. It is better to use driver-mirror with NBD instead. drive-mirror Several more below. > > CC: Kevin Wolf > CC: Eric Blake > CC: Stefan Hajnoczi > CC: Hanna Czenczek > > Signed-off-by: Juan Quintela > --- > docs/about/deprecated.rst | 10 ++

Re: [PATCH v3 1/4] migration: migrate 'inc' command option is deprecated.

2023-10-12 Thread Markus Armbruster
Juan Quintela writes: > Set the 'block_incremental' migration parameter to 'true' instead. > > Reviewed-by: Thomas Huth > Signed-off-by: Juan Quintela > --- > docs/about/deprecated.rst | 7 +++ > qapi/migration.json | 12 ++-- > migration/migration.c | 6 ++ > 3

Re: [PATCH v3 00/16] (few more) Steps towards enabling -Wshadow

2023-10-06 Thread Markus Armbruster
Queued. Thanks!

Re: [PATCH v3 00/16] (few more) Steps towards enabling -Wshadow

2023-10-06 Thread Markus Armbruster
Queued, thanks!

Re: [PATCH v3 13/16] semihosting/arm-compat: Clean up local variable shadowing

2023-10-06 Thread Markus Armbruster
Alex Bennée writes: > Philippe Mathieu-Daudé writes: > >> Fix: >> >> semihosting/arm-compat-semi.c: In function ‘do_common_semihosting’: >> semihosting/arm-compat-semi.c:379:13: warning: declaration of ‘ret’ >> shadows a previous local [-Wshadow=local] >> 379 | int ret, err =

Re: [RFC PATCH v2 21/22] qapi: Inline and remove QERR_UNSUPPORTED definition

2023-10-05 Thread Markus Armbruster
Please ignore this copy, it has the recipients messed up.

Re: [RFC PATCH v2 21/22] qapi: Inline and remove QERR_UNSUPPORTED definition

2023-10-05 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Address the comment added in commit 4629ed1e98 > ("qerror: Finally unused, clean up"), from 2015: > > /* >* These macros will go away, please don't use >* in new code, and do not add new ones! >*/ > > Mechanical transformation using: > > $ sed -i

Re: [RFC PATCH v2 21/22] qapi: Inline and remove QERR_UNSUPPORTED definition

2023-10-05 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Address the comment added in commit 4629ed1e98 > ("qerror: Finally unused, clean up"), from 2015: > > /* >* These macros will go away, please don't use >* in new code, and do not add new ones! >*/ > > Mechanical transformation using: > > $ sed -i

Re: [PATCH v2 00/22] qapi: Kill 'qapi/qmp/qerror.h' for good

2023-10-05 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Since v1: > - Fixed checkpatch warnings (Juan) > - Added R-b tags > - New patch for 'vcpu_dirty_limit' > > Hi, > > This is kind of a selfish series. I'm really tired to grep > and read this comment from 2015 in qapi/qmp/qerror.h: > /* >* These

Re: [PATCH v3 14/16] softmmu/vl: Clean up global variable shadowing

2023-10-05 Thread Markus Armbruster
v = qobject_input_visitor_new(obj); > qobject_unref(obj); > } else { > opts = qemu_opts_parse_noisily(qemu_find_opts("object"), > - optarg, true); > + optstr, true); > if (!opts) { > exit(1); > } Same argument as for parse_display_qapi(), and same suggestion. If this goes though my tree, I can implement my two suggestions, if you agree. Reviewed-by: Markus Armbruster

Re: [PATCH v3 09/16] semihosting: Clean up global variable shadowing

2023-10-04 Thread Markus Armbruster
Alex Bennée writes: > Philippe Mathieu-Daudé writes: > >> Fix: >> >> semihosting/config.c:134:49: error: declaration shadows a variable in the >> global scope [-Werror,-Wshadow] >> int qemu_semihosting_config_options(const char *optarg) >>

Re: [PATCH] hw/nvme: Clean up local variable shadowing in nvme_ns_init()

2023-09-29 Thread Markus Armbruster
Klaus Jensen writes: > From: Klaus Jensen > > Fix local variable shadowing in nvme_ns_init(). > > Reported-by: Markus Armbruster > Signed-off-by: Klaus Jensen Queued, thanks!

Re: [PATCH] qemu-nbd: changes towards enabling -Wshadow=local

2023-09-29 Thread Markus Armbruster
Eric Blake writes: > Address all compiler complaints from -Wshadow in qemu-nbd. Several > instances of 'int ret' became shadows when commit 4fbec260 added 'ret' > at a higher scope in main. More interesting was the 'void *ret' > capturing the result of a pthread; where we were conceptually

Re: [PATCH v2 00/22] (few more) Steps towards enabling -Wshadow

2023-09-29 Thread Markus Armbruster
Markus Armbruster writes: > Philippe Mathieu-Daudé writes: > >> Since v1: >> - Addressed review comments >> - Added R-b tags >> - More patches >> >> For rational see Markus cover on >> https://lore.kernel.org/qemu-devel/20230831132546.3525721-1-a

Re: [PATCH v3 0/7] Steps towards enabling -Wshadow=local

2023-09-28 Thread Markus Armbruster
Markus Armbruster writes: > Local variables shadowing other local variables or parameters make the > code needlessly hard to understand. Bugs love to hide in such code. > Evidence: PATCH 1. > > Enabling -Wshadow would prevent bugs like this one. But we'd have to > clean up

Re: [PATCH] test-throttle: don't shadow 'index' variable in do_test_accounting()

2023-09-28 Thread Markus Armbruster
) { > -BucketType index = to_test[is_ops][i]; > +index = to_test[is_ops][i]; > cfg.buckets[index].avg = avg; > } Reviewed-by: Markus Armbruster and queued, thanks!

Re: [PATCH 0/3] (few more) Steps towards enabling -Wshadow [3 more]

2023-09-28 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Just missed while posting v2 eh :/ > (https://lore.kernel.org/qemu-devel/20230904161235.84651-1-phi...@linaro.org/) PATCH 3 has become commit 82fdcd3e140c8d4c63f177ece554f90f2bccdf68. Remainder queued. Thanks!

Re: [PATCH v2 00/22] (few more) Steps towards enabling -Wshadow

2023-09-28 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Since v1: > - Addressed review comments > - Added R-b tags > - More patches > > For rational see Markus cover on > https://lore.kernel.org/qemu-devel/20230831132546.3525721-1-arm...@redhat.com/ > > This series contains few more, my take. > > Based-on:

Re: [PATCH v2 11/22] hw/ide/ahci: Clean up local variable shadowing

2023-09-28 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > hw/ide/ahci.c:1577:23: error: declaration shadows a local variable > [-Werror,-Wshadow] > IDEState *s = >port.ifs[j]; > ^ > hw/ide/ahci.c:1569:29: note: previous declaration is here > void ahci_uninit(AHCIState *s) >

Re: [PATCH v2 20/22] sysemu/device_tree: Clean up local variable shadowing

2023-09-28 Thread Markus Armbruster
we're dealing with at a huge changeset like the tree-wide -Wshadow=local cleanup, I prefer to keep changes minimal to ease review as much as possible. But it's sunk cost now, so Reviewed-by: Markus Armbruster

Re: [PATCH v4 2/4] qcow2: add configurations for zoned format extension

2023-09-25 Thread Markus Armbruster
Sam Li writes: > To configure the zoned format feature on the qcow2 driver, it > requires settings as: the device size, zone model, zone size, > zone capacity, number of conventional zones, limits on zone > resources (max append sectors, max open zones, and max_active_zones). > > To create a

Re: [PATCH v2 7/7] qobject atomics osdep: Make a few macros more hygienic

2023-09-21 Thread Markus Armbruster
Kevin Wolf writes: > Am 20.09.2023 um 20:31 hat Markus Armbruster geschrieben: [...] >> diff --git a/include/qapi/qmp/qobject.h b/include/qapi/qmp/qobject.h >> index 9003b71fd3..d36cc97805 100644 >> --- a/include/qapi/qmp/qobject.h >> +++ b/include/qapi/qmp/qo

[PATCH v3 2/7] migration: Clean up local variable shadowing

2023-09-21 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by: Markus Armbruster Reviewed-by: Peter Xu

[PATCH v3 6/7] block: Clean up local variable shadowing

2023-09-21 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by: Markus Armbruster Reviewed-by: Stefan Hajnoczi

[PATCH v3 0/7] Steps towards enabling -Wshadow=local

2023-09-21 Thread Markus Armbruster
(), use glue() instead [Richard]; pass identifiers instead of __COUNTER__ for readability [Eric]; add comments Markus Armbruster (7): migration/rdma: Fix save_page method to fail on polling error migration: Clean up local variable shadowing ui: Clean up local variable shadowing block

[PATCH v3 3/7] ui: Clean up local variable shadowing

2023-09-21 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by: Markus Armbruster Reviewed-by: Peter Maydell

[PATCH v3 5/7] block/vdi: Clean up local variable shadowing

2023-09-21 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by: Markus Armbruster Reviewed-by: Stefan Hajnoczi

[PATCH v3 7/7] qobject atomics osdep: Make a few macros more hygienic

2023-09-21 Thread Markus Armbruster
os that give us this problem use different variable names on every call. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- include/qapi/qmp/qobject.h | 10 -- include/qemu/atomic.h | 17 - include/qemu/compiler.h| 3 +++ include/qemu/osdep.h | 27

[PATCH v3 1/7] migration/rdma: Fix save_page method to fail on polling error

2023-09-21 Thread Markus Armbruster
: core logic) Fixes: b390afd8c50b (migration/rdma: Fix out of order wrid) Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Peter Xu Reviewed-by: Li Zhijian --- migration/rdma.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/migration/rdma.c b

[PATCH v3 4/7] block/dirty-bitmap: Clean up local variable shadowing

2023-09-21 Thread Markus Armbruster
Wolf Signed-off-by: Markus Armbruster Reviewed-by: Kevin Wolf --- block/monitor/bitmap-qmp-cmds.c | 19 ++- block/qcow2-bitmap.c| 3 +-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/block/monitor/bitmap-qmp-cmds.c b/block/monitor/bitmap-qmp

Re: [PATCH v2 7/7] qobject atomics osdep: Make a few macros more hygienic

2023-09-20 Thread Markus Armbruster
Eric Blake writes: > On Wed, Sep 20, 2023 at 08:31:49PM +0200, Markus Armbruster wrote: > ... >> The only reliable way to prevent unintended variable name capture is >> -Wshadow. >> >> One blocker for enabling it is shadowing hiding in function-like >> ma

[PATCH v2 4/7] block/dirty-bitmap: Clean up local variable shadowing

2023-09-20 Thread Markus Armbruster
Wolf Signed-off-by: Markus Armbruster --- block/monitor/bitmap-qmp-cmds.c | 19 ++- block/qcow2-bitmap.c| 3 +-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/block/monitor/bitmap-qmp-cmds.c b/block/monitor/bitmap-qmp-cmds.c index 55f778f5af

[PATCH v2 6/7] block: Clean up local variable shadowing

2023-09-20 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by: Markus Armbruster Reviewed-by: Stefan Hajnoczi

[PATCH v2 3/7] ui: Clean up local variable shadowing

2023-09-20 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by: Markus Armbruster Reviewed-by: Peter Maydell

[PATCH v2 1/7] migration/rdma: Fix save_page method to fail on polling error

2023-09-20 Thread Markus Armbruster
: core logic) Fixes: b390afd8c50b (migration/rdma: Fix out of order wrid) Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Peter Xu Reviewed-by: Li Zhijian --- migration/rdma.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/migration/rdma.c b

[PATCH v2 2/7] migration: Clean up local variable shadowing

2023-09-20 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by: Markus Armbruster Reviewed-by: Peter Xu

[PATCH v2 7/7] qobject atomics osdep: Make a few macros more hygienic

2023-09-20 Thread Markus Armbruster
os that give us this problem use different variable names on every call. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- include/qapi/qmp/qobject.h | 11 +-- include/qemu/atomic.h | 17 - include/qemu/compiler.h| 3 +++ include/qemu/osdep.h |

[PATCH v2 5/7] block/vdi: Clean up local variable shadowing

2023-09-20 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by: Markus Armbruster Reviewed-by: Stefan Hajnoczi

[PATCH v2 0/7] Steps towards enabling -Wshadow=local

2023-09-20 Thread Markus Armbruster
Markus Armbruster (7): migration/rdma: Fix save_page method to fail on polling error migration: Clean up local variable shadowing ui: Clean up local variable shadowing block/dirty-bitmap: Clean up local variable shadowing block/vdi: Clean up local variable shadowing block: Clean up local

Re: [PATCH 4/7] block/dirty-bitmap: Clean up local variable shadowing

2023-09-20 Thread Markus Armbruster
Kevin Wolf writes: > Am 19.09.2023 um 07:48 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> >> > Am 31.08.2023 um 15:25 hat Markus Armbruster geschrieben: >> >> Local variables shadowing other local variables or parameters make the >> >&

Re: [PATCH 7/7] qobject atomics osdep: Make a few macros more hygienic

2023-09-19 Thread Markus Armbruster
Eric Blake writes: > On Fri, Sep 01, 2023 at 10:48:26AM +0200, Markus Armbruster wrote: >> > Indeed, not fully understanding the preprocessor makes for some >> > interesting death traps. >> >> We use ALL_CAPS for macros to signal "watch out for tr

Re: [PATCH 4/7] block/dirty-bitmap: Clean up local variable shadowing

2023-09-18 Thread Markus Armbruster
Kevin Wolf writes: > Am 31.08.2023 um 15:25 hat Markus Armbruster geschrieben: >> Local variables shadowing other local variables or parameters make the >> code needlessly hard to understand. Tracked down with -Wshadow=local. >> Clean up: delete inner declarations w

Re: [PATCH 1/7] migration/rdma: Fix save_page method to fail on polling error

2023-09-18 Thread Markus Armbruster
Eric Blake writes: > On Thu, Aug 31, 2023 at 03:25:40PM +0200, Markus Armbruster wrote: >> qemu_rdma_save_page() reports polling error with error_report(), then >> succeeds anyway. This is because the variable holding the polling >> status *shadows* the variable

Re: [PATCH 6/7] block: Clean up local variable shadowing

2023-09-18 Thread Markus Armbruster
Kevin Wolf writes: > Am 31.08.2023 um 15:25 hat Markus Armbruster geschrieben: >> Local variables shadowing other local variables or parameters make the >> code needlessly hard to understand. Tracked down with -Wshadow=local. >> Clean up: delete inner declarations w

Re: [PATCH 5/7] block/vdi: Clean up local variable shadowing

2023-09-18 Thread Markus Armbruster
Kevin Wolf writes: > Am 31.08.2023 um 15:25 hat Markus Armbruster geschrieben: >> Local variables shadowing other local variables or parameters make the >> code needlessly hard to understand. Tracked down with -Wshadow=local. >> Clean up: delete inner declarations w

Re: [PATCH v3 2/4] qcow2: add configurations for zoned format extension

2023-09-18 Thread Markus Armbruster
Sam Li writes: > Markus Armbruster 于2023年9月1日周五 19:08写道: >> >> Sam Li writes: >> >> > To configure the zoned format feature on the qcow2 driver, it >> > requires following arguments: the device size, zoned profile, >> >> "Zoned pro

Re: [PATCH 7/7] qobject atomics osdep: Make a few macros more hygienic

2023-09-01 Thread Markus Armbruster
Cédric Le Goater writes: > On 8/31/23 16:30, Eric Blake wrote: >> On Thu, Aug 31, 2023 at 03:25:46PM +0200, Markus Armbruster wrote: >> [This paragraph written last: Bear with my stream of consciousness >> review below, where I end up duplicating some of the conslusions

Re: [PATCH v3 2/2] vhost: Add Error parameter to vhost_scsi_common_start()

2023-09-01 Thread Markus Armbruster
Li Feng writes: > Add a Error parameter to report the real error, like vhost-user-blk. > > Signed-off-by: Li Feng > --- > hw/scsi/vhost-scsi-common.c | 16 +--- > hw/scsi/vhost-scsi.c | 5 +++-- > hw/scsi/vhost-user-scsi.c | 14 --

Re: [PATCH v3 4/5] vhost-user-scsi: support reconnect to backend

2023-09-01 Thread Markus Armbruster
Li Feng writes: > If the backend crashes and restarts, the device is broken. > This patch adds reconnect for vhost-user-scsi. > > Tested with spdk backend. > > Signed-off-by: Li Feng > --- > hw/scsi/vhost-user-scsi.c | 199 +--- >

Re: [PATCH v3 5/5] vhost-user-scsi: start vhost when guest kicks

2023-09-01 Thread Markus Armbruster
Li Feng writes: > Let's keep the same behavior as vhost-user-blk. > > Some old guests kick virtqueue before setting VIRTIO_CONFIG_S_DRIVER_OK. > > Signed-off-by: Li Feng > --- > hw/scsi/vhost-user-scsi.c | 48 +++ > 1 file changed, 44 insertions(+), 4

Re: [PATCH v3 2/4] qcow2: add configurations for zoned format extension

2023-09-01 Thread Markus Armbruster
Sam Li writes: > To configure the zoned format feature on the qcow2 driver, it > requires following arguments: the device size, zoned profile, "Zoned profile" is gone in v3. > zone model, zone size, zone capacity, number of conventional > zones, limits on zone resources (max append sectors,

Re: [PATCH 7/7] qobject atomics osdep: Make a few macros more hygienic

2023-09-01 Thread Markus Armbruster
Eric Blake writes: > On Thu, Aug 31, 2023 at 03:25:46PM +0200, Markus Armbruster wrote: > > [This paragraph written last: Bear with my stream of consciousness > review below, where I end up duplicating some of the conslusions you > reached before the point where I saw where the p

Re: [PATCH 7/7] qobject atomics osdep: Make a few macros more hygienic

2023-09-01 Thread Markus Armbruster
Richard Henderson writes: > On 8/31/23 06:25, Markus Armbruster wrote: >> +#define PASTE(a, b) a##b > > We already have glue() in qemu/compiler.h. Missed it, will fix. > The rest of it looks quite sensible. Thanks!

Re: [PATCH 3/7] ui: Clean up local variable shadowing

2023-09-01 Thread Markus Armbruster
Peter Maydell writes: > On Thu, 31 Aug 2023 at 14:25, Markus Armbruster wrote: >> >> Local variables shadowing other local variables or parameters make the >> code needlessly hard to understand. Tracked down with -Wshadow=local. >> Clean up: delete inner declarat

Re: [PATCH 0/7] Steps towards enabling -Wshadow=local

2023-09-01 Thread Markus Armbruster
Markus Armbruster writes: > Local variables shadowing other local variables or parameters make the > code needlessly hard to understand. Bugs love to hide in such code. > Evidence: PATCH 1. > > Enabling -Wshadow would prevent bugs like this one. But we'd have to > clean up

Re: [PATCH 00/11] (few more) Steps towards enabling -Wshadow

2023-09-01 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > For rational see Markus cover on > https://lore.kernel.org/qemu-devel/20230831132546.3525721-1-arm...@redhat.com/ > > This series contains few more, my take. > > Based-on: <20230831132546.3525721-1-arm...@redhat.com> Awesome, thanks!

[PATCH 3/7] ui: Clean up local variable shadowing

2023-08-31 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by: Markus Armbruster --- ui/gtk.c

[PATCH 6/7] block: Clean up local variable shadowing

2023-08-31 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by: Markus Armbruster --- block.c

<    1   2   3   4   5   6   7   8   9   10   >