* [PATCH] qapi/qom: make some QOM properties depend on the build settings
@ 2024-06-04 13:59 Stefano Garzarella
2024-06-04 15:04 ` Philippe Mathieu-Daudé
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Stefano Garzarella @ 2024-06-04 13:59 UTC (permalink / raw)
To: qemu-devel
Cc: Eric Blake, Eduardo Habkost, Daniel P. Berrangé,
Markus Armbruster, Paolo Bonzini, Stefano Garzarella
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 <armbru@redhat.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
---
qapi/qom.json | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/qapi/qom.json b/qapi/qom.json
index 38dde6d785..ae93313a60 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:
@@ -719,7 +722,8 @@
'base': 'MemoryBackendProperties',
'data': { '*hugetlb': 'bool',
'*hugetlbsize': 'size',
- '*seal': 'bool' } }
+ '*seal': 'bool' },
+ 'if': 'CONFIG_LINUX' }
##
# @MemoryBackendEpcProperties:
@@ -736,7 +740,8 @@
##
{ 'struct': 'MemoryBackendEpcProperties',
'base': 'MemoryBackendProperties',
- 'data': {} }
+ 'data': {},
+ 'if': 'CONFIG_LINUX' }
##
# @PrManagerHelperProperties:
@@ -749,7 +754,8 @@
# Since: 2.11
##
{ 'struct': 'PrManagerHelperProperties',
- 'data': { 'path': 'str' } }
+ 'data': { 'path': 'str' },
+ 'if': 'CONFIG_LINUX' }
##
# @QtestProperties:
@@ -872,7 +878,8 @@
##
{ 'struct': 'RngRandomProperties',
'base': 'RngProperties',
- 'data': { '*filename': 'str' } }
+ 'data': { '*filename': 'str' },
+ 'if': 'CONFIG_POSIX' }
##
# @SevGuestProperties:
--
2.45.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] qapi/qom: make some QOM properties depend on the build settings
2024-06-04 13:59 [PATCH] qapi/qom: make some QOM properties depend on the build settings Stefano Garzarella
@ 2024-06-04 15:04 ` Philippe Mathieu-Daudé
2024-06-25 8:21 ` Stefano Garzarella
2024-07-20 6:37 ` Markus Armbruster
2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-04 15:04 UTC (permalink / raw)
To: Stefano Garzarella, qemu-devel
Cc: Eric Blake, Eduardo Habkost, Daniel P. Berrangé,
Markus Armbruster, Paolo Bonzini
On 4/6/24 15:59, Stefano Garzarella wrote:
> 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 <armbru@redhat.com>
> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
> ---
> qapi/qom.json | 21 ++++++++++++++-------
> 1 file changed, 14 insertions(+), 7 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] qapi/qom: make some QOM properties depend on the build settings
2024-06-04 13:59 [PATCH] qapi/qom: make some QOM properties depend on the build settings Stefano Garzarella
2024-06-04 15:04 ` Philippe Mathieu-Daudé
@ 2024-06-25 8:21 ` Stefano Garzarella
2024-07-20 6:37 ` Markus Armbruster
2 siblings, 0 replies; 4+ messages in thread
From: Stefano Garzarella @ 2024-06-25 8:21 UTC (permalink / raw)
To: qemu-devel, Markus Armbruster
Cc: Eric Blake, Eduardo Habkost, Daniel P. Berrangé,
Paolo Bonzini
Gentle ping :-)
On Tue, Jun 04, 2024 at 03:59:31PM GMT, Stefano Garzarella wrote:
>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 <armbru@redhat.com>
>Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
>---
> qapi/qom.json | 21 ++++++++++++++-------
> 1 file changed, 14 insertions(+), 7 deletions(-)
>
>diff --git a/qapi/qom.json b/qapi/qom.json
>index 38dde6d785..ae93313a60 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:
>@@ -719,7 +722,8 @@
> 'base': 'MemoryBackendProperties',
> 'data': { '*hugetlb': 'bool',
> '*hugetlbsize': 'size',
>- '*seal': 'bool' } }
>+ '*seal': 'bool' },
>+ 'if': 'CONFIG_LINUX' }
>
> ##
> # @MemoryBackendEpcProperties:
>@@ -736,7 +740,8 @@
> ##
> { 'struct': 'MemoryBackendEpcProperties',
> 'base': 'MemoryBackendProperties',
>- 'data': {} }
>+ 'data': {},
>+ 'if': 'CONFIG_LINUX' }
>
> ##
> # @PrManagerHelperProperties:
>@@ -749,7 +754,8 @@
> # Since: 2.11
> ##
> { 'struct': 'PrManagerHelperProperties',
>- 'data': { 'path': 'str' } }
>+ 'data': { 'path': 'str' },
>+ 'if': 'CONFIG_LINUX' }
>
> ##
> # @QtestProperties:
>@@ -872,7 +878,8 @@
> ##
> { 'struct': 'RngRandomProperties',
> 'base': 'RngProperties',
>- 'data': { '*filename': 'str' } }
>+ 'data': { '*filename': 'str' },
>+ 'if': 'CONFIG_POSIX' }
>
> ##
> # @SevGuestProperties:
>--
>2.45.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] qapi/qom: make some QOM properties depend on the build settings
2024-06-04 13:59 [PATCH] qapi/qom: make some QOM properties depend on the build settings Stefano Garzarella
2024-06-04 15:04 ` Philippe Mathieu-Daudé
2024-06-25 8:21 ` Stefano Garzarella
@ 2024-07-20 6:37 ` Markus Armbruster
2 siblings, 0 replies; 4+ messages in thread
From: Markus Armbruster @ 2024-07-20 6:37 UTC (permalink / raw)
To: Stefano Garzarella
Cc: qemu-devel, Eric Blake, Eduardo Habkost, Daniel P. Berrangé,
Paolo Bonzini
I dropped this on the floor. Sorry for the delay!
Stefano Garzarella <sgarzare@redhat.com> writes:
> 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 <armbru@redhat.com>
> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
> ---
> qapi/qom.json | 21 ++++++++++++++-------
> 1 file changed, 14 insertions(+), 7 deletions(-)
>
> diff --git a/qapi/qom.json b/qapi/qom.json
> index 38dde6d785..ae93313a60 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:
> @@ -719,7 +722,8 @@
> 'base': 'MemoryBackendProperties',
> 'data': { '*hugetlb': 'bool',
> '*hugetlbsize': 'size',
> - '*seal': 'bool' } }
> + '*seal': 'bool' },
> + 'if': 'CONFIG_LINUX' }
>
> ##
> # @MemoryBackendEpcProperties:
> @@ -736,7 +740,8 @@
> ##
> { 'struct': 'MemoryBackendEpcProperties',
> 'base': 'MemoryBackendProperties',
> - 'data': {} }
> + 'data': {},
> + 'if': 'CONFIG_LINUX' }
>
> ##
> # @PrManagerHelperProperties:
> @@ -749,7 +754,8 @@
> # Since: 2.11
> ##
> { 'struct': 'PrManagerHelperProperties',
> - 'data': { 'path': 'str' } }
> + 'data': { 'path': 'str' },
> + 'if': 'CONFIG_LINUX' }
>
> ##
> # @QtestProperties:
> @@ -872,7 +878,8 @@
> ##
> { 'struct': 'RngRandomProperties',
> 'base': 'RngProperties',
> - 'data': { '*filename': 'str' } }
> + 'data': { '*filename': 'str' },
> + 'if': 'CONFIG_POSIX' }
>
> ##
> # @SevGuestProperties:
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Squashing in
diff --git a/qapi/crypto.json b/qapi/crypto.json
index e102be337b..9b216cee8e 100644
--- a/qapi/crypto.json
+++ b/qapi/crypto.json
@@ -488,7 +488,8 @@
##
{ 'struct': 'SecretKeyringProperties',
'base': 'SecretCommonProperties',
- 'data': { 'serial': 'int32' } }
+ 'data': { 'serial': 'int32' },
+ 'if': 'CONFIG_SECRET_KEYRING' }
##
# @TlsCredsProperties:
Queued, thanks!
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-07-20 6:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-04 13:59 [PATCH] qapi/qom: make some QOM properties depend on the build settings Stefano Garzarella
2024-06-04 15:04 ` Philippe Mathieu-Daudé
2024-06-25 8:21 ` Stefano Garzarella
2024-07-20 6:37 ` Markus Armbruster
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.