mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
tpm: tpm_emulator: get and set buffer size of device
Convert the tpm_emulator backend to get the current buffer size of the external device and set it to the buffer size that the frontend (TIS) requests. 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
abc5cda097
commit
9375c44fdf
5 changed files with 111 additions and 12 deletions
|
@ -66,7 +66,7 @@ struct TPMBackendClass {
|
|||
TPMBackend *(*create)(QemuOpts *opts);
|
||||
|
||||
/* start up the TPM on the backend - optional */
|
||||
int (*startup_tpm)(TPMBackend *t);
|
||||
int (*startup_tpm)(TPMBackend *t, size_t buffersize);
|
||||
|
||||
/* optional */
|
||||
void (*reset)(TPMBackend *t);
|
||||
|
@ -112,10 +112,12 @@ int tpm_backend_init(TPMBackend *s, TPMIf *tpmif, Error **errp);
|
|||
/**
|
||||
* tpm_backend_startup_tpm:
|
||||
* @s: the backend whose TPM support is to be started
|
||||
* @buffersize: the buffer size the TPM is supposed to use,
|
||||
* 0 to leave it as-is
|
||||
*
|
||||
* Returns 0 on success.
|
||||
*/
|
||||
int tpm_backend_startup_tpm(TPMBackend *s);
|
||||
int tpm_backend_startup_tpm(TPMBackend *s, size_t buffersize);
|
||||
|
||||
/**
|
||||
* tpm_backend_had_startup_error:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue