qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: David Hildenbrand <david@redhat.com>
Cc: qemu-devel@nongnu.org, "Eric Blake" <eblake@redhat.com>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Yanan Wang" <wangyanan55@huawei.com>
Subject: Re: [PATCH v1] qapi: document parameters of query-cpu-model-* QAPI commands
Date: Mon, 25 Mar 2024 16:43:10 +0100	[thread overview]
Message-ID: <87edbyjp0x.fsf@pond.sub.org> (raw)
In-Reply-To: <20240325150141.342720-1-david@redhat.com> (David Hildenbrand's message of "Mon, 25 Mar 2024 16:01:41 +0100")

David Hildenbrand <david@redhat.com> writes:

> Let's document the parameters of these commands, so we can remove them
> from the "documentation-exceptions" list.
>
> While at it, extend the "Returns:" documentation as well, fixing a wrong
> use of CpuModelBaselineInfo vs. CpuModelCompareInfo for
> query-cpu-model-comparison.
>
> Cc: Markus Armbruster <armbru@redhat.com>
> Cc: Eric Blake <eblake@redhat.com>
> Cc: Eduardo Habkost <eduardo@habkost.net>
> Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
> Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>
> Cc: Yanan Wang <wangyanan55@huawei.com>
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
>  qapi/machine-target.json | 46 +++++++++++++++++++++++++++-------------
>  qapi/pragma.json         |  3 ---
>  2 files changed, 31 insertions(+), 18 deletions(-)
>
> diff --git a/qapi/machine-target.json b/qapi/machine-target.json
> index 519adf3220..7883616cce 100644
> --- a/qapi/machine-target.json
> +++ b/qapi/machine-target.json
> @@ -124,11 +124,12 @@
>  ##
>  # @query-cpu-model-comparison:
>  #
> -# Compares two CPU models, returning how they compare in a specific
> -# configuration.  The results indicates how both models compare
> -# regarding runnability.  This result can be used by tooling to make
> -# decisions if a certain CPU model will run in a certain configuration
> -# or if a compatible CPU model has to be created by baselining.
> +# Compares two CPU models, @modela and @modelb, returning how they
> +# compare in a specific configuration.  The results indicates how
> +# both models compare regarding runnability.  This result can be
> +# used by tooling to make decisions if a certain CPU model will
> +# run in a certain configuration or if a compatible CPU model has
> +# to be created by baselining.
>  #
>  # Usually, a CPU model is compared against the maximum possible CPU
>  # model of a certain configuration (e.g. the "host" model for KVM).
> @@ -154,7 +155,14 @@
>  # Some architectures may not support comparing CPU models.  s390x
>  # supports comparing CPU models.
>  #
> -# Returns: a CpuModelBaselineInfo
> +# @modela: description of the first CPU model to compare, referred to as
> +#     "model A" in CpuModelCompareResult
> +#
> +# @modelb: description of the second CPU model to compare, referred to as
> +#     "model B" in CpuModelCompareResult
> +#
> +# Returns: a CpuModelCompareInfo, describing how both CPU models

Scratch the comma?

> +#     compare
>  #
>  # Errors:
>  #     - if comparing CPU models is not supported
> @@ -175,9 +183,9 @@
>  ##
>  # @query-cpu-model-baseline:
>  #
> -# Baseline two CPU models, creating a compatible third model.  The
> -# created model will always be a static, migration-safe CPU model (see
> -# "static" CPU model expansion for details).
> +# Baseline two CPU models, @modela and @modelb, creating a compatible
> +# third model.  The created model will always be a static,
> +# migration-safe CPU model (see "static" CPU model expansion for details).
>  #
>  # This interface can be used by tooling to create a compatible CPU
>  # model out two CPU models.  The created CPU model will be identical
> @@ -204,7 +212,11 @@
>  # Some architectures may not support baselining CPU models.  s390x
>  # supports baselining CPU models.
>  #
> -# Returns: a CpuModelBaselineInfo
> +# @modela: description of the first CPU model to baseline
> +#
> +# @modelb: description of the second CPU model to baseline
> +#
> +# Returns: a CpuModelBaselineInfo, describing the baselined CPU model

Scratch the comma?

>  #
>  # Errors:
>  #     - if baselining CPU models is not supported
> @@ -243,10 +255,10 @@
>  ##
>  # @query-cpu-model-expansion:
>  #
> -# Expands a given CPU model (or a combination of CPU model +
> -# additional options) to different granularities, allowing tooling to
> -# get an understanding what a specific CPU model looks like in QEMU
> -# under a certain configuration.
> +# Expands a given CPU model, @model, (or a combination of CPU model +
> +# additional options) to different granularities, specified by
> +# @type, allowing tooling to get an understanding what a specific
> +# CPU model looks like in QEMU under a certain configuration.
>  #
>  # This interface can be used to query the "host" CPU model.
>  #
> @@ -269,7 +281,11 @@
>  # Some architectures may not support all expansion types.  s390x
>  # supports "full" and "static". Arm only supports "full".
>  #
> -# Returns: a CpuModelExpansionInfo
> +# @model: description of the CPU model to expand
> +#
> +# @type: expansion type, specifying how to expand the CPU model
> +#
> +# Returns: a CpuModelExpansionInfo, describing the expanded CPU model
>  #
>  # Errors:
>  #     - if expanding CPU models is not supported
> diff --git a/qapi/pragma.json b/qapi/pragma.json
> index 6929ab776e..0d82bc1a03 100644
> --- a/qapi/pragma.json
> +++ b/qapi/pragma.json
> @@ -90,9 +90,6 @@
>          'XDbgBlockGraph',
>          'YankInstanceType',
>          'blockdev-reopen',
> -        'query-cpu-model-baseline',
> -        'query-cpu-model-comparison',
> -        'query-cpu-model-expansion',
>          'query-rocker',
>          'query-rocker-ports',
>          'query-stats-schemas',

Reviewed-by: Markus Armbruster <armbru@redhat.com>



  reply	other threads:[~2024-03-25 15:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-25 15:01 [PATCH v1] qapi: document parameters of query-cpu-model-* QAPI commands David Hildenbrand
2024-03-25 15:43 ` Markus Armbruster [this message]
2024-03-25 16:27   ` David Hildenbrand
2024-03-25 17:43     ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87edbyjp0x.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=david@redhat.com \
    --cc=eblake@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=wangyanan55@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).