I was under the impression that monitor_register_hmp_info_hrt() does all the
magic here i.e. it declares the underlying QMP command with an x- prefix and
effectively encapsulates the text field in a way that says "this is an
unreliable text opaque for humans"?
The monitor_register_hmp_info_hrt only does the HMP glue side, and
that's only needed if you must dynamically register the HMP command.
For statically registered commands set '.cmd_info_hrt' directly in
the hml-commands-info.hx for the HMP side.
If a qapi/ schema is needed could you explain what it should look like for
this example and where it should go? Looking at the existing .json files I
can't immediately see one which is the right place for this to live.
Take a look in qapi/machine.json for anyof the 'x-query-XXXX' commands
there. The QAPI bit is fairly simple.
if you want to see an illustration of what's different from a previous
pure HMP impl, look at:
commit dd98234c059e6bdb05a52998270df6d3d990332e
Author: Daniel P. Berrangé <berrange@redhat.com>
Date: Wed Sep 8 10:35:43 2021 +0100
qapi: introduce x-query-roms QMP command