Re: [PATCH 2/7] qapi: Fix comment indentation

2022-05-02 Thread Markus Armbruster
Andrea Bolognani writes: > It should start on the very first column. > > Signed-off-by: Andrea Bolognani Reviewed-by: Markus Armbruster

Re: [PATCH 1/7] qapi: Drop stray trailing symbol

2022-05-02 Thread Markus Armbruster
te.json > +++ b/qapi/run-state.json > @@ -348,7 +348,7 @@ > # > # @poweroff: Shutdown the VM and exit > # > -# @pause: pause the VM# > +# @pause: pause the VM > # > # Since: 6.0 > ## Reviewed-by: Markus Armbruster

Re: [PATCH v5 0/3] util/thread-pool: Expose minimun and maximum size

2022-04-24 Thread Markus Armbruster
-pool-max=1 > > Note that all patches are bisect friendly and pass all the tests. > > [1] > https://patchwork.ozlabs.org/project/qemu-devel/patch/20220202175234.656711-1-nsaen...@redhat.com/ > > @Stefan I kept your Signed-off-by, since the changes trivial/not > thread-pool rela

Re: [PATCH v5 2/3] util/main-loop: Introduce the main loop into QOM

2022-04-24 Thread Markus Armbruster
Nicolas Saenz Julienne writes: > 'event-loop-base' provides basic property handling for all 'AioContext' > based event loops. So let's define a new 'MainLoopClass' that inherits > from it. This will permit tweaking the main loop's properties through > qapi as well as through the command line

Re: [PATCH v4 3/3] util/event-loop-base: Introduce options to set the thread pool size

2022-04-22 Thread Markus Armbruster
Nicolas Saenz Julienne writes: > On Fri, 2022-04-22 at 13:15 +0200, Markus Armbruster wrote: >> Nicolas Saenz Julienne writes: >> >> > The thread pool regulates itself: when idle, it kills threads until >> > empty, when in demand, it creates new threads until

Re: [PATCH v4 2/3] util/main-loop: Introduce the main loop into QOM

2022-04-22 Thread Markus Armbruster
Nicolas Saenz Julienne writes: > 'event-loop-base' provides basic property handling for all 'AioContext' > based event loops. So let's define a new 'MainLoopClass' that inherits > from it. This will permit tweaking the main loop's properties through > qapi as well as through the command line

Re: [PATCH v4 3/3] util/event-loop-base: Introduce options to set the thread pool size

2022-04-22 Thread Markus Armbruster
Nicolas Saenz Julienne writes: > The thread pool regulates itself: when idle, it kills threads until > empty, when in demand, it creates new threads until full. This behaviour > doesn't play well with latency sensitive workloads where the price of > creating a new thread is too high. For

Re: [PATCH] iotests/108: Fix when missing user_allow_other

2022-04-21 Thread Markus Armbruster
_other here, though, so we can just pass > allow-other=off to fix that. > > Reported-by: Markus Armbruster > Signed-off-by: Hanna Reitz Tested-by: Markus Armbruster Thanks!

Re: [PATCH 32/32] Remove qemu-common.h include from most units

2022-04-06 Thread Markus Armbruster
First of all: thank you so much for completing the "empty out qemu-common.h" job! This is what's left: #ifndef QEMU_COMMON_H #define QEMU_COMMON_H /* Copyright string for -version arguments, About dialogs, etc */ #define QEMU_COPYRIGHT "Copyright (c) 2003-2022 " \

Re: [PATCH experiment 00/16] C++20 coroutine backend

2022-03-31 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Tue, Mar 15, 2022 at 03:50:26PM +0100, Kevin Wolf wrote: [...] >> ...using C++ in coroutine code means that all of the block layer would >> suddenly become C++ and would be most affected by this effect. I'm not >> sure if that's something I would like to see, at

Re: [PATCH experiment 00/16] C++20 coroutine backend

2022-03-31 Thread Markus Armbruster
Hanna Reitz writes: > On 17.03.22 16:11, Paolo Bonzini wrote: >> On 3/16/22 13:32, Stefan Hajnoczi wrote: >>> You can define rules and a way to enforce a subset of C++, but I think >>> over time the code will be C++. A policy that is complicated discourages >>> contributors. >>> >>> For these

Re: [PATCH v2] block-qdict: Fix -Werror=maybe-uninitialized build failure

2022-03-16 Thread Markus Armbruster
Murilo Opsfelder Araújo writes: > Hi, Philippe. > > On Monday, March 14, 2022 10:47:11 AM -03 Philippe Mathieu-Daudé wrote: >> On 11/3/22 23:16, Murilo Opsfelder Araujo wrote: >> > Building QEMU on Fedora 37 (Rawhide Prerelease) ppc64le failed with the >> > following error: >> > >> > $

Re: [PATCH v3 2/3] util/main-loop: Introduce the main loop into QOM

2022-03-16 Thread Markus Armbruster
'if': 'CONFIG_LINUX' }, >'iothread': 'IothreadProperties', > + 'main-loop': 'MainLoopProperties', >'memory-backend-epc': { 'type': 'MemoryBackendEpcProperties', > 'if': 'CONFIG_LINUX' }, >'memory-backend-file':'MemoryBackendFileProperties', QAPI schema Acked-by: Markus Armbruster

Re: [PATCH 22/27] error-report: replace error progname with glib functions

2022-03-16 Thread Markus Armbruster
I'd prefer error: Use GLib to remember the program name marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster

Re: [PATCH 3/3] Use g_new() & friends where that makes obvious sense

2022-03-15 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 15/3/22 14:59, Markus Armbruster wrote: >> Alex Bennée writes: >> >>> Markus Armbruster writes: >>> >>>> g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, >>>> for two reasons. On

[PATCH v2 0/3] Use g_new() & friends where that makes obvious sense

2022-03-15 Thread Markus Armbruster
scan/model.c dropped [Eric] * PATCH 3: Change to semihosting/config.c dropped [Alex] * Commit messages tweaked Markus Armbruster (3): scripts/coccinelle: New use-g_new-etc.cocci 9pfs: Use g_new() & friends where that makes obvious sense Use g_new() & friends where that

[PATCH v2 2/3] 9pfs: Use g_new() & friends where that makes obvious sense

2022-03-15 Thread Markus Armbruster
: Greg Kurz Cc: Christian Schoenebeck Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Christian Schoenebeck Reviewed-by: Alex Bennée Reviewed-by: Greg Kurz --- hw/9pfs/9p-proxy.c | 2 +- hw/9pfs/9p-synth.c | 4 ++-- hw/9pfs/9p.c

[PATCH v2 3/3] Use g_new() & friends where that makes obvious sense

2022-03-15 Thread Markus Armbruster
sizeof(T). Patch created mechanically with: $ spatch --in-place --sp-file scripts/coccinelle/use-g_new-etc.cocci \ --macro-file scripts/cocci-macro-file.h FILES... Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Reviewed

[PATCH v2 1/3] scripts/coccinelle: New use-g_new-etc.cocci

2022-03-15 Thread Markus Armbruster
This is the semantic patch from commit b45c03f585 "arm: Use g_new() & friends where that makes obvious sense". Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée --- scripts/coccinelle/use-g_new-

Re: [PATCH 3/3] Use g_new() & friends where that makes obvious sense

2022-03-15 Thread Markus Armbruster
Eric Blake writes: > On Mon, Mar 14, 2022 at 05:01:08PM +0100, Markus Armbruster wrote: >> g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, >> for two reasons. One, it catches multiplication overflowing size_t. >> Two, it returns T * rather th

Re: [PATCH 3/3] Use g_new() & friends where that makes obvious sense

2022-03-15 Thread Markus Armbruster
Alex Bennée writes: > Markus Armbruster writes: > >> g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, >> for two reasons. One, it catches multiplication overflowing size_t. >> Two, it returns T * rather than void *, which lets the compiler c

Re: [PATCH 3/3] Use g_new() & friends where that makes obvious sense

2022-03-15 Thread Markus Armbruster
Alex Bennée writes: > Markus Armbruster writes: > >> g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, >> for two reasons. One, it catches multiplication overflowing size_t. >> Two, it returns T * rather than void *, which lets the compiler c

Re: [PATCH 3/3] Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Markus Armbruster
Peter Maydell writes: > On Mon, 14 Mar 2022 at 16:01, Markus Armbruster wrote: >> >> g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, >> for two reasons. One, it catches multiplication overflowing size_t. >> Two, it returns T * rather than void

[PATCH 1/3] scripts/coccinelle: New use-g_new-etc.cocci

2022-03-14 Thread Markus Armbruster
This is the semantic patch from commit b45c03f585 "arm: Use g_new() & friends where that makes obvious sense". Signed-off-by: Markus Armbruster --- scripts/coccinelle/use-g_new-etc.cocci | 75 ++ 1 file changed, 75 insertions(+) create mode 100644 scripts/

[PATCH 2/3] 9pfs: Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/9pfs/9p-proxy.c | 2 +- hw/9pfs/9p-synth.c | 4 ++-- hw/9pfs/9p.c | 8 hw/9pfs/codir.c | 6 +++--- tests/qtest/virtio-9p-test.c | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git

[PATCH 3/3] Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Markus Armbruster
sizeof(T). Patch created mechanically with: $ spatch --in-place --sp-file scripts/coccinelle/use-g_new-etc.cocci \ --macro-file scripts/cocci-macro-file.h FILES... Signed-off-by: Markus Armbruster --- include/qemu/timer.h | 2 +- accel/kvm/kvm-all.c

[PATCH 0/3] Use g_new() & friends where that makes obvious

2022-03-14 Thread Markus Armbruster
icts by dropping conflicting hunks, with "git-pull -s recursive -X ours". Or drop entire files with conflicts. If you want me to split off certain parts, please tell me exactly what you want split off, and I'll gladly do the splitting. I don't mind the splitting part, I do mind the *think

Re: [PATCH experiment 06/16] use g_new0 instead of g_malloc0

2022-03-14 Thread Markus Armbruster
Paolo Bonzini writes: > Casting to/from void* must be explicit in C++. g_new0 takes care of that. > > Signed-off-by: Paolo Bonzini > --- > include/qemu/timer.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/qemu/timer.h b/include/qemu/timer.h > index

Re: [PATCH v2] block-qdict: Fix -Werror=maybe-uninitialized build failure

2022-03-14 Thread Markus Armbruster
dict’ declared here > 227 | QDict *subqdict; > |^~~~ > cc1: all warnings being treated as errors > > Fix build failure by expanding the ternary operation. > Tested with `make check-unit` (the check-block-qdict test passed). >

Re: [PATCH] block-qdict: Fix -Werror=maybe-uninitialized build failure

2022-03-11 Thread Markus Armbruster
dict’ declared here > 227 | QDict *subqdict; > |^~~~ > cc1: all warnings being treated as errors > > Fix build failure by initializing the QDict variable with NULL. > > Signed-off-by: Murilo Opsfelder Araujo > Cc: Kevin Wolf &

Re: [PATCH 2/3] util/main-loop: Introduce the main loop into QOM

2022-02-21 Thread Markus Armbruster
; > [1] For example: > -object main-loop,id=main-loop,poll-max-ns= QAPI schema Acked-by: Markus Armbruster

Re: [PATCH v2] nbd/server: Allow MULTI_CONN for shared writable exports

2022-02-16 Thread Markus Armbruster
Eric Blake writes: > According to the NBD spec, a server advertising > NBD_FLAG_CAN_MULTI_CONN promises that multiple client connections will > not see any cache inconsistencies: when properly separated by a single > flush, actions performed by one client will be visible to another > client,

Re: [PATCH] ui/cocoa: Do not alert even without block devices

