* [PATCH v4 1/3] docs/interop/firmware.json: add new enum FirmwareFormat
2024-07-18 8:27 [PATCH v4 0/3] docs/interop/firmware.json: scripts/qapi-gen.py compatibility Thomas Weißschuh
@ 2024-07-18 8:27 ` Thomas Weißschuh
2024-07-18 8:30 ` Daniel P. Berrangé
2024-07-18 8:27 ` [PATCH v4 2/3] docs/interop/firmware.json: add new enum FirmwareArchitecture Thomas Weißschuh
2024-07-18 8:27 ` [PATCH v4 3/3] docs: add test for firmware.json QAPI Thomas Weißschuh
2 siblings, 1 reply; 7+ messages in thread
From: Thomas Weißschuh @ 2024-07-18 8:27 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, Daniel P. Berrangé,
Kashyap Chamarthy
Cc: qemu-devel, Kevin Wolf, Hanna Czenczek, Thomas Weißschuh
Only a small subset of all blockdev drivers make sense for firmware
images. Introduce and use a new enum to represent this.
This also reduces the dependency on firmware.json from the global qapi
definitions.
Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
docs/interop/firmware.json | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/docs/interop/firmware.json b/docs/interop/firmware.json
index 54a1fc6c1041..a26fe81bf2fe 100644
--- a/docs/interop/firmware.json
+++ b/docs/interop/firmware.json
@@ -15,7 +15,6 @@
##
{ 'include' : 'machine.json' }
-{ 'include' : 'block-core.json' }
##
# @FirmwareOSInterface:
@@ -200,6 +199,20 @@
'enrolled-keys', 'requires-smm', 'secure-boot',
'verbose-dynamic', 'verbose-static' ] }
+##
+# @FirmwareFormat:
+#
+# Formats that are supported for firmware images.
+#
+# @raw: Raw disk image format.
+#
+# @qcow2: QEMU image format.
+#
+# Since: 9.1
+##
+{ 'enum': 'FirmwareFormat',
+ 'data': [ 'raw', 'qcow2' ] }
+
##
# @FirmwareFlashFile:
#
@@ -219,7 +232,7 @@
##
{ 'struct' : 'FirmwareFlashFile',
'data' : { 'filename' : 'str',
- 'format' : 'BlockdevDriver' } }
+ 'format' : 'FirmwareFormat' } }
##
--
2.45.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v4 1/3] docs/interop/firmware.json: add new enum FirmwareFormat
2024-07-18 8:27 ` [PATCH v4 1/3] docs/interop/firmware.json: add new enum FirmwareFormat Thomas Weißschuh
@ 2024-07-18 8:30 ` Daniel P. Berrangé
0 siblings, 0 replies; 7+ messages in thread
From: Daniel P. Berrangé @ 2024-07-18 8:30 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: Philippe Mathieu-Daudé, Kashyap Chamarthy, qemu-devel,
Kevin Wolf, Hanna Czenczek
On Thu, Jul 18, 2024 at 10:27:38AM +0200, Thomas Weißschuh wrote:
> Only a small subset of all blockdev drivers make sense for firmware
> images. Introduce and use a new enum to represent this.
>
> This also reduces the dependency on firmware.json from the global qapi
> definitions.
>
> Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> ---
> docs/interop/firmware.json | 17 +++++++++++++++--
> 1 file changed, 15 insertions(+), 2 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v4 2/3] docs/interop/firmware.json: add new enum FirmwareArchitecture
2024-07-18 8:27 [PATCH v4 0/3] docs/interop/firmware.json: scripts/qapi-gen.py compatibility Thomas Weißschuh
2024-07-18 8:27 ` [PATCH v4 1/3] docs/interop/firmware.json: add new enum FirmwareFormat Thomas Weißschuh
@ 2024-07-18 8:27 ` Thomas Weißschuh
2024-07-18 8:31 ` Daniel P. Berrangé
2024-07-18 8:27 ` [PATCH v4 3/3] docs: add test for firmware.json QAPI Thomas Weißschuh
2 siblings, 1 reply; 7+ messages in thread
From: Thomas Weißschuh @ 2024-07-18 8:27 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, Daniel P. Berrangé,
Kashyap Chamarthy
Cc: qemu-devel, Kevin Wolf, Hanna Czenczek, Thomas Weißschuh
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>
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.
+# The values are a subset of the enum SysEmuTarget.
+#
+# @aarch64: 64-bit Arm.
+#
+# @arm: 32-bit Arm.
+#
+# @i386: 32-bit x86.
+#
+# @loongarch64: 64-bit LoongArch.
+#
+# @x86_64: 64-bit x86.
+#
+# Since: 9.1
+##
+{ 'enum' : 'FirmwareArchitecture',
+ 'data' : [ 'aarch64', 'arm', 'i386', 'loongarch64', 'x86_64' ] }
+
+
##
# @FirmwareTarget:
#
@@ -80,7 +105,7 @@
# Since: 3.0
##
{ 'struct' : 'FirmwareTarget',
- 'data' : { 'architecture' : 'SysEmuTarget',
+ 'data' : { 'architecture' : 'FirmwareArchitecture',
'machines' : [ 'str' ] } }
##
--
2.45.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v4 2/3] docs/interop/firmware.json: add new enum FirmwareArchitecture
2024-07-18 8:27 ` [PATCH v4 2/3] docs/interop/firmware.json: add new enum FirmwareArchitecture Thomas Weißschuh
@ 2024-07-18 8:31 ` Daniel P. Berrangé
0 siblings, 0 replies; 7+ messages in thread
From: Daniel P. Berrangé @ 2024-07-18 8:31 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: Philippe Mathieu-Daudé, Kashyap Chamarthy, qemu-devel,
Kevin Wolf, Hanna Czenczek
On Thu, Jul 18, 2024 at 10:27:39AM +0200, Thomas Weißschuh wrote:
> 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>
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> ---
> docs/interop/firmware.json | 29 +++++++++++++++++++++++++++--
> 1 file changed, 27 insertions(+), 2 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v4 3/3] docs: add test for firmware.json QAPI
2024-07-18 8:27 [PATCH v4 0/3] docs/interop/firmware.json: scripts/qapi-gen.py compatibility Thomas Weißschuh
2024-07-18 8:27 ` [PATCH v4 1/3] docs/interop/firmware.json: add new enum FirmwareFormat Thomas Weißschuh
2024-07-18 8:27 ` [PATCH v4 2/3] docs/interop/firmware.json: add new enum FirmwareArchitecture Thomas Weißschuh
@ 2024-07-18 8:27 ` Thomas Weißschuh
2024-07-18 8:32 ` Daniel P. Berrangé
2 siblings, 1 reply; 7+ messages in thread
From: Thomas Weißschuh @ 2024-07-18 8:27 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, Daniel P. Berrangé,
Kashyap Chamarthy
Cc: qemu-devel, Kevin Wolf, Hanna Czenczek, Thomas Weißschuh
To make sure that the QAPI description stays valid add a testcase.
Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/qemu-devel/d9ce0234-4beb-4b90-b14c-76810d3b81d7@linaro.org/
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
docs/meson.build | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/docs/meson.build b/docs/meson.build
index 9040f860ae1a..bcca45a342a3 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -99,3 +99,8 @@ if build_docs
alias_target('html', sphinxdocs)
alias_target('man', sphinxmans)
endif
+
+test('QAPI firmware.json regression tests', python,
+ args: [qapi_gen.full_path(), '-o', meson.current_build_dir() / 'qapi',
+ meson.current_source_dir() / 'interop/firmware.json'],
+ env: test_env, suite: ['qapi-schema', 'qapi-interop'])
--
2.45.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v4 3/3] docs: add test for firmware.json QAPI
2024-07-18 8:27 ` [PATCH v4 3/3] docs: add test for firmware.json QAPI Thomas Weißschuh
@ 2024-07-18 8:32 ` Daniel P. Berrangé
0 siblings, 0 replies; 7+ messages in thread
From: Daniel P. Berrangé @ 2024-07-18 8:32 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: Philippe Mathieu-Daudé, Kashyap Chamarthy, qemu-devel,
Kevin Wolf, Hanna Czenczek
On Thu, Jul 18, 2024 at 10:27:40AM +0200, Thomas Weißschuh wrote:
> To make sure that the QAPI description stays valid add a testcase.
>
> Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Link: https://lore.kernel.org/qemu-devel/d9ce0234-4beb-4b90-b14c-76810d3b81d7@linaro.org/
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> ---
> docs/meson.build | 5 +++++
> 1 file changed, 5 insertions(+)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 7+ messages in thread