summary refs log tree commit diff stats
path: root/backends
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 /backends
parentabc5cda097f46bdb86833a38ee0961a0e6a47ae1 (diff)
downloadfocaccia-qemu-9375c44fdfc07c0fef3052a3f25a13197a528902.tar.gz
focaccia-qemu-9375c44fdfc07c0fef3052a3f25a13197a528902.zip
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 'backends')
-rw-r--r--backends/tpm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/backends/tpm.c b/backends/tpm.c
index cb49185d4b..91222c5164 100644
--- a/backends/tpm.c
+++ b/backends/tpm.c
@@ -68,7 +68,7 @@ int tpm_backend_init(TPMBackend *s, TPMIf *tpmif, Error **errp)
     return 0;
 }
 
-int tpm_backend_startup_tpm(TPMBackend *s)
+int tpm_backend_startup_tpm(TPMBackend *s, size_t buffersize)
 {
     int res = 0;
     TPMBackendClass *k = TPM_BACKEND_GET_CLASS(s);
@@ -79,7 +79,7 @@ int tpm_backend_startup_tpm(TPMBackend *s)
     s->thread_pool = g_thread_pool_new(tpm_backend_worker_thread, s, 1, TRUE,
                                        NULL);
 
-    res = k->startup_tpm ? k->startup_tpm(s) : 0;
+    res = k->startup_tpm ? k->startup_tpm(s, buffersize) : 0;
 
     s->had_startup_error = (res != 0);