2022-02-14 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 13/2/22 03:14, Akihiko Odaki wrote: >> Signed-off-by: Akihiko Odaki >> --- >> ui/cocoa.m | 5 - >> 1 file changed, 5 deletions(-) >> diff --git a/ui/cocoa.m b/ui/cocoa.m >> index ac18e14ce01..271a2676026 100644 >> --- a/ui/cocoa.m >> +++ b/ui/cocoa.m

Re: [PATCH v12 5/8] qmp: decode feature & status bits in virtio-status

2022-02-11 Thread Markus Armbruster
MRG_RXBUF", > "HOST_UFO", > +#"HOST_ECN", "HOST_TSO4", "HOST_TSO4", > +#"GUEST_UFO", "GUEST_ECN", "GUEST_TSO6", > +# "GUEST_TSO4", "MAC", "CTRL_GUEST_OFFLOADS", > +#"GUEST_CSUM", "CSUM"] > +#}, > #"use-guest-notifier-mask": true, > #"vm-running": true, > #"queue-sel": 2, > @@ -288,3 +345,62 @@ >'data': { 'path': 'str' }, >'returns': 'VirtioStatus', >'features': [ 'unstable' ] } > + > +## > +# @VirtioDeviceStatus: > +# > +# A structure defined to list the configuration statuses of a virtio > +# device > +# > +# @statuses: List of decoded configuration statuses of the virtio > +#device > +# > +# @unknown-statuses: Virtio device statuses bitmap that have not been decoded > +# > +# Since: 7.0 > +## > + > +{ 'struct': 'VirtioDeviceStatus', > + 'data': { 'statuses': [ 'str' ], > +'*unknown-statuses': 'uint8' } } > + > +## > +# @VhostDeviceProtocols: > +# > +# A structure defined to list the vhost user protocol features of a > +# Vhost User device > +# > +# @protocols: List of decoded vhost user protocol features of a vhost > +# user device > +# > +# @unknown-protocols: Vhost user device protocol features bitmap that > +# have not been decoded > +# > +# Since: 7.0 > +## > + > +{ 'struct': 'VhostDeviceProtocols', > + 'data': { 'protocols': [ 'str' ], > +'*unknown-protocols': 'uint64' } } > + > +## > +# @VirtioDeviceFeatures: > +# > +# The common fields that apply to most Virtio devices. Some devices > +# may not have their own device-specific features (e.g. virtio-rng). > +# > +# @transports: List of transport features of the virtio device > +# > +# @dev-features: List of device-specific features (if the device has > +#unique features) > +# > +# @unknown-dev-features: Virtio device features bitmap that have not > +#been decoded > +# > +# Since: 7.0 > +## > + > +{ 'struct': 'VirtioDeviceFeatures', > + 'data': { 'transports': [ 'str' ], > +'*dev-features': [ 'str' ], > +'*unknown-dev-features': 'uint64' } } I think I'd factor out the common pair of members (list of strings, list of integers). This is not a demand. QAPI schema Acked-by: Markus Armbruster

Re: [PATCH v12 7/8] qmp: add QMP command x-query-virtio-queue-element

2022-02-11 Thread Markus Armbruster
#"used": { > +# "idx": 280, > +# "flags": 0 > +#} > +#} > +# > +# 3. Introspect on virtio-scsi's VirtQueue 2 at head > +# > +# -> { "execute": "x-query-virtio-queue-element", > +# "arguments": { "path": > "/machine/peripheral-anon/device[2]/virtio-backend", > +# "queue": 2 } > +#} > +# <- { "return": { > +#"index": 19, > +#"name": "virtio-scsi", > +#"descs": [ > +# { "flags": ["used", "indirect", "write"], "len": 4099327944, > +# "addr": 12055409292258155293 } > +#], > +#"avail": { > +# "idx": 1147, > +# "flags": 0, > +# "ring": 19 > +#}, > +#"used": { > +# "idx": 280, > +# "flags": 0 > +#} > +#} > +# > +## > + > +{ 'command': 'x-query-virtio-queue-element', > + 'data': { 'path': 'str', 'queue': 'uint16', '*index': 'uint16' }, > + 'returns': 'VirtioQueueElement', > + 'features': [ 'unstable' ] } Preferably with my doc tweak, QAPI schema Acked-by: Markus Armbruster

Re: [PATCH v12 6/8] qmp: add QMP commands for virtio/vhost queue-status

2022-02-11 Thread Markus Armbruster
Jonah Palmer writes: > From: Laurent Vivier > > These new commands show the internal status of a VirtIODevice's > VirtQueue and a vhost device's vhost_virtqueue (if active). > > Signed-off-by: Jonah Palmer QAPI schema Acked-by: Markus Armbruster

Re: [PATCH v11 7/8] qmp: add QMP command x-query-virtio-queue-element

2022-02-11 Thread Markus Armbruster
"used": { > +# "idx": 280, > +# "flags": 0 > +#} > +#} > +# > +# 3. Introspect on virtio-scsi's VirtQueue 2 at head > +# > +# -> { "execute": "x-query-virtio-queue-element", > +# "arguments": { "path": > "/machine/peripheral-anon/device[2]/virtio-backend", > +# "queue": 2 } > +#} > +# <- { "return": { > +#"index": 19, > +#"name": "virtio-scsi", > +#"descs": [ > +# { "flags": ["used", "indirect", "write"], "len": 4099327944, > +# "addr": 12055409292258155293 } > +#], > +#"avail": { > +# "idx": 1147, > +# "flags": 0, > +# "ring": 19 > +#}, > +#"used": { > +# "idx": 280, > +# "flags": 0 > +#} > +#} > +# > +## > + > +{ 'command': 'x-query-virtio-queue-element', > + 'data': { 'path': 'str', 'queue': 'uint16', '*index': 'uint16' }, > + 'returns': 'VirtioQueueElement', > + 'features': [ 'unstable' ] } Preferably with my doc tweak, QAPI schema Acked-by: Markus Armbruster

Re: [PATCH v12 4/8] qmp: add QMP command x-query-virtio-status

2022-02-11 Thread Markus Armbruster
kend, protocol, acked, and features). > Also will decode status bits of a VirtIODevice. > > [Jonah: Similar to previous patch, added a check to @virtio_device_find > to ensure synchronicity between @virtio_list and the devices in the QOM > composition tree.] > > Signed-off-by: J

