Skip to content

Commit f1279fc

Browse files
huthbonzini
authored andcommitted
qapi: Make some ObjectTypes depend on the build settings
Some of the ObjectType entries already depend on CONFIG_* switches. Some others also only make sense with certain configurations, but are currently always listed in the ObjectType enum. Let's make them depend on the correpsonding CONFIG_* switches, too, so that upper layers (like libvirt) have a better way to determine which features are available in QEMU. Signed-off-by: Thomas Huth <[email protected]> Reviewed-by: Markus Armbruster <[email protected]> Message-Id: <[email protected]> [Do the same for MemoryBackendEpcProperties. - Paolo] Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 8c9e7f8 commit f1279fc

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

qapi/qom.json

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,8 @@
794794
'authz-pam',
795795
'authz-simple',
796796
'can-bus',
797-
'can-host-socketcan',
797+
{ 'name': 'can-host-socketcan',
798+
'if': 'CONFIG_LINUX' },
798799
'colo-compare',
799800
'cryptodev-backend',
800801
'cryptodev-backend-builtin',
@@ -808,21 +809,26 @@
808809
'filter-replay',
809810
'filter-rewriter',
810811
'input-barrier',
811-
'input-linux',
812+
{ 'name': 'input-linux',
813+
'if': 'CONFIG_LINUX' },
812814
'iothread',
815+
{ 'name': 'memory-backend-epc',
816+
'if': 'CONFIG_LINUX' },
813817
'memory-backend-file',
814818
{ 'name': 'memory-backend-memfd',
815819
'if': 'CONFIG_LINUX' },
816820
'memory-backend-ram',
817-
'memory-backend-epc',
818821
'pef-guest',
819-
'pr-manager-helper',
822+
{ 'name': 'pr-manager-helper',
823+
'if': 'CONFIG_LINUX' },
820824
'qtest',
821825
'rng-builtin',
822826
'rng-egd',
823-
'rng-random',
827+
{ 'name': 'rng-random',
828+
'if': 'CONFIG_POSIX' },
824829
'secret',
825-
'secret_keyring',
830+
{ 'name': 'secret_keyring',
831+
'if': 'CONFIG_SECRET_KEYRING' },
826832
'sev-guest',
827833
's390-pv-guest',
828834
'throttle-group',
@@ -853,7 +859,8 @@
853859
'authz-listfile': 'AuthZListFileProperties',
854860
'authz-pam': 'AuthZPAMProperties',
855861
'authz-simple': 'AuthZSimpleProperties',
856-
'can-host-socketcan': 'CanHostSocketcanProperties',
862+
'can-host-socketcan': { 'type': 'CanHostSocketcanProperties',
863+
'if': 'CONFIG_LINUX' },
857864
'colo-compare': 'ColoCompareProperties',
858865
'cryptodev-backend': 'CryptodevBackendProperties',
859866
'cryptodev-backend-builtin': 'CryptodevBackendProperties',
@@ -867,20 +874,25 @@
867874
'filter-replay': 'NetfilterProperties',
868875
'filter-rewriter': 'FilterRewriterProperties',
869876
'input-barrier': 'InputBarrierProperties',
870-
'input-linux': 'InputLinuxProperties',
877+
'input-linux': { 'type': 'InputLinuxProperties',
878+
'if': 'CONFIG_LINUX' },
871879
'iothread': 'IothreadProperties',
880+
'memory-backend-epc': { 'type': 'MemoryBackendEpcProperties',
881+
'if': 'CONFIG_LINUX' },
872882
'memory-backend-file': 'MemoryBackendFileProperties',
873883
'memory-backend-memfd': { 'type': 'MemoryBackendMemfdProperties',
874884
'if': 'CONFIG_LINUX' },
875885
'memory-backend-ram': 'MemoryBackendProperties',
876-
'memory-backend-epc': 'MemoryBackendEpcProperties',
877-
'pr-manager-helper': 'PrManagerHelperProperties',
886+
'pr-manager-helper': { 'type': 'PrManagerHelperProperties',
887+
'if': 'CONFIG_LINUX' },
878888
'qtest': 'QtestProperties',
879889
'rng-builtin': 'RngProperties',
880890
'rng-egd': 'RngEgdProperties',
881-
'rng-random': 'RngRandomProperties',
891+
'rng-random': { 'type': 'RngRandomProperties',
892+
'if': 'CONFIG_POSIX' },
882893
'secret': 'SecretProperties',
883-
'secret_keyring': 'SecretKeyringProperties',
894+
'secret_keyring': { 'type': 'SecretKeyringProperties',
895+
'if': 'CONFIG_SECRET_KEYRING' },
884896
'sev-guest': 'SevGuestProperties',
885897
'throttle-group': 'ThrottleGroupProperties',
886898
'tls-creds-anon': 'TlsCredsAnonProperties',

0 commit comments

Comments
 (0)