From: Markus Armbruster <armbru@redhat.com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: qemu-devel@nongnu.org,
"Daniel P . Berrangé" <berrange@redhat.com>,
"Stefan Berger" <stefanb@linux.ibm.com>
Subject: Re: [PATCH v11 1/2] tpm: convert tpmdev options processing to new visitor format
Date: Tue, 07 Jan 2025 15:12:09 +0100 [thread overview]
Message-ID: <87y0zm90hy.fsf@pond.sub.org> (raw)
In-Reply-To: <20241212170528.30364-2-James.Bottomley@HansenPartnership.com> (James Bottomley's message of "Thu, 12 Dec 2024 12:05:27 -0500")
James Bottomley <James.Bottomley@HansenPartnership.com> writes:
> Instead of processing the tpmdev options using the old qemu options,
> convert to the new visitor format which also allows the passing of
> json on the command line.
>
> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
> Tested-by: Stefan Berger <stefanb@linux.ibm.com>
> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
[...]
> diff --git a/qapi/tpm.json b/qapi/tpm.json
> index a16a72edb9..e6345d424b 100644
> --- a/qapi/tpm.json
> +++ b/qapi/tpm.json
Looks like you missed my review of v10. I'll copy it below for your
convenience.
> @@ -142,6 +142,27 @@
> 'emulator': 'TPMEmulatorOptionsWrapper' },
> 'if': 'CONFIG_TPM' }
>
> +##
> +# @TpmCreateOptions:
> +#
> +# A union referencing different TPM backend types' configuration options
> +# without the wrapper to be usable by visitors.
reST trap: this is a definition list. Delete the second line's
indentation to make it a paragraph:
# A union referencing different TPM backend types' configuration
# options without the wrapper to be usable by visitors.
> +#
> +# @type: - 'passthrough' The configuration options for the TPM passthrough type
> +# - 'emulator' The configuration options for TPM emulator backend type
docs/devel/qapi-code-gen.rst:
Descriptions start with '\@name:'. The description text must be
indented like this::
# @name: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed
# do eiusmod tempor incididunt ut labore et dolore magna aliqua.
You indent more to make the '-' line up. Hmm.
Let's indent this like @TpmTypeOptions right above, namely
# @type:
# - 'passthrough' The configuration options for the TPM
# passthrough type
# - 'emulator' The configuration options for TPM emulator backend
# type
> +#
> +# @id: The Id of the TPM
What kind of Id is this?
> +#
> +# Since: 9.0
10.0
> +##
> +{ 'union': 'TpmCreateOptions',
> + 'base': { 'type': 'TpmType',
> + 'id' : 'str' },
> + 'discriminator': 'type',
> + 'data': { 'passthrough' : 'TPMPassthroughOptions',
> + 'emulator': 'TPMEmulatorOptions' },
> + 'if': 'CONFIG_TPM' }
This is a flattened version of TpmTypeOptions with additional member
@id.
Flattened: the union branches use Foo instead of FooWrapper.
@id: I guess query-tpm has it one level up, in TPMInfo.
Okay.
> +
> ##
> # @TPMInfo:
> #
[...]
next prev parent reply other threads:[~2025-01-07 14:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-12 17:05 [PATCH v11 0/2] tpm: add mssim backend James Bottomley
2024-12-12 17:05 ` [PATCH v11 1/2] tpm: convert tpmdev options processing to new visitor format James Bottomley
2025-01-07 7:41 ` Philippe Mathieu-Daudé
2025-01-07 14:12 ` Markus Armbruster [this message]
2024-12-12 17:05 ` [PATCH v11 2/2] tpm: add backend for mssim James Bottomley
2024-12-19 17:39 ` Daniel P. Berrangé
2025-01-07 2:11 ` James Bottomley
2025-01-07 8:11 ` Daniel P. Berrangé
2025-01-07 7:40 ` Philippe Mathieu-Daudé
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=87y0zm90hy.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=berrange@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanb@linux.ibm.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 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.