From 657ea58ba351093cb7f66e0bf7fc65962598de89 Mon Sep 17 00:00:00 2001 From: Stefano Garzarella Date: Tue, 4 Jun 2024 15:59:31 +0200 Subject: [PATCH 1/2] qapi/qom: make some QOM properties depend on the build settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some QOM properties are associated with ObjectTypes that already depend on CONFIG_* switches. So to avoid generating dead code, let's also make the definition of those properties dependent on the corresponding CONFIG_*. Suggested-by: Markus Armbruster Signed-off-by: Stefano Garzarella Message-ID: <20240604135931.311709-1-sgarzare@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Markus Armbruster [Make SecretKeyringProperties conditional, too] Signed-off-by: Markus Armbruster --- qapi/crypto.json | 3 ++- qapi/qom.json | 21 ++++++++++++++------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/qapi/crypto.json b/qapi/crypto.json index f03bdab8c9..39b191e8a2 100644 --- a/qapi/crypto.json +++ b/qapi/crypto.json @@ -485,7 +485,8 @@ ## { 'struct': 'SecretKeyringProperties', 'base': 'SecretCommonProperties', - 'data': { 'serial': 'int32' } } + 'data': { 'serial': 'int32' }, + 'if': 'CONFIG_SECRET_KEYRING' } ## # @TlsCredsProperties: diff --git a/qapi/qom.json b/qapi/qom.json index 7e780e1791..fc035f126a 100644 --- a/qapi/qom.json +++ b/qapi/qom.json @@ -222,7 +222,8 @@ ## { 'struct': 'CanHostSocketcanProperties', 'data': { 'if': 'str', - 'canbus': 'str' } } + 'canbus': 'str' }, + 'if': 'CONFIG_LINUX' } ## # @ColoCompareProperties: @@ -305,7 +306,8 @@ ## { 'struct': 'CryptodevVhostUserProperties', 'base': 'CryptodevBackendProperties', - 'data': { 'chardev': 'str' } } + 'data': { 'chardev': 'str' }, + 'if': 'CONFIG_VHOST_CRYPTO' } ## # @DBusVMStateProperties: @@ -514,7 +516,8 @@ 'data': { 'evdev': 'str', '*grab_all': 'bool', '*repeat': 'bool', - '*grab-toggle': 'GrabToggleKeys' } } + '*grab-toggle': 'GrabToggleKeys' }, + 'if': 'CONFIG_LINUX' } ## # @EventLoopBaseProperties: @@ -718,7 +721,8 @@ 'base': 'MemoryBackendProperties', 'data': { '*hugetlb': 'bool', '*hugetlbsize': 'size', - '*seal': 'bool' } } + '*seal': 'bool' }, + 'if': 'CONFIG_LINUX' } ## # @MemoryBackendShmProperties: @@ -748,7 +752,8 @@ ## { 'struct': 'MemoryBackendEpcProperties', 'base': 'MemoryBackendProperties', - 'data': {} } + 'data': {}, + 'if': 'CONFIG_LINUX' } ## # @PrManagerHelperProperties: @@ -761,7 +766,8 @@ # Since: 2.11 ## { 'struct': 'PrManagerHelperProperties', - 'data': { 'path': 'str' } } + 'data': { 'path': 'str' }, + 'if': 'CONFIG_LINUX' } ## # @QtestProperties: @@ -884,7 +890,8 @@ ## { 'struct': 'RngRandomProperties', 'base': 'RngProperties', - 'data': { '*filename': 'str' } } + 'data': { '*filename': 'str' }, + 'if': 'CONFIG_POSIX' } ## # @SevCommonProperties: From bc2e34e343b40b83cca82409db9c126df2e28c81 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 18 Jul 2024 16:10:01 +0200 Subject: [PATCH 2/2] qapi/machine: Belatedly document target loongarch64 is since 7.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: a8a506c39070 (hw/loongarch: Add support loongson3 virt machine type.) Signed-off-by: Markus Armbruster Message-ID: <20240718141001.3077709-1-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Song Gao --- qapi/machine.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qapi/machine.json b/qapi/machine.json index f9ea6b3e97..fcfd249e2d 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -24,6 +24,8 @@ # # @avr: since 5.1 # +# @loongarch64: since 7.1 +# # .. note:: The resulting QMP strings can be appended to the # "qemu-system-" prefix to produce the corresponding QEMU executable # name. This is true even for "qemu-system-x86_64".