From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Subject: [PULL 03/12] qapi: qom: do not use target-specific conditionals
Date: Thu, 1 Apr 2021 13:22:14 +0200 [thread overview]
Message-ID: <20210401112223.55711-4-pbonzini@redhat.com> (raw)
In-Reply-To: <20210401112223.55711-1-pbonzini@redhat.com>
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>
---
qapi/qom.json | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/qapi/qom.json b/qapi/qom.json
index 2056edc072..db5ac419b1 100644
--- a/qapi/qom.json
+++ b/qapi/qom.json
@@ -733,8 +733,7 @@
'*policy': 'uint32',
'*handle': 'uint32',
'*cbitpos': 'uint32',
- 'reduced-phys-bits': 'uint32' },
- 'if': 'defined(CONFIG_SEV)' }
+ 'reduced-phys-bits': 'uint32' } }
##
# @ObjectType:
@@ -768,14 +767,14 @@
{ 'name': 'memory-backend-memfd',
'if': 'defined(CONFIG_LINUX)' },
'memory-backend-ram',
- {'name': 'pef-guest', 'if': 'defined(CONFIG_PSERIES)' },
+ 'pef-guest',
'pr-manager-helper',
'rng-builtin',
'rng-egd',
'rng-random',
'secret',
'secret_keyring',
- {'name': 'sev-guest', 'if': 'defined(CONFIG_SEV)' },
+ 'sev-guest',
's390-pv-guest',
'throttle-group',
'tls-creds-anon',
@@ -831,8 +830,7 @@
'rng-random': 'RngRandomProperties',
'secret': 'SecretProperties',
'secret_keyring': 'SecretKeyringProperties',
- 'sev-guest': { 'type': 'SevGuestProperties',
- 'if': 'defined(CONFIG_SEV)' },
+ 'sev-guest': 'SevGuestProperties',
'throttle-group': 'ThrottleGroupProperties',
'tls-creds-anon': 'TlsCredsAnonProperties',
'tls-creds-psk': 'TlsCredsPskProperties',
--
2.30.1
next prev parent reply other threads:[~2021-04-01 11:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-01 11:22 [PULL 00/12] Misc patches for QEMU 6.0-rc2 Paolo Bonzini
2021-04-01 11:22 ` [PULL 01/12] meson: Propagate gnutls dependency to migration Paolo Bonzini
2021-04-01 11:22 ` [PULL 02/12] target/i386: Verify memory operand for lcall and ljmp Paolo Bonzini
2021-04-01 11:22 ` Paolo Bonzini [this message]
2021-04-01 11:22 ` [PULL 04/12] replay: fix recursive checkpoints Paolo Bonzini
2021-04-01 11:22 ` [PULL 05/12] Revert "qom: use qemu_printf to print help for user-creatable objects" Paolo Bonzini
2021-04-01 11:22 ` [PULL 06/12] icount: get rid of static variable Paolo Bonzini
2021-04-01 11:22 ` [PULL 07/12] replay: notify CPU on event Paolo Bonzini
2021-04-01 11:22 ` [PULL 08/12] target/openrisc: fix icount handling for timer instructions Paolo Bonzini
2021-04-01 11:22 ` [PULL 09/12] configure: Do not use default_feature for EXESUF Paolo Bonzini
2021-04-01 11:22 ` [PULL 10/12] hexagon: do not specify executables as inputs Paolo Bonzini
2021-04-01 11:22 ` [PULL 11/12] hexagon: do not specify Python scripts " Paolo Bonzini
2021-04-01 11:22 ` [PULL 12/12] docs: Add a QEMU Code of Conduct and Conflict Resolution Policy document Paolo Bonzini
2021-04-01 16:08 ` [PULL 00/12] Misc patches for QEMU 6.0-rc2 Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210401112223.55711-4-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thomas.lendacky@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).