Re: [PATCH v11 6/8] qmp: add QMP commands for virtio/vhost queue-status

2022-02-11 Thread Markus Armbruster
Jonah Palmer writes: > From: Laurent Vivier > > These new commands show the internal status of a VirtIODevice's > VirtQueue and a vhost device's vhost_virtqueue (if active). > > Signed-off-by: Jonah Palmer QAPI schema Acked-by: Markus Armbruster

Re: [PATCH v12 3/8] qmp: add QMP command x-query-virtio

2022-02-11 Thread Markus Armbruster
is much more convenient > in listing realized virtio devices.] Thanks for explaining this. Whether the convenience is worth the extra code is for the virtio maintainer to decide. > Signed-off-by: Jonah Palmer QAPI schema Acked-by: Markus Armbruster

Re: [PATCH v11 4/8] qmp: add QMP command x-query-virtio-status

2022-02-10 Thread Markus Armbruster
kend, protocol, acked, and features). > Also will decode status bits of a VirtIODevice. > > [Jonah: Similar to previous patch, added a check to @virtio_device_find > to ensure synchronicity between @virtio_list and the devices in the QOM > composition tree.] > > Signed-off-by: J

Re: [PATCH v11 3/8] qmp: add QMP command x-query-virtio

2022-02-10 Thread Markus Armbruster
is much more convenient > in listing realized virtio devices.] Thanks for explaining this. Whether the convenience is worth the extra code is for the virtio maintainer to decide. > > Signed-off-by: Jonah Palmer QAPI schema Acked-by: Markus Armbruster

Re: downstream extensions

2022-02-09 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Hi all! > > We declare a kind of __com.redhat_drive-mirror syntax for downstream > extensions of QAPI. > > That's inconvenient: > > Assume I want to merge now my keep-dirty option for Qcow2 driver "[PATCH v2 > 0/2] qcow2: add keep-dirty open option" to

Re: [PATCH 1/3] qsd: Add pre-init argument parsing pass

2022-01-24 Thread Markus Armbruster
Hanna Reitz writes: > On 21.01.22 15:26, Markus Armbruster wrote: >> Hanna Reitz writes: >> >>> On 21.01.22 11:27, Markus Armbruster wrote: >>>> Hanna Reitz writes: >>>>> The problem I face is that currently there is no ergonomic way to

Re: [PATCH 1/3] qsd: Add pre-init argument parsing pass

2022-01-21 Thread Markus Armbruster
Hanna Reitz writes: > On 21.01.22 11:27, Markus Armbruster wrote: >> Hanna Reitz writes: >>> The problem I face is that currently there is no ergonomic way to wait >>> until the QSD is up and running (besides looping until the PID file >>> exists),

Re: [PATCH 1/3] qsd: Add pre-init argument parsing pass

2022-01-21 Thread Markus Armbruster
Hanna Reitz writes: > On 21.01.22 07:10, Markus Armbruster wrote: >> Hanna Reitz writes: >> >>> On 20.01.22 17:00, Markus Armbruster wrote: >>>> Kevin Wolf writes: >>>> >>>>> Am 19.01.2022 um 14:44 hat Hanna Reitz geschrieben: &

Re: [PATCH 1/3] qsd: Add pre-init argument parsing pass

2022-01-21 Thread Markus Armbruster
Hanna Reitz writes: > On 20.01.22 17:00, Markus Armbruster wrote: >> Kevin Wolf writes: >> >>> Am 19.01.2022 um 14:44 hat Hanna Reitz geschrieben: >>>> On 19.01.22 13:58, Markus Armbruster wrote: >>>>> Hanna Reitz writes: >>>>>

Re: [PATCH 1/3] qsd: Add pre-init argument parsing pass

2022-01-20 Thread Markus Armbruster
Kevin Wolf writes: > Am 19.01.2022 um 14:44 hat Hanna Reitz geschrieben: >> On 19.01.22 13:58, Markus Armbruster wrote: >> > Hanna Reitz writes: >> > >> > > We want to add a --daemonize argument to QSD's command line. >> > >> > Wh

Re: [PATCH 1/3] qsd: Add pre-init argument parsing pass

2022-01-19 Thread Markus Armbruster
Hanna Reitz writes: > We want to add a --daemonize argument to QSD's command line. Why? > This will > require forking the process before we do any complex initialization > steps, like setting up the block layer or QMP. Therefore,

Re: [PATCH v2 2/2] qapi/block: Restrict vhost-user-blk to CONFIG_VHOST_USER_BLK_SERVER

2022-01-14 Thread Markus Armbruster
ator': 'type', >'data': { >'nbd': 'BlockExportOptionsNbd', > - 'vhost-user-blk': 'BlockExportOptionsVhostUserBlk', > + 'vhost-user-blk': { 'type': 'BlockExportOptionsVhostUserBlk', > + 'if': 'CONFIG_VHOST_USER_BLK_SERVER' }, >'fuse': { 'type': 'BlockExportOptionsFuse', > 'if': 'CONFIG_FUSE' } > } } Acked-by: Markus Armbruster

Re: [PATCH 2/2] qapi/block: Restrict vhost-user-blk to CONFIG_VHOST_USER_BLK_SERVER

2021-12-21 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Do not list vhost-user-blk in BlockExportType > when CONFIG_VHOST_USER_BLK_SERVER is disabled. > > Fixes: 90fc91d50b7 ("convert vhost-user-blk server to block export API") My immediate reaction was "what exactly is broken before this patch?" I think it's

