qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 2/4] qapi: add SysEmuTarget to "common.json"


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2 2/4] qapi: add SysEmuTarget to "common.json"
Date: Thu, 26 Apr 2018 14:27:49 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 04/26/2018 01:34 PM, Laszlo Ersek wrote:
> We'll soon need an enumeration type that lists all the softmmu targets
> that QEMU (the project) supports. Introduce @SysEmuTarget to
> "common.json".
> 
> The enum constant @x86_64 is not spelled @x86-64 because the corresponding
> emulator is called qemu-system-x86_64.
> 
> Like other enum types, @SysEmuTarget too can be used for discriminator
> fields in unions. For the @i386 constant, a C-language union member called
> "i386" would be generated. On mingw build hosts, "i386" is a macro
> however. Add "i386" to "polluted_words" at once.
> 
> Cc: "Daniel P. Berrange" <address@hidden>
> Cc: Eric Blake <address@hidden>
> Cc: Markus Armbruster <address@hidden>
> Signed-off-by: Laszlo Ersek <address@hidden>
> ---

> +++ b/qapi/common.json

> +
> +##
> +# @SysEmuTarget:
> +#
> +# The comprehensive enumeration of QEMU system emulation ("softmmu")
> +# targets. Run "./configure --help" in the project root directory, and
> +# look for the *-softmmu targets near the "--target-list" option. The
> +# individual target constants are not documented here, for the time
> +# being.
> +#
> +# Notes: @x86_64 doesn't match the QAPI convention of preferring hyphen
> +#        ("-") over underscore ("_"). This is intentional; the
> +#        @SysEmuTarget constants are supposed to produce QEMU executable
> +#        names when stringified and appended to the "qemu-system-"
> +#        prefix. Put differently, the replacement text of the
> +#        TARGET_NAME preprocessor macro must be possible to look up in
> +#        the list of (stringified) enum constants.

I think the Notes: goes a little bit deep into implementation details,
considering that it is part of the user-facing documentation.  Maybe it
is sufficient to shorten to just:

Notes: The resulting QMP strings can be appended to the "qemu-system-"
prefix to produce the corresponding QEMU executable name.

and maybe add:

This is true even for "qemu-system-x86_64".

and leave the rest for the commit message.

Everything else looks good, so depending on what happens to the Notes
section after other reviewers have chimed in, you can probably add:

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]