aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStefan Berger <stefanb@linux.vnet.ibm.com>2017-11-04 19:57:15 -0400
committerStefan Berger <stefanb@linux.vnet.ibm.com>2017-12-14 23:39:15 -0500
commit9375c44fdfc07c0fef3052a3f25a13197a528902 (patch)
treee1bde23c01cc36f6c707af2eda79bfa5f8136762 /include
parentabc5cda097f46bdb86833a38ee0961a0e6a47ae1 (diff)
downloadqemu-9375c44fdfc07c0fef3052a3f25a13197a528902.zip
qemu-9375c44fdfc07c0fef3052a3f25a13197a528902.tar.gz
qemu-9375c44fdfc07c0fef3052a3f25a13197a528902.tar.bz2
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>
Diffstat (limited to 'include')
-rw-r--r--include/sysemu/tpm_backend.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/sysemu/tpm_backend.h b/include/sysemu/tpm_backend.h
index 7c98b61..0d6c994 100644
--- a/include/sysemu/tpm_backend.h
+++ b/include/sysemu/tpm_backend.h
@@ -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: