mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
domcaps: Introduce TPM backendVersion
We accept TPM version in the domain XML. However, supported version depends on the host (swtpm_setup binary) 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 <mprivozn@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
7b37763278
commit
1277a9c884
@ -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.
|
||||
|
||||
Features
|
||||
~~~~~~~~
|
||||
|
@ -539,6 +539,7 @@ virDomainCapsDeviceTPMFormat(virBuffer *buf,
|
||||
|
||||
ENUM_PROCESS(tpm, model, virDomainTPMModelTypeToString);
|
||||
ENUM_PROCESS(tpm, backendModel, virDomainTPMBackendTypeToString);
|
||||
ENUM_PROCESS(tpm, backendVersion, virDomainTPMVersionTypeToString);
|
||||
|
||||
FORMAT_EPILOGUE(tpm);
|
||||
}
|
||||
|
@ -127,6 +127,7 @@ struct _virDomainCapsDeviceTPM {
|
||||
virTristateBool supported;
|
||||
virDomainCapsEnum model; /* virDomainTPMModel */
|
||||
virDomainCapsEnum backendModel; /* virDomainTPMBackendType */
|
||||
virDomainCapsEnum backendVersion; /* virDomainTPMVersion */
|
||||
};
|
||||
|
||||
STATIC_ASSERT_ENUM(VIR_DOMAIN_FS_DRIVER_TYPE_LAST);
|
||||
|
Loading…
x
Reference in New Issue
Block a user