diff options
author | Stefan Berger <stefanb@linux.vnet.ibm.com> | 2017-11-03 18:10:01 -0400 |
---|---|---|
committer | Stefan Berger <stefanb@linux.vnet.ibm.com> | 2017-12-14 23:39:15 -0500 |
commit | b21e6aaf4a1e25c22a603e22ef96b3a31d3013aa (patch) | |
tree | f7d9e09aefd608d3edaead9fb13b58162163571e /include | |
parent | d3fd953f06700ebe2d15825d4399f7cd3e31af34 (diff) |
tpm: Move getting TPM buffer size to backends
Rather than setting the size of the TPM buffer in the front-end,
query the backend for the size of the buffer. In this patch we
just move the hard-coded buffer size of 4096 to the backends.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/sysemu/tpm_backend.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/sysemu/tpm_backend.h b/include/sysemu/tpm_backend.h index 590e8b42de..7c98b6100d 100644 --- a/include/sysemu/tpm_backend.h +++ b/include/sysemu/tpm_backend.h @@ -81,6 +81,8 @@ struct TPMBackendClass { TPMVersion (*get_tpm_version)(TPMBackend *t); + size_t (*get_buffer_size)(TPMBackend *t); + TpmTypeOptions *(*get_tpm_options)(TPMBackend *t); void (*handle_request)(TPMBackend *s, TPMBackendCmd *cmd); @@ -183,6 +185,16 @@ int tpm_backend_reset_tpm_established_flag(TPMBackend *s, uint8_t locty); TPMVersion tpm_backend_get_tpm_version(TPMBackend *s); /** + * tpm_backend_get_buffer_size: + * @s: the backend to call into + * + * Get the TPM's buffer size. + * + * Returns buffer size. + */ +size_t tpm_backend_get_buffer_size(TPMBackend *s); + +/** * tpm_backend_query_tpm: * @s: the backend * |