qapi: qom: do not use target-specific conditionals
ObjectType and ObjectOptions are defined in a target-independent file, therefore they do not have access to target-specific configuration symbols such as CONFIG_PSERIES or CONFIG_SEV. For this reason, pef-guest and sev-guest are currently omitted when compiling the generated QAPI files. In addition, this causes ObjectType to have different definitions depending on the file that is including qapi-types-qom.h (currently this is not causing any issues, but it is wrong). Define the two enum entries and the SevGuestProperties type unconditionally to avoid the issue. We do not expect to have many target-dependent user-creatable classes, so it is not particularly problematic. Reported-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
10b8eb94c0
commit
a061a71e0d
@ -733,8 +733,7 @@
|
|||||||
'*policy': 'uint32',
|
'*policy': 'uint32',
|
||||||
'*handle': 'uint32',
|
'*handle': 'uint32',
|
||||||
'*cbitpos': 'uint32',
|
'*cbitpos': 'uint32',
|
||||||
'reduced-phys-bits': 'uint32' },
|
'reduced-phys-bits': 'uint32' } }
|
||||||
'if': 'defined(CONFIG_SEV)' }
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# @ObjectType:
|
# @ObjectType:
|
||||||
@ -768,14 +767,14 @@
|
|||||||
{ 'name': 'memory-backend-memfd',
|
{ 'name': 'memory-backend-memfd',
|
||||||
'if': 'defined(CONFIG_LINUX)' },
|
'if': 'defined(CONFIG_LINUX)' },
|
||||||
'memory-backend-ram',
|
'memory-backend-ram',
|
||||||
{'name': 'pef-guest', 'if': 'defined(CONFIG_PSERIES)' },
|
'pef-guest',
|
||||||
'pr-manager-helper',
|
'pr-manager-helper',
|
||||||
'rng-builtin',
|
'rng-builtin',
|
||||||
'rng-egd',
|
'rng-egd',
|
||||||
'rng-random',
|
'rng-random',
|
||||||
'secret',
|
'secret',
|
||||||
'secret_keyring',
|
'secret_keyring',
|
||||||
{'name': 'sev-guest', 'if': 'defined(CONFIG_SEV)' },
|
'sev-guest',
|
||||||
's390-pv-guest',
|
's390-pv-guest',
|
||||||
'throttle-group',
|
'throttle-group',
|
||||||
'tls-creds-anon',
|
'tls-creds-anon',
|
||||||
@ -831,8 +830,7 @@
|
|||||||
'rng-random': 'RngRandomProperties',
|
'rng-random': 'RngRandomProperties',
|
||||||
'secret': 'SecretProperties',
|
'secret': 'SecretProperties',
|
||||||
'secret_keyring': 'SecretKeyringProperties',
|
'secret_keyring': 'SecretKeyringProperties',
|
||||||
'sev-guest': { 'type': 'SevGuestProperties',
|
'sev-guest': 'SevGuestProperties',
|
||||||
'if': 'defined(CONFIG_SEV)' },
|
|
||||||
'throttle-group': 'ThrottleGroupProperties',
|
'throttle-group': 'ThrottleGroupProperties',
|
||||||
'tls-creds-anon': 'TlsCredsAnonProperties',
|
'tls-creds-anon': 'TlsCredsAnonProperties',
|
||||||
'tls-creds-psk': 'TlsCredsPskProperties',
|
'tls-creds-psk': 'TlsCredsPskProperties',
|
||||||
|
Loading…
Reference in New Issue
Block a user