Re: [PATCH v10 7/8] qmp: add QMP command x-query-virtio-queue-element

2021-12-07 Thread Markus Armbruster
+#}, > +#} > +# > +# 2. Introspect on virtio-crypto's VirtQueue 1 at head > +# > +# -> { "execute": "x-query-virtio-queue-element", > +# "arguments": { "path": "/machine/peripheral/crypto0/virtio-backend", >

Re: [PATCH v10 6/8] qmp: add QMP commands for virtio/vhost queue-status

2021-12-07 Thread Markus Armbruster
vail-phys": 5216124928, > +#"used-phys": 5216127040, > +#"avail-size": 2054, > +#"desc-size": 16384, > +#"used-size": 8198, > +#"desc": 140141447430144, > +#"num": 1024, > +#"name": "virtio-crypto", > +#"call": 0, > +#"avail": 140141447446528, > +#"desc-phys": 5216108544, > +#"used": 140141447448640, > +#"kick": 0 } > +#} > +# > +# 2. Get vhost_virtqueue status for vhost-vsock > +# > +# -> { "execute": "x-query-virtio-vhost-queue-status", > +# "arguments": { "path": "/machine/peripheral/vsock0/virtio-backend", > +# "queue": 0 } > +#} > +# <- { "return": { > +#"avail-phys": 5182261248, > +#"used-phys": 5182261568, > +#"avail-size": 262, > +#"desc-size": 2048, > +#"used-size": 1030, > +#"desc": 140141413580800, > +#"num": 128, > +#"name": "vhost-vsock", > +#"call": 0, > +#"avail": 140141413582848, > +#"desc-phys": 5182259200, > +#"used": 140141413583168, > +#"kick": 0 } > +#} > +# > +## > + > +{ 'command': 'x-query-virtio-vhost-queue-status', > + 'data': { 'path': 'str', 'queue': 'uint16' }, > + 'returns': 'VirtVhostQueueStatus', > + 'features': [ 'unstable' ] } With my doc remarks addressed, QAPI schema Acked-by: Markus Armbruster

Re: [PATCH v10 4/8] qmp: add QMP command x-query-virtio-status

2021-12-06 Thread Markus Armbruster
"started": true, > +#"device-id": 1, > +#"vhost-dev": { > +# "n-tmp-sections": 4, > +# "n-mem-sections": 4, > +# "max-queues": 1, > +# "backend-cap": 2, > +# "log-size": 0, > +# "backend-features": 0, > +# "nvqs": 2, > +# "protocol-features": 0, > +# "vq-index": 0, > +# "log-enabled": false, > +# "acked-features": 5100306432, > +# "features": 13908344832 > +#}, > +#"backend-features": 6337593319, > +#"start-on-kick": false, > +#"isr": 1, > +#"broken": false, > +#"status": 15, > +#"num-vqs": 3, > +#"guest-features": 5111807911, > +#"host-features": 6337593319, > +#"use-guest-notifier-mask": true, > +#"vm-running": true, > +#"queue-sel": 2, > +#"disabled": false, > +#"vhost-started": true, > +#"use-started": true > +# } > +#} > +# > +## > + > +{ 'command': 'x-query-virtio-status', > + 'data': { 'path': 'str' }, > + 'returns': 'VirtioStatus', > + 'features': [ 'unstable' ] } With my doc remarks addressed, QAPI schema Acked-by: Markus Armbruster

Re: [PATCH v10 3/8] qmp: add QMP command x-query-virtio

2021-12-06 Thread Markus Armbruster
ot;/machine/peripheral-anon/device[2]/virtio-backend", > +#"name": "virtio-scsi" > +#}, > +#{ > +#"path": "/machine/peripheral-anon/device[1]/virtio-backend", > +#"name": "virtio-net" > +#}, > +#{ > +#"path": "/machine/peripheral-anon/device[0]/virtio-backend", > +#"name": "virtio-serial" > +#} > +# ] > +#} > +# > +## > + > +{ 'command': 'x-query-virtio', > + 'returns': [ 'VirtioInfo' ], > + 'features': [ 'unstable' ] } This command is actually redundant: qom-list and qom-get suffice to search /machine/ for virtio devices whose property realized is true. To recognize virtio devices without relying on a naming convention, you can use {"execute": "qom-list-types", "arguments": {"implements": "virtio-device"}} Perhaps we want the command anyway, for convenience. That's for to the virtio maintainer to decide, I guess. In case of "wanted": QAPI schema Reviewed-by: Markus Armbruster But please point out the redundancy in the commit message and/or a comment. [...]

Re: [PATCH v2 00/13] Eliminate drive_get_next()

2021-12-06 Thread Markus Armbruster
Markus Armbruster writes: > drive_get_next() is basically a bad idea. It returns the "next" block > backend of a certain interface type. "Next" means bus=0,unit=N, where > subsequent calls count N up from zero, per interface type. > > This lets you define u

Re: [PATCH v2 01/13] hw/sd/ssi-sd: Do not create SD card within controller's realize

2021-12-06 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Hi Markus, Peter, > > On 11/17/21 17:33, Markus Armbruster wrote: >> ssi_sd_realize() creates an "sd-card" device. This is inappropriate, >> and marked FIXME. >> >> Move it to the boards that create these devices.

Re: [PATCH v2 2/2] docs: Use double quotes instead of single quotes for COLO

2021-11-22 Thread Markus Armbruster
"Rao, Lei" writes: > From: "Rao, Lei" > > Signed-off-by: Lei Rao Reviewed-by: Markus Armbruster

Re: [PATCH v2 1/2] docs: Drop deprecated 'props' from object-add

2021-11-22 Thread Markus Armbruster
"Rao, Lei" writes: > From: "Rao, Lei" > > In commit 5024340745 "qapi/qom: Drop deprecated 'props' from > object-add" (v6.0.0), we also should update documents. > > Signed-off-by: Lei Rao Reviewed-by: Markus Armbruster

