From patchwork Mon Mar 11 11:46:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13588686 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 196C1C54E58 for ; Mon, 11 Mar 2024 11:47:58 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rje7m-0002gR-RV; Mon, 11 Mar 2024 07:47:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rje7k-0002fO-RI for qemu-devel@nongnu.org; Mon, 11 Mar 2024 07:47:21 -0400 Received: from galois.linutronix.de ([2a0a:51c0:0:12e:550::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rje7h-00020Q-Jr for qemu-devel@nongnu.org; Mon, 11 Mar 2024 07:47:20 -0400 From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1710157620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fZItAWnqUEX8vithBjqnl8CZ72qCPO7vT0BxocYPqO8=; b=PWxxp24C1v8C1IzVkOJ9pCCCqkelDa0ozny7K8F6XO9ZpwiEfvxLaTF/JeF1hmvTQjCu/j rNVkAaqfQXjlMzgmx/trcLpE7tDL/DTgjT3aD1t7DTlBwHgsGM8Pt4k47aLZ0NXWVqZMyV feqWWS4uMZzk5Hak9UpjbNdGVs3P+39b7NKEJ/gEdmVym95mpLjRzNiSPT9f8ik8whZqOb JEUC/tZpNkJ1rdaofkmC6x/ep2cjr3rvHChkAdGaP38l9S+0OV7guwL/hYCfXVZYNBoT0+ yswnyaJB9+pjxImQ9+duDWhYRTCf4HIISBP8ZAz0qQVLPiiVm3CFPyv0yW1n4A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1710157620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fZItAWnqUEX8vithBjqnl8CZ72qCPO7vT0BxocYPqO8=; b=qmB9ZIZppX/ea8IBtlxCtoySEKhCQrkaqiwgcAIEVN6yL2t/gfg8inMFXCDoFjboyUOngN 7PvNfF9VGOyRnjBQ== Date: Mon, 11 Mar 2024 12:46:58 +0100 Subject: [PATCH v3 1/3] docs/interop/firmware.json: add new enum FirmwareFormat MIME-Version: 1.0 Message-Id: <20240311-qapi-firmware-json-v3-1-ceea6e35eb4a@linutronix.de> References: <20240311-qapi-firmware-json-v3-0-ceea6e35eb4a@linutronix.de> In-Reply-To: <20240311-qapi-firmware-json-v3-0-ceea6e35eb4a@linutronix.de> To: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?D?= =?utf-8?q?aniel_P=2E_Berrang=C3=A9?= , Kashyap Chamarthy Cc: qemu-devel@nongnu.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1710157619; l=1429; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=laicSrSkSXm9Ia/XiliQJVD3W1LHm2SG548uT8BmFFg=; b=pPU1KP3gDgicwIFk7tPVD1wjafW1q+ZZGocIBDZHZ8lLFzakOBpQFZNl7q9AxVx6nka8bsBrK SpIu9C2atcyBbaMw0Xw5flkf1RqHB5KZ0IxkC1HTY9s+bmaujB84qkj X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= Received-SPF: pass client-ip=2a0a:51c0:0:12e:550::1; envelope-from=t-8ch@linutronix.de; helo=galois.linutronix.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org 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 of firmware.json on the global qapi definitions. Suggested-by: Daniel P. Berrangé Signed-off-by: Thomas Weißschuh --- docs/interop/firmware.json | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/interop/firmware.json b/docs/interop/firmware.json index 54a1fc6c1041..0e619e8780e7 100644 --- a/docs/interop/firmware.json +++ b/docs/interop/firmware.json @@ -15,7 +15,11 @@ ## { 'include' : 'machine.json' } -{ 'include' : 'block-core.json' } + +{ 'pragma': { + 'documentation-exceptions': [ + 'FirmwareFormat' + ] } } ## # @FirmwareOSInterface: @@ -200,6 +204,16 @@ 'enrolled-keys', 'requires-smm', 'secure-boot', 'verbose-dynamic', 'verbose-static' ] } +## +# @FirmwareFormat: +# +# Formats that are supported for firmware images. +# +# Since: 8.3 +## +{ 'enum': 'FirmwareFormat', + 'data': [ 'raw', 'qcow2' ] } + ## # @FirmwareFlashFile: # @@ -219,7 +233,7 @@ ## { 'struct' : 'FirmwareFlashFile', 'data' : { 'filename' : 'str', - 'format' : 'BlockdevDriver' } } + 'format' : 'FirmwareFormat' } } ## From patchwork Mon Mar 11 11:46:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13588687 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 56BA4C54E58 for ; Mon, 11 Mar 2024 11:48:04 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rje7l-0002fI-A5; Mon, 11 Mar 2024 07:47:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rje7j-0002bV-9z for qemu-devel@nongnu.org; Mon, 11 Mar 2024 07:47:19 -0400 Received: from galois.linutronix.de ([193.142.43.55]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rje7h-00020S-JK for qemu-devel@nongnu.org; Mon, 11 Mar 2024 07:47:18 -0400 From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1710157621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n+1CumBR5I1VKf7ct0/vCUjKk29R1fI/pfV+LJH6q3k=; b=t9qIXCEvhL9/qkiSufsD9EAQ8zqiDZIN5CFMdd2RsM6PipWhBD9Ei+muCbdZLfoBdhjiDY bNplayuam/cS+GQBafm2fjeEmcr9Vf04f62H7dhWrJCmjNzT5m6K3sUBvshPtkEKOSCVLt cmtVAnFxaCGzvezMUF9aSzdj14Jq+ID2cjuhXqKXCEIC6S2fCpN0aClhta6aUnA3QU3Sq6 E+03vxUp4mwFoTphKvoGFnQPHRLE73DEQ/eJvfJkja2+7H1OG0mfDOnbL0TokJGCzpBNsw Xhy8cRiYNxaQdSPpVDafR/TvQqnShmmj5s9kL1dZU1aS8NpLJh3MyM2oLIlcGA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1710157621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n+1CumBR5I1VKf7ct0/vCUjKk29R1fI/pfV+LJH6q3k=; b=+nDdStU5TWqDCBYuLYTI3WN0PehRGGtC9py7gNkA0tNjoNrV8h0+0ikUDFKRThVw2H+kHq NQg41AbMaycBZiBQ== Date: Mon, 11 Mar 2024 12:46:59 +0100 Subject: [PATCH v3 2/3] docs/interop/firmware.json: add new enum FirmwareArchitecture MIME-Version: 1.0 Message-Id: <20240311-qapi-firmware-json-v3-2-ceea6e35eb4a@linutronix.de> References: <20240311-qapi-firmware-json-v3-0-ceea6e35eb4a@linutronix.de> In-Reply-To: <20240311-qapi-firmware-json-v3-0-ceea6e35eb4a@linutronix.de> To: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?D?= =?utf-8?q?aniel_P=2E_Berrang=C3=A9?= , Kashyap Chamarthy Cc: qemu-devel@nongnu.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1710157619; l=1620; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=0xHVxXWzD7VXqa5T4/TbmKlq8x2ymLkKndr+ZaAbuaQ=; b=x8vyiRjC6r+u1kSuZboX7dsEEmNEdAiZf+0YvX2VDlcwVr1wr479wzULc3tZ76lEUDSUZI/jA SIc0RRG+d6xCBuHz9hHqoLz0s3q3AlytlSFpJHgZlDqFtmmI+mScXP1 X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= Received-SPF: pass client-ip=193.142.43.55; envelope-from=t-8ch@linutronix.de; helo=galois.linutronix.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org 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 of firmware.json on the global qapi definitions. Suggested-by: Daniel P. Berrangé Signed-off-by: Thomas Weißschuh --- docs/interop/firmware.json | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/docs/interop/firmware.json b/docs/interop/firmware.json index 0e619e8780e7..54cae6a51b43 100644 --- a/docs/interop/firmware.json +++ b/docs/interop/firmware.json @@ -14,11 +14,13 @@ # = Firmware ## -{ 'include' : 'machine.json' } - { 'pragma': { 'documentation-exceptions': [ + 'FirmwareArchitecture', 'FirmwareFormat' + ], + 'member-name-exceptions': [ + 'FirmwareArchitecture' ] } } ## @@ -64,6 +66,18 @@ { '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. +# +# Since: 8.3 +## +{ 'enum' : 'FirmwareArchitecture', + 'data' : [ 'aarch64', 'arm', 'i386', 'loongarch64', 'x86_64' ] } + + ## # @FirmwareTarget: # @@ -85,7 +99,7 @@ # Since: 3.0 ## { 'struct' : 'FirmwareTarget', - 'data' : { 'architecture' : 'SysEmuTarget', + 'data' : { 'architecture' : 'FirmwareArchitecture', 'machines' : [ 'str' ] } } ## From patchwork Mon Mar 11 11:47:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13588688 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 66009C5475B for ; Mon, 11 Mar 2024 11:48:04 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rje7l-0002fJ-7d; Mon, 11 Mar 2024 07:47:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rje7j-0002bo-Bl for qemu-devel@nongnu.org; Mon, 11 Mar 2024 07:47:19 -0400 Received: from galois.linutronix.de ([193.142.43.55]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rje7h-00020R-JO for qemu-devel@nongnu.org; Mon, 11 Mar 2024 07:47:19 -0400 From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1710157621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Hh8LY9SFh1cJe50bavbUhMkEhXra+MC2tsZynx59ktA=; b=s8XRrXs2WGt9JfKa6XmN2aZEyKDbQvCrYSgIxDgY5qzCUgzXuMAxE5JrLGQo9vGtKDvyo0 wIdpX/uP3VfeYedQZNqh78Ybd7PHT7H9xJ5ppIwx+8DB62sdG835I9JmUji+s2l/eIIlAL cFzkazKAgrnR6oLuBSiKdnCPMqIGPPOXjVBCcwA0v7cnjZ/vN1vRbpXJ9jzneMuCukjab4 pCIEWOliK70nbPE3MzdTJ0SzfQnJUA4di/YYmFpb3SrSkYAgUJlt4G7WKtOdH4M1sro/TZ Ho+nRLyYysGcTxAf5Z8i24BMDOcIRqrirX6exWY4CccpQYQMGtczEYtuVrad0Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1710157621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Hh8LY9SFh1cJe50bavbUhMkEhXra+MC2tsZynx59ktA=; b=f/xFY5IJWWi+IZLPqQQU2nDvFMC+nC8KmOhzHIT67lIz5nDz4N3MNn4R1IdnHJPlCYexSl vWwIcwJ+L9irkJBg== Date: Mon, 11 Mar 2024 12:47:00 +0100 Subject: [PATCH v3 3/3] docs: add test for firmware.json QAPI MIME-Version: 1.0 Message-Id: <20240311-qapi-firmware-json-v3-3-ceea6e35eb4a@linutronix.de> References: <20240311-qapi-firmware-json-v3-0-ceea6e35eb4a@linutronix.de> In-Reply-To: <20240311-qapi-firmware-json-v3-0-ceea6e35eb4a@linutronix.de> To: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?D?= =?utf-8?q?aniel_P=2E_Berrang=C3=A9?= , Kashyap Chamarthy Cc: qemu-devel@nongnu.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1710157619; l=892; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=ZTPnmxO3GaQAbwRnHrwYEOYFCggyLqxrMW5WVuKlvxY=; b=k9ddL7p/xeTXn+KMCe4E3KSByLVc3b/hKSMaRM7vfxSx+mM6O6fIT/Je0t3StXkoa1RHBi2ak Rfsp7CJGyGmAXROtgMQjIcSmzbEFzbBBfPysvJYkqOllKS9fcNG3K8r X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= Received-SPF: pass client-ip=193.142.43.55; envelope-from=t-8ch@linutronix.de; helo=galois.linutronix.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org To make sure that the QAPI description stays valid add a testcase. Suggested-by: Philippe Mathieu-Daudé Link: https://lore.kernel.org/qemu-devel/d9ce0234-4beb-4b90-b14c-76810d3b81d7@linaro.org/ Signed-off-by: Thomas Weißschuh --- 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'])