All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: "Thomas Weißschuh" <t-8ch@linutronix.de>
Cc: "Markus Armbruster" <armbru@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Kashyap Chamarthy" <kchamart@redhat.com>,
	qemu-devel@nongnu.org, "Kevin Wolf" <kwolf@redhat.com>,
	"Hanna Czenczek" <hreitz@redhat.com>
Subject: Re: [PATCH v5 2/4] docs/interop/firmware.json: add new enum FirmwareArchitecture
Date: Thu, 18 Jul 2024 15:48:50 +0200	[thread overview]
Message-ID: <878qxyn73x.fsf@pond.sub.org> (raw)
In-Reply-To: <20240718152757-ea83949a-2ef8-4bf8-aeff-c1412baa753c@linutronix.de> ("Thomas Weißschuh"'s message of "Thu, 18 Jul 2024 15:29:13 +0200")

Thomas Weißschuh <t-8ch@linutronix.de> writes:

> On Thu, Jul 18, 2024 at 03:18:07PM GMT, Markus Armbruster wrote:
>> Thomas Weißschuh <thomas.weissschuh@linutronix.de> writes:
>> 
>> > Only a small subset of all architectures supported by qemu make use of
>> > firmware files. Introduce and use a new enum to represent this.
>> >
>> > This also removes the dependency to machine.json from the global qapi
>> > definitions.
>> >
>> > Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
>> > Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
>> > Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
>> > ---
>> >  docs/interop/firmware.json | 29 +++++++++++++++++++++++++++--
>> >  1 file changed, 27 insertions(+), 2 deletions(-)
>> >
>> > diff --git a/docs/interop/firmware.json b/docs/interop/firmware.json
>> > index a26fe81bf2fe..2eb0be11d595 100644
>> > --- a/docs/interop/firmware.json
>> > +++ b/docs/interop/firmware.json
>> > @@ -14,7 +14,10 @@
>> >  # = Firmware
>> >  ##
>> >  
>> > -{ 'include' : 'machine.json' }
>> > +{ 'pragma': {
>> > +    'member-name-exceptions': [
>> > +        'FirmwareArchitecture' # x86_64
>> > +    ] } }
>> >  
>> >  ##
>> >  # @FirmwareOSInterface:
>> > @@ -59,6 +62,28 @@
>> >  { 'enum' : 'FirmwareDevice',
>> >    'data' : [ 'flash', 'kernel', 'memory' ] }
>> >  
>> > +##
>> > +# @FirmwareArchitecture:
>> > +#
>> > +# Enumerations of architectures for which Qemu uses additional firmware files.
>> 
>> docs/devel/qapi-code-gen.rst section "Documentation markup":
>> 
>>     For legibility, wrap text paragraphs so every line is at most 70
>>     characters long.
>> 
>> > +# The values are a subset of the enum SysEmuTarget.
>
> Ack.
>
>> Will consumers of firmware.json care for this?
>
> Most probably not.
>
>> Or is it just a reminder for developers to keep the two enums in sync?
>
> I guess so.
> Should I drop it?

You can drop it.

If you think it's useful for developers, you can instead make it a
non-doc comment, like ...

>> 
>> > +#
>> > +# @aarch64: 64-bit Arm.
>> > +#
>> > +# @arm: 32-bit Arm.
>> > +#
>> > +# @i386: 32-bit x86.
>> > +#
>> > +# @loongarch64: 64-bit LoongArch.
>> > +#
>> > +# @x86_64: 64-bit x86.
>> > +#
>> > +# Since: 9.1
>> 
>> The enum type is indeed since 9.1, but its members are since 3.0, and
>> that's what matters.  Except for @loongarch, which is since 7.1.0 (not
>> documented in qapi/machine.json; I'll fix that).
>> 
>> > +##
>> > +{ 'enum' : 'FirmwareArchitecture',
>> > +  'data' : [ 'aarch64', 'arm', 'i386', 'loongarch64', 'x86_64' ] }

... here:

      # The values are a subset of the enum SysEmuTarget defined in
      # qapi/machine.json.

If you do, consider adding a similar note to FirmwareFormat in the
previous patch.

>> > +
>> > +
>> 
>> Drop one blank line, please.
>
> Ack.
>
>> 
>> >  ##
>> >  # @FirmwareTarget:
>> >  #
>> > @@ -80,7 +105,7 @@
>> >  # Since: 3.0
>> >  ##
>> >  { 'struct' : 'FirmwareTarget',
>> > -  'data'   : { 'architecture' : 'SysEmuTarget',
>> > +  'data'   : { 'architecture' : 'FirmwareArchitecture',
>> >                 'machines'     : [ 'str' ] } }
>> >  
>> >  ##
>> 



  reply	other threads:[~2024-07-18 13:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-18 12:21 [PATCH v5 0/4] docs/interop/firmware.json: scripts/qapi-gen.py compatibility Thomas Weißschuh
2024-07-18 12:21 ` [PATCH v5 1/4] docs/interop/firmware.json: add new enum FirmwareFormat Thomas Weißschuh
2024-07-18 13:09   ` Markus Armbruster
2024-07-18 13:25     ` Thomas Weißschuh
2024-07-18 13:46       ` Markus Armbruster
2024-07-18 14:02     ` Kashyap Chamarthy
2024-07-18 12:21 ` [PATCH v5 2/4] docs/interop/firmware.json: add new enum FirmwareArchitecture Thomas Weißschuh
2024-07-18 13:18   ` Markus Armbruster
2024-07-18 13:29     ` Thomas Weißschuh
2024-07-18 13:48       ` Markus Armbruster [this message]
2024-07-18 12:21 ` [PATCH v5 3/4] docs/interop/firmware.json: convert "Example" section Thomas Weißschuh
2024-07-18 12:30   ` Daniel P. Berrangé
2024-07-18 13:19   ` Markus Armbruster
2024-07-18 12:21 ` [PATCH v5 4/4] docs: add test for firmware.json QAPI Thomas Weißschuh

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=878qxyn73x.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=hreitz@redhat.com \
    --cc=kchamart@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=t-8ch@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.