Re: [PATCH 2/2] docs: Use double quotes instead of single quotes for COLO

2021-11-21 Thread Markus Armbruster
Looks like this is based on your "[PATCH] docs/COLO-FT.txt: Drop deprecated 'props' from object-add in COLO docs". To make things easier for reviewers and maintainers, please resend all three patches together in a single series. I'd squash "[PATCH] docs/COLO-FT.txt: Drop deprecated 'props' from

Re: [PATCH v9 7/8] qmp: add QMP command x-query-virtio-queue-element

2021-11-19 Thread Markus Armbruster
Jonah Palmer writes: > On 11/10/21 08:52, Markus Armbruster wrote: >> Jonah Palmer writes: >> >>> From: Laurent Vivier >>> >>> This new command shows the information of a VirtQueue element. >>> >>> Signed-off-by: Jonah Palmer >

Re: [PATCH v9 5/8] qmp: decode feature & status bits in virtio-status

2021-11-19 Thread Markus Armbruster
Jonah Palmer writes: > On 11/10/21 08:49, Markus Armbruster wrote: >> Jonah Palmer writes: >> >>> From: Laurent Vivier >>> >>> Display feature names instead of bitmaps for host, guest, and >>> backend for VirtIODevice. >>>

Re: [PATCH-for-6.2?] docs: Spell QEMU all caps

2021-11-18 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Replace Qemu -> QEMU. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Markus Armbruster

Re: [PATCH v2 03/13] hw/arm/npcm7xx_boards: Replace drive_get_next() by drive_get()

2021-11-17 Thread Markus Armbruster
Havard Skinnemoen writes: > On Wed, Nov 17, 2021 at 8:34 AM Markus Armbruster wrote: >> >> drive_get_next() is basically a bad idea. It returns the "next" block >> backend of a certain interface type. "Next" means bus=0,unit=N, where >> subse

[PATCH v2 12/13] hw/arm/aspeed: Replace drive_get_next() by drive_get()

2021-11-17 Thread Markus Armbruster
. This makes the unit numbers explicit in the code. Cc: "Cédric Le Goater" Cc: Peter Maydell Cc: Andrew Jeffery Cc: Joel Stanley Cc: qemu-...@nongnu.org Signed-off-by: Markus Armbruster --- hw/arm/aspeed.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-

[PATCH v2 02/13] hw: Replace trivial drive_get_next() by drive_get()

2021-11-17 Thread Markus Armbruster
ier Cc: qemu-...@nongnu.org Cc: qemu-ri...@nongnu.org Signed-off-by: Markus Armbruster --- hw/arm/cubieboard.c| 2 +- hw/arm/integratorcp.c | 2 +- hw/arm/msf2-som.c | 2 +- hw/arm/orangepi.c | 2 +- hw/arm/raspi.c | 2 +- hw/arm/realview.c | 2 +

[PATCH v2 07/13] hw/arm/mcimx7d-sabre: Replace drive_get_next() by drive_get()

2021-11-17 Thread Markus Armbruster
. Cc: Peter Maydell Cc: Andrey Smirnov Cc: qemu-...@nongnu.org Signed-off-by: Markus Armbruster --- hw/arm/mcimx7d-sabre.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/mcimx7d-sabre.c b/hw/arm/mcimx7d-sabre.c index 935d4b0f1c..50a5ecde31 100644 --- a/hw/arm/mcim

[PATCH v2 06/13] hw/arm/mcimx6ul-evk: Replace drive_get_next() by drive_get()

2021-11-17 Thread Markus Armbruster
Cc: Peter Maydell Cc: Jean-Christophe Dubois Cc: qemu-...@nongnu.org Signed-off-by: Markus Armbruster --- hw/arm/mcimx6ul-evk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/mcimx6ul-evk.c b/hw/arm/mcimx6ul-evk.c index 77fae874b1..28b4886f48 100644 --- a/hw/arm/mc

[PATCH v2 11/13] hw/arm/xilinx_zynq: Replace drive_get_next() by drive_get()

2021-11-17 Thread Markus Armbruster
e unit numbers explicit in the code. Cc: "Edgar E. Iglesias" Cc: Alistair Francis Cc: Peter Maydell Cc: qemu-...@nongnu.org Signed-off-by: Markus Armbruster --- hw/arm/xilinx_zynq.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/hw/arm/xil

[PATCH v2 13/13] blockdev: Drop unused drive_get_next()

2021-11-17 Thread Markus Armbruster
rder changes, or new calls appear "in the middle", unit numbers change. ABI break. Hard to spot in review. The previous commits eliminated all uses. Drop the function. Cc: Kevin Wolf Cc: Hanna Reitz Signed-off-by: Markus Armbruster --- include/sysemu/blockdev.h | 1 - blockdev.c

[PATCH v2 09/13] hw/microblaze: Replace drive_get_next() by drive_get()

2021-11-17 Thread Markus Armbruster
de. Cc: "Edgar E. Iglesias" Signed-off-by: Markus Armbruster --- hw/microblaze/petalogix_ml605_mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/petalogix_ml605_mmu.c index 159db6cbe2..a24fadddca 100644

[PATCH v2 08/13] hw/arm/xlnx-versal-virt: Replace drive_get_next() by drive_get()

2021-11-17 Thread Markus Armbruster
ode. Cc: Alistair Francis Cc: "Edgar E. Iglesias" Cc: Peter Maydell Cc: qemu-...@nongnu.org Signed-off-by: Markus Armbruster --- hw/arm/xlnx-versal-virt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/arm/xlnx-versal-virt.c b/hw/arm/xlnx-versal-virt.c ind

[PATCH v2 03/13] hw/arm/npcm7xx_boards: Replace drive_get_next() by drive_get()

2021-11-17 Thread Markus Armbruster
umbers explicit in the code. Cc: Havard Skinnemoen Cc: Tyrone Ting Cc: Peter Maydell Cc: qemu-...@nongnu.org Signed-off-by: Markus Armbruster --- hw/arm/npcm7xx_boards.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/arm/npcm7xx_boards.c b/hw/arm/npcm7xx_boards.c index de

[PATCH v2 01/13] hw/sd/ssi-sd: Do not create SD card within controller's realize

2021-11-17 Thread Markus Armbruster
r-creatable, because its users should (and do) wire up its GPIO chip-select line. Cc: Peter Maydell Cc: Alistair Francis Cc: Bin Meng Cc: Palmer Dabbelt Cc: "Philippe Mathieu-Daudé" Cc: qemu-...@nongnu.org Cc: qemu-ri...@nongnu.org Signed-off-by: Markus Armbruster --- hw/arm/ste

[PATCH v2 10/13] hw/arm/xlnx-zcu102: Replace drive_get_next() by drive_get()

2021-11-17 Thread Markus Armbruster
code. Cc: Alistair Francis Cc: "Edgar E. Iglesias" Cc: Peter Maydell Cc: qemu-...@nongnu.org Signed-off-by: Markus Armbruster --- hw/arm/xlnx-zcu102.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/arm/xlnx-zcu102.c b/hw/arm/xlnx-zcu102.c index 3dc2b5

[PATCH v2 04/13] hw/arm/versatilepb hw/arm/vexpress: Replace drive_get_next() by drive_get()

2021-11-17 Thread Markus Armbruster
a type with drive_get_next(). Change them to use drive_get() directly. This makes the unit numbers explicit in the code. Cc: Peter Maydell Cc: qemu-...@nongnu.org Signed-off-by: Markus Armbruster --- hw/arm/versatilepb.c | 4 ++-- hw/arm/vexpress.c| 6 +++--- 2 files changed, 5 insertions(+), 5

[PATCH v2 05/13] hw/arm/imx25_pdk: Replace drive_get_next() by drive_get()

2021-11-17 Thread Markus Armbruster
Cc: Peter Maydell Cc: Jean-Christophe Dubois Cc: qemu-...@nongnu.org Signed-off-by: Markus Armbruster --- hw/arm/imx25_pdk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/imx25_pdk.c b/hw/arm/imx25_pdk.c index bd16acd4d9..6dff000163 100644 --- a/hw/arm/imx25_pdk.c +

[PATCH v2 00/13] Eliminate drive_get_next()

2021-11-17 Thread Markus Armbruster
rder changes, or new calls appear "in the middle", unit numbers change. ABI break. Hard to spot in review. Replace its uses by drive_get(), then delete it. Markus Armbruster (13): hw/sd/ssi-sd: Do not create SD card within controller's realize hw: Replace trivial drive_get_

Re: [PATCH RFC 2/2] hw: Replace drive_get_next() by drive_get()

2021-11-16 Thread Markus Armbruster
Cédric Le Goater writes: > On 11/15/21 16:57, Markus Armbruster wrote: >> Philippe Mathieu-Daudé writes: >> >>> On 11/15/21 13:55, Markus Armbruster wrote: >>>> drive_get_next() is basically a bad idea. It returns the "next" block >>>>

Re: [PATCH RFC 2/2] hw: Replace drive_get_next() by drive_get()

2021-11-15 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 11/15/21 16:57, Markus Armbruster wrote: >> Philippe Mathieu-Daudé writes: >>> On 11/15/21 13:55, Markus Armbruster wrote: >>>> drive_get_next() is basically a bad idea. It returns the "next" block >>>> ba

Re: [PATCH RFC 0/2] Eliminate drive_get_next()

2021-11-15 Thread Markus Armbruster
Peter Maydell writes: > On Mon, 15 Nov 2021 at 12:55, Markus Armbruster wrote: >> >> This is RFC because I'm unsure about the removal of >> >> /* Reason: init() method uses drive_get_next() */ >> dc->user_creatable = false; >> >> in

Re: [PATCH RFC 2/2] hw: Replace drive_get_next() by drive_get()

2021-11-15 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 11/15/21 13:55, Markus Armbruster wrote: >> drive_get_next() is basically a bad idea. It returns the "next" block >> backend of a certain interface type. "Next" means bus=0,unit=N, where >> subsequent calls

On configuring onboard block devices with -blockdev (was: [PATCH v4 6/7] hw/nvram: Update at24c EEPROM init function in NPCM7xx boards)

2021-11-15 Thread Markus Armbruster
Kevin Wolf writes: > Am 03.11.2021 um 23:01 hat Hao Wu geschrieben: >> We made 3 changes to the at24c_eeprom_init function in >> npcm7xx_boards.c: >> >> 1. We allow the function to take a I2CBus* as parameter. This allows >>us to attach an EEPROM device behind an I2C mux which is not >>

Re: does drive_get_next(IF_NONE) make sense?

2021-11-15 Thread Markus Armbruster
Peter Maydell writes: > On Mon, 15 Nov 2021 at 13:24, Kevin Wolf wrote: >> Same question as for Hao Wu's series: Wouldn't the proper solution be to >> add a drive property to the machine type? >> >> If you can't use -blockdev, it's not done right. > > Is there an example of "doing it right" for

Re: [PATCH RFC 1/2] hw/sd/ssi-sd: Do not create SD card within controller's realize

2021-11-15 Thread Markus Armbruster
Peter Maydell writes: > On Mon, 15 Nov 2021 at 12:56, Markus Armbruster wrote: >> >> ssi_sd_realize() creates an "sd-card" device. This is inappropriate, >> and marked FIXME. >> >> Move it to the boards that create these devices. Prior art: com

Re: [PATCH RFC 2/2] hw: Replace drive_get_next() by drive_get()

2021-11-15 Thread Markus Armbruster
Peter Maydell writes: > On Mon, 15 Nov 2021 at 12:55, Markus Armbruster wrote: >> >> drive_get_next() is basically a bad idea. It returns the "next" block >> backend of a certain interface type. "Next" means bus=0,unit=N, where >> subsequent

