mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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>
This commit is contained in:
parent
d3fd953f06
commit
b21e6aaf4a
5 changed files with 38 additions and 5 deletions
|
@ -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);
|
||||
|
@ -182,6 +184,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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue