On Tue, Jul 12, 2022 at 16:25:48 +0200, Michal Privoznik wrote:
> We accept TPM version in the domain XML. However, supported
> version depends on the host configuration (swtpm_setup binary)

s/configuration//

AFAIK it depends on the build parameters of swtpm which isn't really
user-configurable.

> and thus it may be tricky for users (or mgmt applications) chose
> a version. Introduce machinery for reporting supported version in
> domain capabilities.
> 
> Signed-off-by: Michal Privoznik <mpriv...@redhat.com>
> ---
>  docs/formatdomaincaps.rst      | 6 ++++++
>  src/conf/domain_capabilities.c | 1 +
>  src/conf/domain_capabilities.h | 1 +
>  3 files changed, 8 insertions(+)
> 
> diff --git a/docs/formatdomaincaps.rst b/docs/formatdomaincaps.rst
> index 384b5eb7ea..a60e610c4c 100644
> --- a/docs/formatdomaincaps.rst
> +++ b/docs/formatdomaincaps.rst
> @@ -513,6 +513,10 @@ TPM device capabilities are exposed under the ``tpm`` 
> element. For instance:
>            <value>passthrough</value>
>            <value>emulator</value>
>          </enum>
> +        <enum name='backendVersion'>
> +          <value>1.2</value>
> +          <value>2.0</value>
> +        </enum>
>        </tpm>
>        ...
>      </devices>
> @@ -522,6 +526,8 @@ TPM device capabilities are exposed under the ``tpm`` 
> element. For instance:
>     Options for the ``model`` attribute of the <tpm/> element.
>  ``backendModel``
>     Options for the ``type`` attribute of the <tpm><backend/> element.
> +``backendVersion``
> +   Options for the ``version`` attribute of the <tpm><backend/> element.

XML elements as literals; same as in 1/1.

Reviewed-by: Peter Krempa <pkre...@redhat.com>

Reply via email to