[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 02/18] qapi: add ModuleInfo schema
From: |
Markus Armbruster |
Subject: |
Re: [PATCH v2 02/18] qapi: add ModuleInfo schema |
Date: |
Mon, 14 Jun 2021 09:48:23 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Gerd Hoffmann <kraxel@redhat.com> writes:
> Add QAPI schema for the module info database.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> qapi/meson.build | 1 +
> qapi/modules.json | 36 ++++++++++++++++++++++++++++++++++++
> qapi/qapi-schema.json | 1 +
> 3 files changed, 38 insertions(+)
> create mode 100644 qapi/modules.json
>
> diff --git a/qapi/meson.build b/qapi/meson.build
> index 376f4ceafe74..596aa5d71168 100644
> --- a/qapi/meson.build
> +++ b/qapi/meson.build
> @@ -36,6 +36,7 @@ qapi_all_modules = [
> 'migration',
> 'misc',
> 'misc-target',
> + 'modules',
> 'net',
> 'pragma',
> 'qom',
> diff --git a/qapi/modules.json b/qapi/modules.json
> new file mode 100644
> index 000000000000..5420977d8765
> --- /dev/null
> +++ b/qapi/modules.json
> @@ -0,0 +1,36 @@
> +# -*- Mode: Python -*-
> +# vim: filetype=python
> +
Missing a section heading like
##
# = Loadable modules
##
Without it, the contents gets appended to whatever section precedes it
in qapi-schema.json, which is almost certainly not what you want.
> +##
> +# @ModuleInfo:
> +#
> +# qemu module metadata
It's spelled QEMU :)
Suggest "Loadable module meta-data".
> +#
> +# @name: module name
> +#
> +# @objs: list of qom objects implemented by the module.
s/qom objects/QOM types/
> +#
> +# @deps: list of other modules this module depends on.
Suggest to spell out that these are @name of other loadable modules.
> +#
> +# @arch: module architecture.
Semantics?
Should this be enum SysEmuTarget?
> +#
> +# @opts: qemu opts implemented by module.
Is this the name of a QemuOptsList?
Since this isn't a list, a module can only ever provide one
QemuOptsList. Sure that's okay?
> +#
> +# Since: 6.1
> +##
> +{ 'struct': 'ModuleInfo',
> + 'data': { 'name' : 'str',
> + '*objs' : ['str'],
> + '*deps' : ['str'],
> + '*arch' : 'str',
> + '*opts' : 'str'}}
> +
> +##
> +# @Modules:
> +#
> +# qemu module list
> +#
> +# Since: 6.1
> +##
> +{ 'struct': 'Modules',
> + 'data': { 'list' : ['ModuleInfo']}}
This defines only types, no QMP commands or events. Why do you need the
types to be QAPI types?
> diff --git a/qapi/qapi-schema.json b/qapi/qapi-schema.json
> index 4912b9744e69..5baa511c2ff5 100644
> --- a/qapi/qapi-schema.json
> +++ b/qapi/qapi-schema.json
> @@ -93,3 +93,4 @@
> { 'include': 'audio.json' }
> { 'include': 'acpi.json' }
> { 'include': 'pci.json' }
> +{ 'include': 'modules.json' }
Is this the place you want the section to be? Remember, generated
documentation follows source order.
- [PATCH v2 00/18] modules: add metadata database, Gerd Hoffmann, 2021/06/10
- [PATCH v2 01/18] modules: add metadata macros, add qxl module annotations, Gerd Hoffmann, 2021/06/10
- [PATCH v2 03/18] modules: add qemu-modinfo utility, Gerd Hoffmann, 2021/06/10
- Re: [PATCH v2 03/18] modules: add qemu-modinfo utility, Gerd Hoffmann, 2021/06/10
- Re: [PATCH v2 03/18] modules: add qemu-modinfo utility, Daniel P . Berrangé, 2021/06/10
- Re: [PATCH v2 03/18] modules: add qemu-modinfo utility, Paolo Bonzini, 2021/06/14
- Re: [PATCH v2 03/18] modules: add qemu-modinfo utility, Paolo Bonzini, 2021/06/14
- Re: [PATCH v2 03/18] modules: add qemu-modinfo utility, Gerd Hoffmann, 2021/06/14
- Re: [PATCH v2 03/18] modules: add qemu-modinfo utility, Daniel P . Berrangé, 2021/06/14
[PATCH v2 02/18] qapi: add ModuleInfo schema, Gerd Hoffmann, 2021/06/10
- Re: [PATCH v2 02/18] qapi: add ModuleInfo schema,
Markus Armbruster <=
[PATCH v2 05/18] modules: add chardev module annotations, Gerd Hoffmann, 2021/06/10
[PATCH v2 04/18] modules: add virtio-gpu module annotations, Gerd Hoffmann, 2021/06/10
[PATCH v2 06/18] modules: add audio module annotations, Gerd Hoffmann, 2021/06/10
[PATCH v2 07/18] modules: add usb-redir module annotations, Gerd Hoffmann, 2021/06/10
[PATCH v2 09/18] modules: add ui module annotations, Gerd Hoffmann, 2021/06/10
[PATCH v2 08/18] modules: add ccid module annotations, Gerd Hoffmann, 2021/06/10
[PATCH v2 11/18] modules: add block module annotations, Gerd Hoffmann, 2021/06/10
[PATCH v2 10/18] modules: add s390x module annotations, Gerd Hoffmann, 2021/06/10