[PATCH RFC 1/2] hw/sd/ssi-sd: Do not create SD card within controller's realize

2021-11-15 Thread Markus Armbruster
ssi_sd_realize() creates an "sd-card" device. This is inappropriate, and marked FIXME. Move it to the boards that create these devices. Prior art: commit eb4f566bbb for device "generic-sdhci", and commit 26c607b86b for device "pl181". Signed-off-by: Markus Armbr

[PATCH RFC 2/2] hw: Replace drive_get_next() by drive_get()

2021-11-15 Thread Markus Armbruster
rder changes, or new calls appear "in the middle", unit numbers change. ABI break. Hard to spot in review. Explicit is better than implicit: use drive_get() directly. Signed-off-by: Markus Armbruster --- include/sysemu/blockdev.h | 1 - blockdev.c |

[PATCH RFC 0/2] Eliminate drive_get_next()

2021-11-15 Thread Markus Armbruster
may be devices that need manual wiring to work, yet don't have user_creatable unset. Bugs if you ask me. I don't have smart ideas on how to track them down. Markus Armbruster (2): hw/sd/ssi-sd: Do not create SD card within controller's realize hw: Replace drive_get_next() by drive_get() include/sys

Re: does drive_get_next(IF_NONE) make sense?

2021-11-14 Thread Markus Armbruster
Peter Maydell writes: > On Fri, 12 Nov 2021 at 13:34, Markus Armbruster wrote: >> >> Thomas Huth writes: >> >> > On 03/11/2021 09.41, Markus Armbruster wrote: >> >> Peter Maydell writes: >> >> >> >>> Does it make sense

Re: does drive_get_next(IF_NONE) make sense?

2021-11-12 Thread Markus Armbruster
Thomas Huth writes: > On 03/11/2021 09.41, Markus Armbruster wrote: >> Peter Maydell writes: >> >>> Does it make sense for a device/board to do drive_get_next(IF_NONE) ? >> Short answer: hell, no! ;) > > Would it make sense to add an "assert(ty

Re: [PATCH 1/3] qdict: make available dump_qobject(), dump_qdict(), dump_qlist()

2021-11-10 Thread Markus Armbruster
Laurent Vivier writes: > move them from block/qapi.c to qobject/qdict.c, qobject/qlist.c, > qobject/qobject.c > > This is useful to debug qobjects > > Signed-off-by: Laurent Vivier I think qobject_to_json_pretty() is better suited to debugging, because it preserves differences like the one

Re: [PATCH v9 7/8] qmp: add QMP command x-query-virtio-queue-element

2021-11-10 Thread Markus Armbruster
Jonah Palmer writes: > From: Laurent Vivier > > This new command shows the information of a VirtQueue element. > > Signed-off-by: Jonah Palmer [...] > diff --git a/qapi/virtio.json b/qapi/virtio.json > index 0f65044..c57fbc5 100644 > --- a/qapi/virtio.json > +++ b/qapi/virtio.json > @@

Re: [PATCH v9 5/8] qmp: decode feature & status bits in virtio-status

2021-11-10 Thread Markus Armbruster
Jonah Palmer writes: > From: Laurent Vivier > > Display feature names instead of bitmaps for host, guest, and > backend for VirtIODevice. > > Display status names instead of bitmaps for VirtIODevice. > > Display feature names instead of bitmaps for backend, protocol, > acked, and features

Re: [PATCH v9 8/8] hmp: add virtio commands

2021-11-10 Thread Markus Armbruster
Jonah Palmer writes: > From: Laurent Vivier > > This patch implements the HMP versions of the virtio QMP commands. > > Signed-off-by: Jonah Palmer > --- > hmp-commands-info.hx | 218 ++ > include/monitor/hmp.h | 5 + > monitor/hmp-cmds.c| 358 >

Re: [PATCH v9 4/8] qmp: add QMP command x-query-virtio-status

2021-11-10 Thread Markus Armbruster
Jonah Palmer writes: > From: Laurent Vivier > > This new command shows the status of a VirtIODevice, including > its corresponding vhost device status (if active). > > Next patch will improve output by decoding feature bits, including > vhost device's feature bits (backend, protocol, acked, and

Re: [PATCH v9 3/8] qmp: add QMP command x-query-virtio

2021-11-10 Thread Markus Armbruster
Jonah Palmer writes: > From: Laurent Vivier > > This new command lists all the instances of VirtIODevice with > their QOM paths and virtio type/name. > > Signed-off-by: Jonah Palmer [...] > diff --git a/qapi/qapi-schema.json b/qapi/qapi-schema.json > index 4912b97..1512ada 100644 > ---

Re: Poking around bdrv_is_inserted()

2021-11-09 Thread Markus Armbruster
Kevin Wolf writes: > Am 09.11.2021 um 07:44 hat Markus Armbruster geschrieben: >> Screwed up qemu-de...@nongnu.org, sorry for the inconvenience. >> >> Markus Armbruster writes: >> >> > bdrv_is_inserted() returns false when: >> > >> >

Re: Poking around bdrv_is_inserted()

2021-11-08 Thread Markus Armbruster
Screwed up qemu-de...@nongnu.org, sorry for the inconvenience. Markus Armbruster writes: > bdrv_is_inserted() returns false when: > > /** > * Return TRUE if the media is present > */ > bool bdrv_is_inserted(BlockDriverState *bs) > { > Bl

Poking around bdrv_is_inserted()

2021-11-08 Thread Markus Armbruster
bdrv_is_inserted() returns false when: /** * Return TRUE if the media is present */ bool bdrv_is_inserted(BlockDriverState *bs) { BlockDriver *drv = bs->drv; BdrvChild *child; if (!drv) { return false; 1. @bs has no driver (this is how

<    3   4   5   6   7   8   9   10   11   12   >