[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 29/53] qapi: introduce x-query-registers QMP command
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v2 29/53] qapi: introduce x-query-registers QMP command |
Date: |
Tue, 14 Sep 2021 19:15:28 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
On 9/14/21 6:04 PM, Eric Blake wrote:
> On Tue, Sep 14, 2021 at 03:20:18PM +0100, Daniel P. Berrangé wrote:
>> This is a counterpart to the HMP "info registers" command. It is being
>> added with an "x-" prefix because this QMP command is intended as an
>> ad hoc debugging tool and will thus not be modelled in QAPI as fully
>> structured data, nor will it have long term guaranteed stability.
>> The existing HMP command is rewritten to call the QMP command.
>>
>> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
>> ---
>> +##
>> +# @HumanReadableText:
>> +#
>> +# @human-readable-text: Formatted output intended for humans.
>> +#
>> +# Since: 6.2.0
>
> Should be '6.2', not '6.2.0', to match...
>
>> +#
>> +##
>> +{ 'struct': 'HumanReadableText',
>> + 'data': { 'human-readable-text': 'str' } }
>> diff --git a/qapi/machine.json b/qapi/machine.json
>> index 157712f006..8737efa865 100644
>> --- a/qapi/machine.json
>> +++ b/qapi/machine.json
>> @@ -1312,3 +1312,18 @@
>> '*cores': 'int',
>> '*threads': 'int',
>> '*maxcpus': 'int' } }
>> +
>> +##
>> +# @x-query-registers:
>> +#
>> +# @cpu: the CPU number to query. If omitted, queries all CPUs
>> +#
>> +# Query information on the CPU registers
>> +#
>> +# Returns: CPU state in an architecture-specific format
>> +#
>> +# Since: 6.2
>
> ...the prevailing style.
>
> If it were likely that someone might backport just some (but not all)
> added x- commands, it may be wise to separate the creation of
> HumanReadableText into its own patch to backport that but not
> x-query-registers. But I rather suspect anyone backporting this will
> take the series wholesale, so the coupling in this patch is not worth
> worrying about.
IIUC the problem is this breaks bisection, as you get a QAPI error:
qapi/qapi-commands-machine.c:123:13: error:
‘qmp_marshal_output_HumanReadableText’
defined but not used [-Werror=unused-function]
123 | static void
qmp_marshal_output_HumanReadableText(HumanReadableText *ret_in,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
See the comment added in commit 1f7b9f3181e
("qapi/commands: add #if conditions to commands").
>
>> +##
>> +{ 'command': 'x-query-registers',
>> + 'data': {'*cpu': 'int' },
>> + 'returns': 'HumanReadableText' }
>> --
>> 2.31.1
>>
>
[PATCH v2 30/53] qapi: introduce x-query-roms QMP command, Daniel P . Berrangé, 2021/09/14
[PATCH v2 31/53] qapi: introduce x-query-profile QMP command, Daniel P . Berrangé, 2021/09/14
[PATCH v2 32/53] qapi: introduce x-query-numa QMP command, Daniel P . Berrangé, 2021/09/14
[PATCH v2 33/53] qapi: introduce x-query-usb QMP command, Daniel P . Berrangé, 2021/09/14
[PATCH v2 35/53] qapi: introduce x-query-ramblock QMP command, Daniel P . Berrangé, 2021/09/14
[PATCH v2 34/53] qapi: introduce x-query-rdma QMP command, Daniel P . Berrangé, 2021/09/14
[PATCH v2 36/53] qapi: introduce x-query-skeys QMP command, Daniel P . Berrangé, 2021/09/14