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) > > +# > > +# @node: NUMA proximity domain to which the device is assigned > > +# > > +# @memdev: memory backend linked with device > > +# > > +# Since: 11.1 > > +## > > +{ 'struct': 'SpMemDeviceInfo', > > + 'data': { '*id': 'str', > > + 'addr': 'size', > > + 'size': 'size', > > + 'node': 'int', > > + 'memdev': 'str' > > + } > > +} > > + > > With regards, > Daniel
