On Mon, Jun 22, 2026 at 03:07:54PM +0200, Igor Mammedov wrote: > On Mon, 22 Jun 2026 13:55:10 +0100 > Daniel P. Berrangé <[email protected]> wrote: > > > On Fri, Jun 19, 2026 at 07:11:28PM +0800, fanhuang wrote: > > > Add a SpMemDeviceInfo variant to MemoryDeviceInfo so > > > `query-memory-devices` > > > reports each sp-mem instance (id, addr, size, node, memdev), and print it > > > from HMP `info memory-devices`. > > > > > > Signed-off-by: FangSheng Huang <[email protected]> > > > --- > > > qapi/machine.json | 43 ++++++++++++++++++++++++++++++++++++-- > > > hw/core/machine-hmp-cmds.c | 11 ++++++++++ > > > hw/mem/sp-mem.c | 19 +++++++++++++++++ > > > 3 files changed, 71 insertions(+), 2 deletions(-) > > > > > > diff --git a/qapi/machine.json b/qapi/machine.json > > > index 685e4e29b8..777cfc81e1 100644 > > > --- a/qapi/machine.json > > > +++ b/qapi/machine.json > > > @@ -1413,6 +1413,32 @@ > > > } > > > } > > > > > > +## > > > +# @SpMemDeviceInfo: > > > +# > > > +# sp-mem device state information > > > +# > > > +# @id: device's ID > > > +# > > > +# @addr: physical address, where device is mapped > > > +# > > > +# @size: size of memory that the device provides > > > > Is this bytes ? Please include the units in the comment. > > we don't do that with any of memory devices, > given it's QAPI - I guess bytes are implied for 'size' type > (i.e. no suffix massaging)
The trouble with "implied" is that it relies on the reader being familiar with QEMU's normal practice. Perhaps passable for regular QEMU maintainers, but not good for app developers/users consuming QEMU. It doesn't take much to add "in bytes" to these comments to make it clear. Although we don't do it universally/consistently, we do have quite a few examples: $ git grep 'in bytes' | wc -l 95 With regards, Daniel -- |: https://berrange.com ~~ https://hachyderm.io/@berrange :| |: https://libvirt.org ~~ https://entangle-photo.org :| |: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
